-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Add Stable Diffusion Interpolation Example #862
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
Conversation
nateraw
left a comment
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.
Few notes
examples/community/README.md
Outdated
| |:----------|:----------------------|:-----------------|----------:| | ||
| | CLIP Guided Stable Diffusion | Doing CLIP guidance for text to image generation with Stable Diffusion| [Suraj Patil](https://github.com/patil-suraj/) | [](https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/CLIP_Guided_Stable_diffusion_with_diffusers.ipynb) | | ||
| | One Step U-Net (Dummy) | [Patrick von Platen](https://github.com/patrickvonplaten/) | - | | ||
| | One Step U-Net (Dummy) | - | [Patrick von Platen](https://github.com/patrickvonplaten/) | - | |
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.
btw fixed this table here... @patrickvonplaten your name was under the Description column.
examples/community/README.md
Outdated
| | CLIP Guided Stable Diffusion | Doing CLIP guidance for text to image generation with Stable Diffusion| [Suraj Patil](https://github.com/patil-suraj/) | [](https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/CLIP_Guided_Stable_diffusion_with_diffusers.ipynb) | | ||
| | One Step U-Net (Dummy) | [Patrick von Platen](https://github.com/patrickvonplaten/) | - | | ||
| | One Step U-Net (Dummy) | - | [Patrick von Platen](https://github.com/patrickvonplaten/) | - | | ||
| | Stable Diffusion Interpolation | Interpolate the latent space of Stable Diffusion between different prompts/seeds | [Nate Raw](https://github.com/nateraw/) | - | |
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.
will add notebook once this is merged
| @torch.no_grad() | ||
| def __call__( | ||
| self, | ||
| prompt: Optional[Union[str, List[str]]] = None, |
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.
prompt becomes optional, as you can either pass that or text_embeddings
|
The documentation is not available anymore as the PR was closed or merged. |
|
Thanks a lot @nateraw ! |
* ✨ Add Stable Diffusion Interpolation Example * 💄 style * Update examples/community/interpolate_stable_diffusion.py Co-authored-by: Patrick von Platen <[email protected]>
* ✨ Add Stable Diffusion Interpolation Example * 💄 style * Update examples/community/interpolate_stable_diffusion.py Co-authored-by: Patrick von Platen <[email protected]>
Adds
interpolate_stable_diffusion.py, which is a pipeline that lets you generate images as you interpolate between different prompts/seeds.Its
__call__fn is the same asStableDiffusionPipeline, but with the addedtext_embeddingskwarg. Thewalkfunction is where the logic happens. Fine with renaming these if need be so thatwalkbecomes__call__.Here's how I have been using it (from within
examples/communitydir)Though it seems (I think) that once it's merged, you'll be able to use
community='interpolate_stable_diffusion'in thefrom_pretrainedfn instead of having to be in theexamples/communitydir.