DocsImage Generation WebUI Forge
Image Generation WebUI Forge
This guide explains how to install, configure, and run Stable Diffusion WebUI Forge for use with our image generation application.
System Requirements
- Operating System: Windows 10/11 (64-bit), Linux, or macOS
- GPU: NVIDIA (8GB+ VRAM recommended) or AMD (experimental support)
- RAM: Minimum 16GB (32GB recommended)
- Disk Space: Minimum 20GB free (more space for additional models)
- Software: Python 3.10, Git
Step-by-Step Installation
1. Download Stable Diffusion WebUI Forge
- Open Command Prompt (CMD) or PowerShell.
- Navigate to the folder where you want to install Forge.
- Run the following commands:
git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.gitcd stable-diffusion-webui-forge
2. Configure the webui-user.bat file
- Inside the folder, locate the `webui-user.bat` file. It may be inside the `webui` folder.
- Open it with a text editor (Notepad, VS Code, etc.).
- Replace all content with the following - note that all we're doing is updating `COMMANDLINE_ARGS`:
@echo off set PYTHON= set GIT= set VENV_DIR= set COMMANDLINE_ARGS=--api --cors-allow-origins=* --listen --server-name 0.0.0.0 --port 7860 --disable-safe-unpickle call webui.bat
4. Save and close the file.
3. Download Image Generation Models
Forge does not come with pre-installed models. You need to download at least one model to start generating images.
Option 1: Download models manually
- Create a folder named `webui/models/Stable-diffusion` if it doesn't exist.
- Download models from trusted sites such as Civitai or Hugging Face.
- Place the downloaded `.safetensors` or `.ckpt` files in the `models/Stable-diffusion` folder.
Option 2: Use Forge's model manager
- Start Forge by following step 4 below.
- In the web interface, go to the "Models" tab.
- Click on "Download Models" and choose from the available models.
4. Run Forge
- In the Forge folder, double-click the `webui-user.bat` file.
- Wait for the dependencies to install (this may take a few minutes on first run).
- The browser will automatically open with the Forge interface.
- If the browser doesn't open, manually access: `http://127.0.0.1:7860`.
NOTE: Right now there is a bug in Forge - you can watch this issue to see how to fix it: https://github.com/lllyasviel/stable-diffusion-webui-forge/issues/3001
5. Verify that the API is working
To verify that the API is working correctly:
- With Forge running, access: `http://127.0.0.1:7860/docs`.
- You should see the Forge API documentation.
6. Using with HammerAI
- Select Forge under Image Models when chatting with a character or on the `Create Images` page.
- In the Image Mode settings, set the Forge address as: `http://127.0.0.1:7860`.
- Now you can use our application to generate images through Forge.
Troubleshooting Common Issues
Forge doesn't start
- Check if you have Python 3.10 installed.
- Try running `webui.bat` directly to see error messages.
- Verify that you have enough disk space.
"CUDA out of memory" error
- Reduce the image resolution (512x512 is a good starting point).
- Use the `--medvram` or `--lowvram` option by adding it to `COMMANDLINE_ARGS` in the `webui-user.bat` file.
API is not working
- Check if Forge was started with the `--api` flag (already included in the provided webui-user.bat).
- Verify that the address and port are correct in the application.
Low quality images
- Download better quality models.
- Increase the number of steps (20-30 is a good value).
- Adjust the CFG Scale (7-9 usually produces good results).
Important Notes
- Forge must be running whenever you want to use our application to generate images.
- The first generation after starting Forge may be slower (model loading).
- - The quality and style of the images depend on the model you downloaded and are using.
Minimum Hardware Requirements
For a basic experience:
- NVIDIA GPU with 4GB+ VRAM
- 8GB RAM
- Quad-core CPU
For an optimal experience:
- NVIDIA GPU with 8GB+ VRAM (RTX 2070 or higher)
- 16GB+ RAM
- Recent multi-core CPU
- SSD with at least 20GB free space