Skip to content

refactor cogvideox pipeline tests to the new mixin structure#14276

Open
akshan-main wants to merge 3 commits into
huggingface:mainfrom
akshan-main:refactor-cogvideox-pipeline-tests
Open

refactor cogvideox pipeline tests to the new mixin structure#14276
akshan-main wants to merge 3 commits into
huggingface:mainfrom
akshan-main:refactor-cogvideox-pipeline-tests

Conversation

@akshan-main

@akshan-main akshan-main commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Refactors the CogVideoX text-to-video pipeline tests to the new mixin structure from #14113: CogVideoXPipelineTesterConfig plus one test class per mixin, with the integration test moved to a pytest slow class. The old suite had PyramidAttentionBroadcast, FasterCache and FirstBlockCache tests, so those carry over through the new cache mixins.

Existing coverage is kept: test_inference (now asserting a real value slice), the test_callback_inputs override, test_vae_tiling, test_fused_qkv_projections, and the batch-single tolerance override. The attention-slicing override is dropped as the new framework has no equivalent.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline?
  • Did you read our philosophy doc (important for complex PRs)?
  • Was this discussed/approved via a GitHub issue or the forum? Discussed on Slack with @sayakpaul
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Who can review?

@sayakpaul

@github-actions github-actions Bot added tests size/M PR with diff < 200 LOC labels Jul 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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. Fixes #1234) to the PR description so the issue is linked. See the contribution guide for more details. If this PR intentionally does not fix a tracked issue, a maintainer can add the no-issue-needed label to silence this reminder.

Comment on lines 148 to 159
@@ -175,13 +153,9 @@ def test_callback_inputs(self):
if not (has_callback_tensor_inputs and has_callback_step_end):
return

components = self.get_dummy_components()
pipe = self.pipeline_class(**components)
pipe = pipe.to(torch_device)
pipe.set_progress_bar_config(disable=None)
self.assertTrue(
hasattr(pipe, "_callback_tensor_inputs"),
f" {self.pipeline_class} should have `_callback_tensor_inputs` that defines a list of tensor variables its callback function can use as inputs",
pipe = self.get_pipeline().to(torch_device)
assert hasattr(pipe, "_callback_tensor_inputs"), (
f" {self.pipeline_class} should have `_callback_tensor_inputs` that defines a list of tensor variables its callback function can use as inputs"
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should it not suffice?

def test_callback_inputs(self):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, it does. Dropped

@github-actions github-actions Bot added size/L PR with diff > 200 LOC and removed size/M PR with diff < 200 LOC labels Jul 24, 2026
@akshan-main
akshan-main requested a review from sayakpaul July 24, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L PR with diff > 200 LOC tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants