ai-dock / stable-diffusion-webui-forge

Stable Diffusion WebUI Forge docker images for use in GPU cloud and local environments. Includes AI-Dock base for authentication and improved user experience.
Other
25 stars 12 forks source link
docker forge gpu image-generation stable-diffusion vast-ai

Docker Build

Stable Diffusion WebUI Forge Docker Image

Run Stable Diffusion WebUI Forge in a docker container locally or in the cloud.

[!NOTE]
These images do not bundle models or third-party configurations. You should use a provisioning script to automatically configure your container. You can find examples in config/provisioning.

Documentation

All AI-Dock containers share a common base which is designed to make running on cloud services such as vast.ai as straightforward and user friendly as possible.

Common features and options are documented in the base wiki but any additional features unique to this image will be detailed below.

Version Tags

The :latest tag points to :latest-cuda

Tags follow these patterns:

CUDA
ROCm
CPU

Browse ghcr.io for an image suitable for your target environment. Alternatively, view a select range of CUDA and ROCm builds at DockerHub.

Supported Python versions: 3.10

Supported Platforms: NVIDIA CUDA, AMD ROCm, CPU

Additional Environment Variables

Variable Description
AUTO_UPDATE Update Web UI Forge on startup (default false)
CIVITAI_TOKEN Authenticate download requests from Civitai - Required for gated models
HF_TOKEN Authenticate download requests from HuggingFace - Required for gated models (SD3, FLUX, etc.)
FORGE_ARGS Startup arguments. eg. --no-half --api
FORGE_PORT_HOST Web UI port (default 7860)
FORGE_REF Git reference for auto update. Accepts branch, tag or commit hash. Default: latest release
FORGE_URL Override $DIRECT_ADDRESS:port with URL for Web UI

See the base environment variables here for more configuration options.

Additional Python Environments

Environment Packages
forge SD WebUI Forge and dependencies

This environment will be activated on shell login.

See the base micromamba environments here.

Additional Services

The following services will be launched alongside the default services provided by the base image.

Stable Diffusion WebUI Forge

The service will launch on port 7860 unless you have specified an override with FORGE_PORT_HOST.

You can set startup arguments by using variable FORGE_ARGS.

To manage this service you can use supervisorctl [start|stop|restart] forge or via the Service Portal application.

[!NOTE] All services are password protected by default and HTTPS is available optionally. See the security and environment variables documentation for more information.

Pre-Configured Templates

Vast.​ai


The author (@robballantyne) may be compensated if you sign up to services linked in this document. Testing multiple variants of GPU images in many different environments is both costly and time-consuming; This helps to offset costs