Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/feffy380/prompt-morph
Generate morph sequences with Stable Diffusion. Interpolate between two or more prompts and create an image at each step.
https://github.com/feffy380/prompt-morph
Last synced: 11 days ago
JSON representation
Generate morph sequences with Stable Diffusion. Interpolate between two or more prompts and create an image at each step.
- Host: GitHub
- URL: https://github.com/feffy380/prompt-morph
- Owner: feffy380
- Created: 2022-10-03T02:12:35.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-12T23:27:19.000Z (about 1 year ago)
- Last Synced: 2024-07-31T08:14:23.299Z (3 months ago)
- Language: Python
- Homepage:
- Size: 28.3 KB
- Stars: 117
- Watchers: 1
- Forks: 15
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - feffy380/prompt-morph - Generate morph sequences with Stable Diffusion. Interpolate between two or more prompts and create an image at each step. (Python)
README
# prompt-morph
Generate morph sequences with Stable Diffusion. Interpolate between two or more prompts and create an image at each step.# Installation
Automatic Install:
1. Add this repository's url (https://github.com/feffy380/prompt-morph.git) to SD Web UI under Extensions -> Install from URL
2. Restart UIManual Install:
1. Copy `prompt_morph.py` into the `scripts` folder in [AUTOMATIC1111/stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui)
2. Add `moviepy==1.0.3` to `requirements_versions.txt` or install it manuallyEnter at least two prompts in the text area in the script interface (one per line). If you use a negative prompt, it will apply to the whole sequence.
The script creates a `morphs` directory in your output directory and saves each sequence in its own folder here.# How does it work?
An explanation of multi-cond guidance from Birch-san can be found [here](https://www.reddit.com/r/StableDiffusion/comments/xr7wwf/sequential_token_weighting_invented_by/iqdm5ya/) but in summary, multiple prompts are used to guide the sampling process. Each prompt has a weight, which allows us to animate a transition from A to B by going from 100% A and 0% B to 0% A and 100% B.# Example
[morbin_time.webm](https://user-images.githubusercontent.com/114889020/193788624-872bc76c-d045-458f-8e9c-8a13815017e8.webm)# Credits
- Old multi-cond guidance code borrowed from [Birch-san](https://github.com/Birch-san/stable-diffusion/blob/birch-mps-waifu/scripts/txt2img_fork.py)