Skip to content

[tests] Fix controlnet tests#13736

Open
sayakpaul wants to merge 8 commits into
mainfrom
fix-controlnet-tests
Open

[tests] Fix controlnet tests#13736
sayakpaul wants to merge 8 commits into
mainfrom
fix-controlnet-tests

Conversation

@sayakpaul
Copy link
Copy Markdown
Member

@github-actions github-actions Bot added tests size/S PR with diff < 50 LOC labels May 13, 2026
@sayakpaul
Copy link
Copy Markdown
Member Author

@claude-2-serge could you perform a review?

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

🤗 Serge says:

Straightforward fix switching four controlnet test files from float16 to float32 for dummy/fast tests, with updated expected output slices. The changes are consistent and correct.

Minor issue

  • In test_controlnet_flux.py, there is one remaining float16 at line 201 inside test_flux_image_output_shape that was not updated. The pipe in that test runs in float32 (no dtype override), but the control_image tensor is still created as float16. This likely doesn't cause a failure since the test only checks output shape, but it's inconsistent with the rest of the fix and could mask a dtype-mismatch issue.

5 LLM turns · 7 tool calls · 30.6s · 48948 in / 1398 out tokens

generator=generator,
device=torch.device(device),
dtype=torch.float16,
dtype=torch.float32,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: there's another dtype=torch.float16 at line 201 in test_flux_image_output_shape that wasn't updated. The pipe in that test defaults to float32, so the control_image will be float16 while the rest of the pipeline is float32. It probably doesn't break anything since that test only checks output shape, but for consistency it should likely be torch.float32 as well.

@sayakpaul sayakpaul requested a review from DN6 May 13, 2026 09:51
@sayakpaul sayakpaul requested a review from dg845 May 15, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S PR with diff < 50 LOC tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant