-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[SDXL Refiner] Fix refiner forward pass for batched input #4327
Conversation
The documentation is not available anymore as the PR was closed or merged. |
tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_inpaint.py
Outdated
Show resolved
Hide resolved
@@ -906,15 +906,17 @@ def denoising_value_valid(dnv): | |||
negative_aesthetic_score, | |||
dtype=prompt_embeds.dtype, | |||
) | |||
add_time_ids = add_time_ids.repeat(batch_size * num_images_per_prompt, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those blasted timestep embeds!
Hmm sadly the email address doesn't seem to work for co-authorship. Hope the PR description is enough credit here :-) |
Merging! Many thanks for bearing with me yesterday evening @bghira ! |
the fact it means i wasnt crazy, meant the world to me ahaha |
* fix_batch_xl * Fix other pipelines as well * up * up * Update tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_inpaint.py * sort * up * Finish it all up Co-authored-by: Bagheera <[email protected]> * Co-authored-by: Bagheera [email protected] * Co-authored-by: Bagheera <[email protected]> * Finish it all up Co-authored-by: Bagheera <[email protected]>
…e#4327) * fix_batch_xl * Fix other pipelines as well * up * up * Update tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_inpaint.py * sort * up * Finish it all up Co-authored-by: Bagheera <[email protected]> * Co-authored-by: Bagheera [email protected] * Co-authored-by: Bagheera <[email protected]> * Finish it all up Co-authored-by: Bagheera <[email protected]>
…e#4327) * fix_batch_xl * Fix other pipelines as well * up * up * Update tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_inpaint.py * sort * up * Finish it all up Co-authored-by: Bagheera <[email protected]> * Co-authored-by: Bagheera [email protected] * Co-authored-by: Bagheera <[email protected]> * Finish it all up Co-authored-by: Bagheera <[email protected]>
…e#4327) * fix_batch_xl * Fix other pipelines as well * up * up * Update tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_inpaint.py * sort * up * Finish it all up Co-authored-by: Bagheera <[email protected]> * Co-authored-by: Bagheera [email protected] * Co-authored-by: Bagheera <[email protected]> * Finish it all up Co-authored-by: Bagheera <[email protected]>
…e#4327) * fix_batch_xl * Fix other pipelines as well * up * up * Update tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_inpaint.py * sort * up * Finish it all up Co-authored-by: Bagheera <[email protected]> * Co-authored-by: Bagheera [email protected] * Co-authored-by: Bagheera <[email protected]> * Finish it all up Co-authored-by: Bagheera <[email protected]>
…e#4327) * fix_batch_xl * Fix other pipelines as well * up * up * Update tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_inpaint.py * sort * up * Finish it all up Co-authored-by: Bagheera <[email protected]> * Co-authored-by: Bagheera [email protected] * Co-authored-by: Bagheera <[email protected]> * Finish it all up Co-authored-by: Bagheera <[email protected]>
What does this PR do?
As found by @bghira in #4297 there was a small bug for the refiner when the batch size > 1.
For certain use cases (low steps, high precision) the bug led to serious artifacts as seen in #4297
We also adapt the tests here to make sure the refiner is correctly tested going forward.