Stable Diffusion WebUI Forge - Neo
[ Classic | Neo ]
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)
"Neo" mainly serves as an continuation for the "latest" version of Forge, which was built on Gradio 4.40.0 before lllyasviel became too busy... Additionally, this fork is focused on optimization and usability, with the main goal of being the lightest WebUI without any bloatwares.
Tip
Features [Sep. 24]
Most base features of the original Automatic1111 Webui should still function
New Features
- Support Wan 2.2
txt2img,img2img,txt2vid,img2vid
Important
To export a video, you need to have FFmpeg installed
- Support Qwen-Image
- not
qwen-image-edit
- not
- Support Nunchaku (
SVDQ) Modelsdev,krea,kontext,qwen-image,t5
- Support Flux Kontext
img2img,inpaint
Note
Since the
state_dictbetween Flux-Dev, Flux-Krea, and Flux-Kontext are exactly the same, to be properly detected as a Kontext model, the model needs to include "kontext" in its path, either the file or folder name.
- Support Chroma
- special thanks: @croquelois
- Rewrite Preset System
- now actually remember the checkpoint/modules selections for each preset
- Support uv package manager
- requires manually installing uv
- drastically speed up installation
- see Commandline
- Support SageAttention, FlashAttention, and fast
fp16_accumulation- see Commandline
- Implement RescaleCFG
- reduce burnt colors; mainly for
v-predcheckpoints - enable in Settings/UI Alternatives
- reduce burnt colors; mainly for
- Implement MaHiRo
- alternative CFG calculation; improve prompt adherence
- enable in Settings/UI Alternatives
- Support loading upscalers in
halfprecision- speed up; reduce quality
- enable in Settings/Upscaling
- Support running tile composition on GPU
- enable in Settings/Upscaling
- Update
spandrel- support new Upscaler architectures
- Add
pillow-heifpackage- support
.avifand.heifimages
- support
TODO
- Improve Memory Management during Generation
- currently, even when using the same models you could run in ComfyUI, you might still get Out of Memory error...
Removed Features
- SD2
- SD3
- Forge Spaces
- Hypernetworks
- CLIP Interrogator
- Deepbooru Interrogator
- Textual Inversion Training
- Most built-in Extensions
- Some built-in Scripts
- Some Samplers
- Sampler in RadioGroup
- Unix
.shlaunch scripts- You can still use this WebUI by simply copying a launch script from other working WebUI
Optimizations
- No longer
gitcloneany repository on fresh install - Remove unused
cmd_args - Remove unused
args_parser - Remove unused
shared_options - Remove legacy codes
- Fix some typos
- Remove redundant upscaler codes
- put every upscaler inside the
ESRGANfolder
- put every upscaler inside the
- Improve
ForgeCanvas- hotkeys
- brush adjustments
- deobfuscate
- Optimize upscaler logics
- Optimize certain operations in
Spandrel - Improve color correction
- Revamp settings
- improve formatting
- update descriptions
- Check for Extension updates in parallel
- Move
embeddingsfolder intomodelsfolder - Disable Refiner by default
- enable again in Settings/UI Alternatives
- Lint & Format
- Update
Pillow- faster image processing
- Update
protobuf- faster
insightfaceloading
- faster
- Update to latest PyTorch
torch==2.8.0+cu128xformers==0.0.32
Note
If your GPU does not support the latest PyTorch, manually install older version of PyTorch
- No longer install
open-cliptwice - Update some packages to newer versions
- Update recommended Python to
3.11.9 - many more... ™️
Commandline
These flags can be added after the
set COMMANDLINE_ARGS=line in thewebui-user.bat(separate each flag with space)
A1111 built-in
--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
by. Forge
-
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
-
--forge-ref-a1111-home: Point to an Automatic1111 installation to load itsmodelsfolders- i.e.
Stable-diffusion,text_encoder
- i.e.
by. Neo
--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
symlinkmeans it will directly access the packages from the cache folders; refrain from clearing the cache when setting this option
-
--forge-ref-comfy-home: Point to an ComfyUI installation to load itsmodelsfolders- i.e.
diffusion_models,clip
- i.e.
-
--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
modelsfolder, rather than adding on top of it
--sage: Install thesageattentionpackage to speed up generation- will also attempt to install
tritonautomatically
- will also attempt to install
Note
For RTX 50 users, you may need to manually install
sageattention 2instead
--flash: Install theflash_attnpackage to speed up generation--fast-fp16: Enable theallow_fp16_accumulationoption- requires PyTorch 2.7.0 +
Installation
-
Install git
-
Clone the Repo
git clone https://github.com/Haoming02/sd-webui-forge-classic sd-webui-forge-neo --branch neo -
Setup Python
Recommended Method
- Install uv
- Set up venv
cd sd-webui-forge-neo uv venv venv --python 3.11 --seed - Add the
--uvflag towebui-user.bat
Standard Method
- Install Python 3.11.9
- Remember to enable
Add Python to PATH
- Remember to enable
- (Optional) Configure Commandline
- Launch the WebUI via
webui-user.bat - During the first launch, it will automatically install all the requirements
- Once the installation is finished, the WebUI will start in a browser automatically
Install sageattention 2
Expand
-
Ensure the WebUI can properly launch already, by following the installation steps first
-
Open the console in the WebUI directory
cd sd-webui-forge-neo -
Start the virtual environment
venv\scripts\activate -
Create a new folder
mkdir repo cd repo -
Clone the repo
git clone https://github.com/thu-ml/SageAttention cd SageAttention -
Install the library
pip install -e . --no-build-isolation- If you installed
uv, useuv pip installinstead - The installation takes a few minutes
- If you installed
Alternatively
for Windows
- Download the pre-built
.whlpackage from https://github.com/woct0rdho/SageAttention/releases
pip install sageattention...win_amd64.whl
- If you installed
uv, useuv pip installinstead - Important: Download the correct
.whlfor your PyTorch version
Install older PyTorch
Expand
- Navigate to the WebUI directory
- Edit the
webui-user.batfile - Add a new line to specify an older version:
set TORCH_COMMAND=pip install torch==2.1.2 torchvision==0.16.2 --extra-index-url https://download.pytorch.org/whl/cu121
Install FFmpeg
Expand
for Windows
- Download the FFmpeg .7z
- Extract the contents to a folder of choice
- Add the
binfolder within to the system PATHEdit the System Environment Variables>Environment Variables>Path
- Verify the installation by entering
ffmpegin a command prompt
Attention
Important
The
--xformersand--sageargs are only responsible for installing the packages, not whether its respective attention is used (this also means you can remove them once the packages are successfully installed)
Forge Neo tries to import the packages and automatically choose the first available attention function in the following order:
SageAttentionFlashAttentionxformersPyTorchBasic
Tip
To skip a specific attention, add the respective disable arg such as
--disable-sage
Note
The VAE only checks for
xformers, so--xformersis still recommended even if you already have--sage
In my experience, the speed of each attention function for SDXL is ranked in the following order:
SageAttention≥FlashAttention>xformers>PyTorch>>Basic
Note
SageAttentionis based on quantization, so its quality might be slightly worse than others
Important
When using
SageAttention 2, both positive prompts and negative prompts are required; omitting negative prompts can causeNaNissues
Issues & Requests
- Issues about removed features will simply be ignored
- Issues regarding installation will be ignored if it's obviously user-error
- Non-Windows platforms will not be supported, as I cannot verify nor maintain them
Special thanks to AUTOMATIC1111, lllyasviel, and comfyanonymous, kijai, city96,
along with the rest of the contributors,
for their invaluable efforts in the open-source image generation community
