-
Notifications
You must be signed in to change notification settings - Fork 67
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
Question about the refiner step #2
Comments
I believe it will re-encode so it's applied on the latents. The implementation shows that images are transformed to latents prior to processing: https://github.com/huggingface/diffusers/blob/af48bf200860d8b83fe3be92b2d7ae556a3b4111/src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_img2img.py#L841 I believe this is their recommended way to do refinement, as this is in their PR examples. |
Thank you for your reply
before the refiner there is an output_type="latent" parameter How much VRAM is needed if we move the pipe to cuda instead of enable_model_cpu_offload? I do not have enough VRAM so I cannot know Thanks |
In this way you are right, the process of converting the latents to image can be skipped.
With 4 images, you can use 24G GPU Memory. |
I have 12G VRAM and cannot even do one image using pipe to cuda, thank you so much. |
Two updates:
|
Thanks for this example. Is using images consistently better than using latents? |
I did not do any more testing for that |
I am reading the SDXL paper and found that the refiner is applying to the latent image
but in your codes,
the input are the images instead of the latents
are they the same?
thanks
The text was updated successfully, but these errors were encountered: