Skip to content

[tests] Add inference test slices for SD3 and remove unnecessary tests #12106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 11, 2025

Conversation

a-r-r-o-w
Copy link
Member

In preparation for attention backend refactor, we should ensure that the inference slices match.

Also, there were some tests that don't make sense to test, so I removed those. Let me know if I should bring it back

@a-r-r-o-w a-r-r-o-w requested a review from sayakpaul August 9, 2025 00:07
Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Sweet! Thanks! We can open the rest for the community and work with our members to help ship faster.

Comment on lines -127 to -141
def test_stable_diffusion_3_different_prompts(self):
pipe = self.pipeline_class(**self.get_dummy_components()).to(torch_device)

inputs = self.get_dummy_inputs(torch_device)
output_same_prompt = pipe(**inputs).images[0]

inputs = self.get_dummy_inputs(torch_device)
inputs["prompt_2"] = "a different prompt"
inputs["prompt_3"] = "another different prompt"
output_different_prompts = pipe(**inputs).images[0]

max_diff = np.abs(output_same_prompt - output_different_prompts).max()

# Outputs should be different here
assert max_diff > 1e-2
Copy link
Member

Choose a reason for hiding this comment

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

Makes sense to remove because we are not checking for any assertion slice. We don't get much issues for it, either.

@a-r-r-o-w a-r-r-o-w merged commit 135df5b into main Aug 11, 2025
10 of 11 checks passed
@a-r-r-o-w a-r-r-o-w deleted the tests/add-slices-sd3 branch August 11, 2025 13:06
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