Skip to content

tests: add pipeline-level testing for cache context. - #15331

Open
sayakpaul wants to merge 2 commits into
mainfrom
tests-pipeline-cache-context
Open

sayakpaul wants to merge 2 commits into
mainfrom
tests-pipeline-cache-context

Conversation

@sayakpaul

Copy link
Copy Markdown
Member

Fixes #15322.

On #14900, Dhruv had to bring it up that certain pipelines were missing the cache_context context manager. This ideally should never have happened and our pipeline tests should have caught them.

Currently, we don't have any such tests and this PR resolves that issue. Since cache_context will be shipped to all pipelines and is part of the general implementation, I chose to keep it at common.py.

@github-actions github-actions Bot added tests fixes-issue size/M PR with diff < 200 LOC labels Nov 18, 2026
@sayakpaul

Copy link
Copy Markdown
Member Author

/diffusers-bot pytest tests/pipelines tests/modular_pipelines -k "cache"

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

✅ pytest tests/pipelines tests/modular_pipelines -k "cache" passed on GPU — view logs.

class TestKandinskyS2VDistilledModularPipelineFast(
KandinskyS2VDistilledModularPipelineTesterConfig, ModularPipelineTesterMixin
):
@DISTILLED_NO_CACHE_CONTEXT

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After we ship cache_context support to all core pipelines, we will remove this. For now, xfail is better than skipping the tests.

@sayakpaul
sayakpaul requested review from DN6 and yiyixuxu November 18, 2026 06:25

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fixes-issue size/M PR with diff < 200 LOC tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests don't catch cache_context calls that omit timestep

1 participant