Stable Diffusion WebUI Forge is a platform on top of the original Stable Diffusion WebUI by AUTOMATIC1111, to make development easier, optimize resource management, speed up inference, and study experimental features.
The name "Forge" is inspired by "Minecraft Forge". This project aims to become the Forge of Stable Diffusion WebUI.
- lllyasviel
(paraphrased)
"Classic" mainly serves as an archive for the "previous" version of Forge, which was built on Gradio 3.41.2 before the major changes (see the original announcement) were introduced. Additionally, this fork is focused exclusively on SD1 and SDXL checkpoints, having various optimizations implemented, with the main goal of being the lightest WebUI without any bloatwares.
(Unscientific) Comparisons
| Forge Classic | Forge previous |
Forge main |
reForge main |
|
|---|---|---|---|---|
| 1 Size | 4.3 MB | 6.8 MB | 2 18.5 MB | 7.8 MB |
| 3 Startup | 4.5s | 4 9.5s | 5.2s | 5.7s |
1: using the
Download ZIPbutton on GitHub
2: the large size is frombackend/huggingface
3: using only--xformersflag; disable all extra extensions; does not includeimport torchtime
4: the long time is from requirement conflicts
Most base features of the original Automatic1111 Webui should still function
- Support
v-predSDXL checkpoints (eg. NoobAI) - Support uv package manager
- requires uv
- drastically speed up installation
- see Commandline
- Support SageAttention
- requires RTX 30 +
- ~10% speed up
- see Commandline
- Support fast
cublasoperation (CublasLinear)- requires manually installing the cublas_ops package
- ~25% speed up
- enable in Settings
- Support fast
fp8operation (torch._scaled_mm)- requires RTX 40 +
- ~10% speed up; reduce quality
- enable in Settings
Note
The cublas operation requires fp16 precision, thus is not compatible with fp8 operation
- Implement RescaleCFG
- reduce burnt colors; mainly for
v-predcheckpoints
- reduce burnt colors; mainly for
- Implement MaHiRo
- alternative CFG calculation; [graph]
- Implement
diskcache- (backported from Automatic1111 Webui upstream)
- Implement
skip_early_cond- (backported from Automatic1111 Webui upstream)
- Update
spandrel- support most modern Upscaler architecture
- Add
pillow-heifpackage- support
.avifand.heifformats
- support
- Automatic row split for
X/Y/Z Plot - Add an option to disable Refiner
- Add an option to disable ExtraNetworks Tree View
- Support Union / ProMax ControlNet
- I just made them always show up in the dropdown
- SD2
- Alt-Diffusion
- Instruct-Pix2Pix
- Hypernetworks
- SVD
- Z123
- CLIP Interrogator
- Deepbooru Interrogator
- Textual Inversion Training
- Checkpoint Merging
- LDSR
- Most built-in Extensions
- Some built-in Scripts
- The
testscripts -
Photopeaandopenpose_editor(ControlNet) - Unix
.shlaunch scripts- You can still use this WebUI by copying a launch script from another working WebUI; I just don't want to maintain them...
- [Freedom] Natively integrate the
SD1andSDXLlogics- no longer
gitcloneany repository on fresh install - no more random hacks and monkey patches
- no longer
- Fix memory leak when switching checkpoints
- Clean up the
ldm_patched(ie.comfy) folder - Remove unused
cmd_args - Remove unused
shared_options - Remove unused
args_parser - Remove legacy codes
- Remove duplicated upscaler codes
- put every upscaler inside the
ESRGANfolder
- put every upscaler inside the
- Improve color correction
- Improve code logics
- Improve hash caching
- Improve error logs
- no longer prints
TypeError: 'NoneType' object is not iterable
- no longer prints
- Improve setting descriptions
- Check for Extension updates in parallel
- Moved
embeddingsfolder intomodelsfolder - ControlNet Rewrite
- change Units to
gr.Tab - remove multi-inputs, as they are "misleading"
- change
visibletoggle tointeractivetoggle; now the UI will no longer jump around - improved
Presetsapplication
- change Units to
- Run
text encoderon CPU by default - Fix
pydanticErrors - Fix
Soft Inpainting - Lint & Format most of the Python and JavaScript codes
- Update to Pillow 11
- faster image processing
- Update to latest PyTorch
- currently
2.6.0+cu126
- currently
- No longer install
open-cliptwice - Update certain packages to newer versions
- Update recommended Python to
3.11.9 - many more... ™️
These flags can be added after the
set COMMANDLINE_ARGS=line in thewebui-user.bat(separate each flag with space)
--no-download-sd-model: Do not download a default checkpoint- can be removed after you download some checkpoints of your choice
--xformers: Install thexformerspackage to speed up generation--port: Specify a server port to use- defaults to
7860
- defaults to
--api: Enable API access
- Once you have successfully launched the WebUI, you can add the following flags to bypass some validation steps in order to improve the Startup time
--skip-prepare-environment--skip-install--skip-python-version-check--skip-torch-cuda-test--skip-version-check
Important
Remove them if you are installing an Extension, as those also block Extension from installing requirements
- For RTX 30 and above, you can add the following flags to slightly increase the performance; but in rare occurrences, they may cause
OutOfMemoryerrors or even crash the WebUI; and in certain configurations, they may even lower the speed instead--cuda-malloc--cuda-stream--pin-shared-memory
--uv: Replace thepython -m pipcalls withuv pipto massively speed up package installation- requires uv to be installed first (see Installation)
--uv-symlink: Same as above; but additionally pass--link-mode symlinkto the commands- significantly reduces installation size (
~7 GBto~100 MB)
- significantly reduces installation size (
Important
Using symlink means it will directly access the packages from the cache folders; refrain from clearing the cache when setting this option
--sage: Install thesageattentionpackage to speed up generation- requires RTX 30 +
- requires manually installing triton
- only affects SDXL
Tip
--xformers is still recommended even if you already have --sage, as sageattention does not speed up VAE while xformers does
--model-ref: Points to a centralmodelsfolder that contains all your models- said folder should contain subfolders like
Stable-diffusion,Lora,VAE,ESRGAN, etc.
- said folder should contain subfolders like
Important
This simply replaces the models folder, rather than adding on top of it
-
Install git
-
Clone the Repo
git clone https://github.com/Haoming02/sd-webui-forge-classic
-
Setup Python
Recommended Method
- Install uv
- Set up venv
cd sd-webui-forge-classic uv venv venv --python 3.11 - Add the
--uvflag (see Commandline)
Standard Method
- Install Python 3.11.9
- (Optional) Configure Commandline
Note
For RTX 50s user, refer to #8 to install PyTorch first
- Launch the WebUI via
webui-user.bat
- During the first launch, it will automatically install all the requirements
- Once installation is finished, the WebUI will start in a browser automatically
- Issues about removed features will simply be ignored; Issues regarding installation will also be ignored if it's obviously user-error
- Feature Request not related to performance or optimization will simply be ignored
- For cutting edge features, check out reForge instead
Special thanks to AUTOMATIC1111, lllyasviel, and comfyanonymous, kijai,
along with the rest of the contributors,
for their invaluable efforts in the open-source image generation community
