refactor wan animate pipeline tests to the new mixin structure#14239
refactor wan animate pipeline tests to the new mixin structure#14239akshan-main wants to merge 3 commits into
Conversation
|
Hi @akshan-main, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. |
| assert video.shape == (17, 3, 16, 16) | ||
|
|
||
| expected_video = torch.randn(17, 3, 16, 16) | ||
| max_diff = np.abs(video - expected_video).max() | ||
| self.assertLessEqual(max_diff, 1e10) | ||
| max_diff = (video - expected_video).abs().max() | ||
| assert max_diff <= 1e10 |
There was a problem hiding this comment.
I think this was introduced as a part of fast PR iteration. Let's actually assert against proper value slices like we do in other PRs.
There was a problem hiding this comment.
asserted against a real value slice at atol=1e-3, same as the i2v/vace PRs
| @slow | ||
| @require_torch_accelerator | ||
| class WanAnimatePipelineIntegrationTests(unittest.TestCase): | ||
| class TestWanAnimatePipelineSlow: | ||
| prompt = "A painting of a squirrel eating a burger." | ||
|
|
||
| def setUp(self): | ||
| super().setUp() | ||
| @pytest.fixture(autouse=True) | ||
| def cleanup(self): | ||
| gc.collect() | ||
| backend_empty_cache(torch_device) | ||
|
|
||
| def tearDown(self): | ||
| super().tearDown() | ||
| yield | ||
| gc.collect() | ||
| backend_empty_cache(torch_device) | ||
|
|
||
| @unittest.skip("TODO: test needs to be implemented") | ||
| @pytest.mark.skip(reason="TODO: test needs to be implemented") | ||
| def test_wan_animate(self): | ||
| pass |
There was a problem hiding this comment.
We can just remove this because it's not implementing anything. We can do so for all existing occurrences.
What does this PR do?
Refactors the wan animate pipeline tests to the new mixin structure from #14113: a
WanAnimatePipelineTesterConfigplusTestWanAnimatePipeline(PipelineTesterMixin)andTestWanAnimatePipelineMemory(MemoryTesterMixin), with the integration tests moved to a pytest slow class.Existing coverage is kept:
test_inference,test_inference_replacement, and the skippedtest_callback_inputs. No caching tests are added since the old suite had none, and the attention-slicing test is dropped as the new framework has no equivalent.Before submitting
Who can review?
@sayakpaul