Skip to content

[modular] add modular tests for Z-Image and Wan#13078

Open
sayakpaul wants to merge 9 commits intomainfrom
wan-modular-tests
Open

[modular] add modular tests for Z-Image and Wan#13078
sayakpaul wants to merge 9 commits intomainfrom
wan-modular-tests

Conversation

@sayakpaul
Copy link
Member

@sayakpaul sayakpaul commented Feb 4, 2026

What does this PR do?

  • Add tests for Z-Image (only T2I for keeping things simple).
  • Add tests for Wan modular (just T2V to keep things simple; can add more if needed).
  • Modify the test_modular_pipelines_common.py to account for output_type="video" and other changes that come with video pipelines.

@sayakpaul sayakpaul requested review from DN6 and yiyixuxu February 4, 2026 08:45
@sayakpaul sayakpaul changed the title [modular] add Wan modular tests [modular] add modular tests for Z-Image and Wan Feb 4, 2026
Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

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

thanks!
i left some comments

assert self._get_batch_size_from_output(output_batch) == batch_size

# Convert outputs to tensors for comparison
if isinstance(output, list) and isinstance(output_batch, list):
Copy link
Collaborator

Choose a reason for hiding this comment

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

are we trying to handle 3 different output formats here? (list of tensors, list of numpy arrays, single tensor)
Do we actually need all this? Shouldn't our pipeline outputs more or less standardized? at least when you pass a output_type

# Subclasses can override this to change the expected output type
output_name = "images"
# Whether the pipeline returns tensors directly with output_type="pt" or needs conversion
# Set to True for pipelines that don't support output_type parameter (e.g., WAN)
Copy link
Collaborator

Choose a reason for hiding this comment

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

ohh it is for wan
actually can you add that argument for wan, probably just here https://github.com/huggingface/diffusers/blob/main/src/diffusers/modular_pipelines/wan/decoders.py#L52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants