SD Docker Project

The stable-diffusion-docker-project by bean980310 is an open-source initiative that streamlines the deployment of various generative AI applications using Docker. By containerizing these tools, the project ensures consistent environments across different systems, simplifying setup and enhancing reproducibility.

Key Features:

  • Comprehensive AI Suite: The project integrates multiple generative AI applications, including:
    • Stable Diffusion WebUI: A user-friendly interface for generating images from text prompts.
    • KohyaSS: Tools for fine-tuning and training AI models.
    • ComfyUI: An intuitive interface for managing AI workflows.
    • InvokeAI: A streamlined toolkit for creative AI applications.
    • Fooocus: An AI-driven image generation tool.
  • Docker Integration: By leveraging Docker, the project ensures that each application runs in a consistent environment, reducing compatibility issues and simplifying the deployment process.
  • Scalability and Flexibility: The modular design allows users to deploy individual services as needed, facilitating customization based on specific requirements.

Setup and Installation:

  1. Prerequisites:
    • Hardware: An NVIDIA GPU is required.
    • Software:
      • CUDA 12.4
      • Docker
      • NVIDIA Container Toolkit
      • For Windows 10/11 users: Enable WSL2 (Windows Subsystem for Linux 2).
  2. Installation Steps:
    • Clone the repository:bashCopy codegit clone https://github.com/bean980310/stable-diffusion-docker-project.git
    • Navigate to the project directory:bashCopy codecd stable-diffusion-docker-project
    • Run the initial setup script using Jupyter Notebook:
      • Execute run_first.ipynb to install necessary dependencies.
      • Execute download.ipynb to download required models.
    • Place the downloaded models in the appropriate directory:bashCopy codemv <downloaded_models> stable-diffusion-models/models/
    • Deploy the desired service using Docker Compose:bashCopy codedocker compose -f docker-compose.pull.yml up -d <service_name> Replace <service_name> with the specific application you wish to deploy (e.g., stable-diffusion-webui).

Available Services and Their Default Ports:

Service NameDefault Port Mapping
stable-diffusion-webui3010:7860
kohya_ss3020:7860
comfyui3030:8188
invokeai9090:9090
fooocus3040:7860
stable-diffusion-webui-forge3050:7860
sdnext3060:7860
open-webui3000:8080
easy-diffusion9000:9000
swarmui7801:7801
facefusion3070:7860
omost3080:8080
stable-audio-tools3090:7860

Extending Functionality:

  • Adding Extensions to Stable Diffusion WebUI:
    • Navigate to the extensions directory:bashCopy codecd workspace/stable-diffusion-webui/extensions
    • Clone the desired extension repository:bashCopy codegit clone <extension_repository_url>
  • Installing ComfyUI Manager:
    • Navigate to the custom nodes directory:bashCopy codecd workspace/ComfyUI/custom_nodes
    • Clone the ComfyUI Manager repository:bashCopy codegit clone https://github.com/ltdrdata/ComfyUI-Manager.git

Usage:

  • To start all services:bashCopy codedocker compose -f docker-compose.pull.yml up -d
  • To start a specific service:bashCopy codedocker compose -f docker-compose.pull.yml up -d <service_name>

Benefits:

  • Simplified Deployment: The use of Docker containers abstracts the complexities involved in setting up AI applications, allowing users to focus on development and experimentation.
  • Consistency: Containerization ensures that applications run uniformly across different environments, reducing the likelihood of system-specific issues.
  • Modularity: Users can deploy only the services they need, conserving system resources and tailoring the setup to their specific use cases.

Conclusion:

The stable-diffusion-docker-project by bean980310 offers a robust and flexible solution for deploying a suite of generative AI tools using Docker. Its modular architecture, combined with comprehensive documentation, makes it an invaluable resource for both novices and experienced practitioners in the AI community.

For more detailed information and access to the repository, visit: https://github.com/bean980310/stable-diffusion-docker-project

More From Author

ComfyUI-Yuan

Cog ComfyUI Goyor