Comments (8)
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.
from stable-diffusion-xl-demo.
Thank you for your reply
The PR use
images = pipe(prompt=prompt, output_type="latent").images
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
from stable-diffusion-xl-demo.
there is an output_type="latent" parameter
In this way you are right, the process of converting the latents to image can be skipped.
How much VRAM is needed if we move the pipe to cuda instead of enable_model_cpu_offload?
With 4 images, you can use 24G GPU Memory.
from stable-diffusion-xl-demo.
I have 12G VRAM and cannot even do one image using pipe to cuda, thank you so much.
from stable-diffusion-xl-demo.
Two updates:
- If the intermediate images are not needed (i.e., we don't want to compare before/after), no decoding and re-encoding between the base generation and refinement stage are used.
- Offloading can be controlled with environment variables.
from stable-diffusion-xl-demo.
I got some results
on the left: using images as refiner input
on the right: using latent as refiner input
the head of the middle guy has some differences.
Thanks
from stable-diffusion-xl-demo.
Thanks for this example. Is using images consistently better than using latents?
from stable-diffusion-xl-demo.
I did not do any more testing for that
I think I decided to do the refiner only after knowing how this picture looked is a better workflow
from stable-diffusion-xl-demo.
Related Issues (8)
- Enabling Multi-GPU Support for SDXL for WebUI HOT 1
- Not an issue but more of a question HOT 3
- Suggesting features to advanced settings in demo colab HOT 1
- CUDA Usage is 0% HOT 7
- Google Colab only local URL HOT 5
- RuntimeError: Input type (c10::Half) and bias type (float) should be the same HOT 8
- [suggestion] add aspect ratio options HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stable-diffusion-xl-demo.