[tests] Fix controlnet tests#13736
Conversation
|
@claude-2-serge could you perform a review? |
There was a problem hiding this comment.
🤗 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 remainingfloat16at line 201 insidetest_flux_image_output_shapethat was not updated. The pipe in that test runs in float32 (no dtype override), but thecontrol_imagetensor 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, |
There was a problem hiding this comment.
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.
What does this PR do?
Fix https://github.com/huggingface/diffusers/actions/runs/25780617099/job/75722330514?pr=13733