Introducing “Stable Diffusion WebUI Forge”, an optimized and faster version of Stable Diffusion WebUI by lllyasviel.
What is Stable Diffusion WebUI Forge?
Stable Diffusion WebUI Forge is the creator of ControlNet and Focusus lllyasvielA Stable Diffusion WebUI (based on Gradio) based platform to ease development, optimize resource management, and speed up inference, created by Mr. The name “Forge” is inspired by “Minecraft Forge”, and the project aims to be his Forge for SD WebUI.
Minecraft Forge is a system required to add other mods to Minecraft. If you do not install Minecraft Forge, you will not be able to install data called MODs that expand Minecraft with new items.
The original WebUI, Automatic1111, is now faster and more memory efficient without any changes to its user interface.
And a very important change in Forge is the Unet Patcher. Unet Patcher allows you to implement methods like Self-Attention Guidance, Kohya High Res Fix, FreeU, StyleAlign, and Hypertile in about 100 lines of code. Many new things are now possible thanks to this Unet Patcher, such as SVD, Z123, masked Ip-adapter, masked controlnet, photomaker, etc.
High speed
Compared to the original WebUI (when performing SDXL inference at 1024px), you can expect the following speedups:
- When using a typical GPU like 8GB VRAM, inference speed (it/s) increases by about 30-45%, GPU memory peak (task manager) decreases from about 700MB to 1.3GB, maximum spread resolution (OOM (without OOM) increases by about 2x to 3x, and maximum spread batch size (without OOM) increases by about 4x to 6x.
- When using a less powerful GPU like 6GB VRAM, inference speed (it/s) increases by about 60-75%, GPU memory peak (task manager) drops from about 800MB to 1.5GB, (no OOM) ) Maximum spread resolution increases by about 3x, maximum spread batch size (without OOM) increases by about 4x.
- When using a high-performance GPU like a 4090 with 24GB of vram, inference speed (it/s) increases by about 3-6%, GPU memory peak (task manager) decreases from about 1GB to 1.4GB, maximum spread The resolution (without OOM) increases by about 1.6x, and the maximum spread batch size (without OOM) increases by about 2x.
- When using ControlNet for SDXL, the maximum ControlNet count (without OOM) increases by about 2x, and the speed of SDXL+ControlNet increases by about 30-45%.
■Compare
This is a comparison of results with 8GB VRAM (3070ti laptop) with SDXL.
Automatic1111
(Average approx. 7.4GB/8GB, peak time approx. 7.9GB/8GB)
WebUI Forge
(Average and peak both 6.3GB/8GB)
New features (not available in original WebUI)
Thanks to Unet Patcher, many new things are now possible and supported in Forge, including SVD, Z123, masked Ip-adapter, masked controlnet, and photomaker.
Additionally, new samplers are available in Forge:
DDPM
DDPM Karras
DPM++ 2M Turbo
DPM++ 2M SDE Turbo
LCM Karras
Euler A Turbo
About command flags
In the Forge backend, all WebUI code related to resource management has been removed and completely rewritten. So all previous CMD flags like medvram, lowvram, medvram-sdxl, precision full, no half, no half vae, attention_xxx, upcast unet… have been removed. Note that adding these flags won’t cause an error, but it won’t do anything. Forge does not recommend that users use the her cmd flag unless they are sure it is really necessary. It is highly recommended to let Forge decide how to load the model.
Without any cmd flags, Forge can run SDXL with 4GB vram and SD1.5 with 2GB vram.
The only required flag is –always-offload-from-vram (this flag slows down the process). This option causes Forge to always unload the model from VRAM. If you are using software together and Forge uses less VRAM and you want to give some VRAM to other software, or if you have an older extension that causes Forge to conflict with VRAM, or This is useful if you encounter an OOM (which is very rare).
About installation
I have an A1111 and know Git
If you have A1111 and are familiar with git, it is highly recommended to run the following command in your terminal at /path/to/stable-diffusion-webui:
git remote add forge
git branch lllyasviel/main
git checkout lllyasviel/main
git fetch forge
git branch -u forge/main
git pull
To get back to A1111, run git checkout master or git checkout dev.
Then you can cd extensions/sd-webui-animatediff and git checkout forge/master.
Don’t have A1111 or don’t know Git
You can use a one-click installation package (includes git and Python).
hereDownload the zip package from.
After downloading, unzip it, update it with update.bat, and run it with run.bat.
Please note that it is important to run update.bat. If not, you may be using an earlier version where potential bugs have not been fixed.
About extensions
Because ControlNet and TiledVAE are integrated, you need to uninstall the following two extensions:
sd-webui-controlnet
multidiffusion-upscaler-for-automatic1111
AnimateDiff issd-webui-animatediff forge/master branchandsd-forge-animatediffincontinue-revolutionIt is being created by Mr. According to continue-revolution, prompt travel, inf t2v, and controlnet v2v have been confirmed to work well, and motion lora and i2i batch are still under construction and may be completed soon.
Other extensions such as the ones below also seem to work fine.
canvas-zoom
translations/localizations
Dynamic Prompts
Adetailer
Ultimate SD Upscale
Reactor
download
For more information and to download Stable Diffusion WebUI Forge, please visit www.stablediffusion.com.From here