Skip to content

refactor deepfloyd if pipeline tests to the new mixin structure - #14580

Merged
sayakpaul merged 1 commit into
huggingface:mainfrom
akshan-main:refactor-if-pipeline-tests
Aug 24, 2026
Merged

refactor deepfloyd if pipeline tests to the new mixin structure#14580
sayakpaul merged 1 commit into
huggingface:mainfrom
akshan-main:refactor-if-pipeline-tests

Conversation

@akshan-main

Copy link
Copy Markdown
Contributor

What does this PR do?

Refactors the DeepFloyd IF text-to-image pipeline tests to the new mixin structure from #14113: an IFPipelineTesterConfig plus TestIFPipeline(PipelineTesterMixin) and TestIFPipelineMemory(PipelineOffloadTesterMixin), with the slow class ported to pytest. The dummy components move from the shared IFPipelineTesterMixin in the package __init__.py into the file, so it is self-contained like the other migrated families; the shared mixin gets removed once the last IF file migrates.

Choices verified by running each candidate:

  • @skip_mps is kept as the pytest marker it already is: the pipeline outputs all NaN on mps.
  • optional_input_params drops latents (the pipelines take no latents argument), mirroring the old required_optional_params subtraction.
  • The custom test_save_load_optional_components is ported: the text encoder is optional so the prompt is pre-encoded, where the base test would pass a raw prompt with text_encoder=None.
  • The old save_load_local attention-processor override is dropped: the framework version passes without it.
  • The float16 save/load override keeps the 1e-1 tolerance for the tiny-random-t5 save/load non-determinism.

test_inference gets a fresh CPU slice. Follows #14577.

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 Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M PR with diff < 200 LOC tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants