Skip to content
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

stable_diffusion vs diffusion_model #2362

Closed
Reginald-L opened this issue Feb 27, 2024 · 2 comments
Closed

stable_diffusion vs diffusion_model #2362

Reginald-L opened this issue Feb 27, 2024 · 2 comments

Comments

@Reginald-L
Copy link

there are two py files: stable_diffusion.py and diffusion_model.py, what is the difference between these two names stable diffusion and diffusion model?
image

@sachinprasadhs
Copy link
Collaborator

stable_diffusion.py is base class for StableDiffusion, where as diffusion_model.py ( Diffusion Model) is the sub-component of StableDiffusion.

@tirthasheshpatel
Copy link
Contributor

tirthasheshpatel commented Mar 8, 2024

To add on to @sachinprasadhs's answer, diffusion_model.py is just the UNet for predicting the noise distribution. The stable_diffusion.py file brings all the components together (i.e. the text encoder, noise scheduler, time step embeddings, the diffusion UNet, and the image decoder) to provide the users an end-to-end text-to-image model for inference.

I hope this answers your question! I am closing this issue but feel free to reopen if you have further questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants