This is a Gradio WebUI working with the Diffusers format of Stable Diffusion
- Install the recommended version of Python 3.10.6, checking "Add Python to PATH"
- Install git.
- Download the diffusers-webui repository, for example by running
git clone https://github.com/nitrosocke/diffusers-webui.git
. - Place your model Diffusers in the
models
directory. - Run
LaunchUI.bat
from Windows Explorer as non-administrator user.
You can set an alternative Python path by editing the LaunchUI.bat
and add the absolute path after the set PYTHON=
like so:
set PYTHON=C:/Python/python.exe
This update includes tons of fixes, improvements and a few feature updates:
- added MagicPrompt by Gustavosta
- added PNG Chunks writing and reading
- added img2img pipeline
- added LoRA embeddings support by cloneofsimo
- added prompt weighting support
- updated preset prompts, negative prompts and resolution
- updated UI with better tabs and labels
- fixed texts and labels
The diffusers of you models folder should contain these subfolders and the 'model_index.json' file.
To start the webUI run the LaunchUI.bat
from the directory. You can make a shortcut for it on your Desktop for easier access.
By default the webUI starts with settings optimised for the 768-v models.
You can set the model to use, the v-model option and the save path for images in the settings tab.
Input your image you want to use and tune the 'Transformation strength' to get more of the style or more of the image. Settings from the 'Main' tab are used for generation.
The app saves your generation settings automatically to the png files it generates. You can use the 'Tools' tab to review your settings or a website like Project Nayuki to view them.
In order to use the MagicPrompt extension you need to download the model from Gustavostas Huggingface
You will need the files: config.json, merges.txt, pytorch_model.bin, special_tokens_map.json, tokenizer.json, tokenizer_config.json, training_args.bin, vocab.json
Place these files into the directory 'tools/GPT2' (the folder should be 489mb in size).
You can "inject" your LoRA trained .pt files into your base model. Place your 3mb embedding file and the text encoder file (optional) into the 'embeddings' folder. For easier handling I recommend renaming the files like 'zerosuit.pt' and 'zerosuit.text_encoder.pt'. The file name has no influence on the token used for inference. To use the embedding enable the checkbox in the 'Main' tab, select the embedding you want to use and adjust the weight slider. Make sure to prompt the trained token in your prompt. Optionally you can adjust the text encoder weight as well.
You can but attention to certain tokens in your prompt by using ()
or (token:1.1)
or reduce the influence by using []
or (token:0.9)
. Please see a detailed description of the usage here: Long Prompt Weighting
- implement more community pipelines
- img2img inpainting pipeline
- failsaves for missing files and dependencies
- clean up the code and comment it
- Stable Diffusion - Stable-Diffusion Github
- Huggingface - Diffusers Github, Huggingface.co
- Anzorq - for the help with the Gradio UI Anzorq on Hugginface, Finetuned-Diffusion Space
- Gustavosta - for the amazing GPT2 MagicPrompts model: MagicPrompt - Stable Diffusion
- cloneofsimo for the LoRA training script: Low-rank Adaptation for Fast Text-to-Image Diffusion Fine-tuning
- SkyTNT for the Long Prompt Weighting
- Automatic1111 - for the idea and the launch script Automatic1111 Github