refactor qwenimage pipeline tests to the new mixin structure#14220
Conversation
sayakpaul
left a comment
There was a problem hiding this comment.
Thanks for getting started so quickly!
|
|
||
| return inputs | ||
|
|
||
| def test_inference(self): |
There was a problem hiding this comment.
Let's keep this test perhaps in TestQwenImagePipeline?
| class TestQwenImagePipelineMemory(QwenImagePipelineTesterConfig, MemoryTesterMixin): | ||
| pass | ||
|
|
||
|
|
||
| class TestQwenImagePipelinePyramidAttentionBroadcast( | ||
| QwenImagePipelineTesterConfig, PyramidAttentionBroadcastTesterMixin | ||
| ): | ||
| pass | ||
|
|
||
|
|
||
| class TestQwenImagePipelineFirstBlockCache(QwenImagePipelineTesterConfig, FirstBlockCacheTesterMixin): | ||
| pass | ||
|
|
||
|
|
||
| class TestQwenImagePipelineTaylorSeerCache(QwenImagePipelineTesterConfig, TaylorSeerCacheTesterMixin): | ||
| pass | ||
|
|
||
|
|
||
| class TestQwenImagePipelineMagCache(QwenImagePipelineTesterConfig, MagCacheTesterMixin): | ||
| pass |
There was a problem hiding this comment.
If the QwenImage test suite didn't have caching tests, let's not introduce them here.
There was a problem hiding this comment.
removed. nothing new added
| def test_inference_batch_single_identical(self): | ||
| self._test_inference_batch_single_identical(batch_size=3, expected_max_diff=1e-1) | ||
|
|
||
| def test_attention_slicing_forward_pass( |
There was a problem hiding this comment.
Is this test already covered?
There was a problem hiding this comment.
Yes, it's inherited from the base PipelineTesterMixin. The override only loosens the tolerance to 1e-1 (Qwen's batched vs single output exceeds the 1e-4 default, the same value the old test used).
There was a problem hiding this comment.
Dropped it. Passes at the base 1e-4 default, so the override wasn't needed.
What does this PR do?
Refactors the qwenimage pipeline tests to the new mixin structure from #14113: a
QwenImagePipelineTesterConfigholding the components and inputs,TestQwenImagePipeline(PipelineTesterMixin)for the fast tests, andTestQwenImagePipelineMemory(MemoryTesterMixin)for the offload and casting tests.Existing coverage is kept as-is:
test_inferenceand the qwen-specific tests (VAE tiling, true-CFG without a negative mask). No new tests are introduced since the old suite had no caching tests. The attention-slicing test is dropped since the new framework has no equivalent.Before submitting
Who can review?
@sayakpaul