Skip to content

refactor unet_spatiotemporal tests#13891

Merged
sayakpaul merged 2 commits into
huggingface:mainfrom
akshan-main:tests-refactor-unet-spatiotemporal
Jun 9, 2026
Merged

refactor unet_spatiotemporal tests#13891
sayakpaul merged 2 commits into
huggingface:mainfrom
akshan-main:tests-refactor-unet-spatiotemporal

Conversation

@akshan-main

@akshan-main akshan-main commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Part of the ongoing modeling-test migration (following #13369 and #13153). Migrates the UNetSpatioTemporalConditionModel test suite to the mixin-based structure (Config + ModelTesterMixin / TrainingTesterMixin / MemoryTesterMixin / AttentionTesterMixin). First of the UNet test migrations.

Before submitting

Who can review?

@sayakpaul @DN6

@github-actions github-actions Bot added size/L PR with diff > 200 LOC tests and removed size/L PR with diff > 200 LOC labels Jun 9, 2026
@akshan-main

Copy link
Copy Markdown
Contributor Author

The model's _repeated_blocks is empty, so the compile mixin is not included. A few UNetTesterMixin-era tests have no equivalent in the new mixins and were dropped: test_xformers_enable_works (xformers is deprecated), test_from_save_pretrained_dynamo, test_deprecated_kwargs, and the set_attn_processor determinism tests. The model-specific tests (num_attention_heads/cross_attention_dim tuple configs, pickle, gradient-checkpointing set) are kept. Happy to keep any of the dropped ones as overrides if you'd prefer.

@github-actions github-actions Bot added the size/L PR with diff > 200 LOC label Jun 9, 2026

@sayakpaul sayakpaul left a comment

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.

Thanks for the test refactor. I think it's fine to drop those tests since these models aren't used that much anyway.

@sayakpaul sayakpaul left a comment

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.

Ran the tests locally as well and we're good!

Image

@sayakpaul sayakpaul merged commit 3759fab into huggingface:main Jun 9, 2026
13 checks passed
DN6 pushed a commit that referenced this pull request Jul 1, 2026
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
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