[Community] Move the number "0.18215" from the image2image process to VAE config
See original GitHub issueThere is a magic number “0.18215” in the repository
In the file src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py
, there is a number “0.18215” in line 220 and line 342, which is strange since it does occur in the original repo. Is there someone clarifying why is that and where does this number come from?
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:10 (6 by maintainers)
Top Results From Across the Web
What does "0.18215" mean in blog Stable Diffusion with ...
This question came up on GitHub too: Why is there a number "0.18215" in the image2image process · Issue #726 · huggingface/diffusers ·...
Read more >Stable Diffusion based Image Compression - LinkedIn
To quantize the latents generated by the VAE, I first scaled them by 1 / 0.18215, a number you may have come across...
Read more >Diagnosing and Enhancing VAE Models - OpenReview
We closely analyze the VAE objective function and draw novel conclusions that lead to simple enhancements.
Read more >Stable diffusion using Hugging Face - Towards Data Science
The process of converting a text to a number can be broken down ... init_latent_dist = vae.encode(init_image).latent_dist.sample() * 0.18215
Read more >Train Variational Autoencoder (VAE) to Generate Images
This example shows how to train a deep learning variational autoencoder (VAE) to generate images.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Let’s put it maybe directly in the VAE config then ? cc @patil-suraj
Think we can have this be a config parameter that is overrideable and a
Union[int, str]
with the string describing a more complex squashing function that can be implemented down the road.Marking this for now as a community feature as it seems like no one finds the time to open a PR here - in case you’re interested @neverix - we’d be more than happy to review a PR 😃