Docker container for Stable Diffusion
Top 47.3% on sourcepulse
This repository provides a Dockerized environment for running official Stable Diffusion models, enabling users to generate images from text (txt2img) and modify existing images (img2img, depth2img, pix2pix, inpaint, upscale4x). It targets users who want a straightforward, GPU-accelerated way to leverage Stable Diffusion without complex local setup, offering flexibility in model selection and generation parameters.
How It Works
The project utilizes a build.sh
script to manage Docker image building and execution. It pulls official Stable Diffusion models from Hugging Face, requiring a Hugging Face user access token. The script mounts local directories for input images and output PNGs, and uses Docker volumes for caching downloaded models. This approach simplifies dependency management and ensures consistent execution across different environments.
Quick Start & Requirements
./build.sh pull
then ./build.sh run [PROMPT]
--device cpu --onnx
for CPU inference), Hugging Face user access token (saved in token.txt
or provided via --token
).Highlighted Details
--half
, --attention-slicing
, --xformers-memory-efficient-attention
) for lower-VRAM GPUs.Maintenance & Community
No specific contributors, sponsorships, or community links (Discord/Slack) are mentioned in the README.
Licensing & Compatibility
The repository itself appears to be under an unspecified license, but it facilitates the use of Stable Diffusion models, which are subject to Hugging Face's terms of service and individual model licenses. Compatibility for commercial use depends on the underlying models used.
Limitations & Caveats
The README notes that less powerful GPUs may require specific optimizations or CPU fallback. Some memory-saving options like --xformers-memory-efficient-attention
have hardware/pipeline support dependencies.
1 year ago
1 day