{"id":16973608,"url":"https://github.com/jamesbrink/docker-comfyui","last_synced_at":"2025-08-16T15:08:39.969Z","repository":{"id":252597685,"uuid":"840900693","full_name":"jamesbrink/docker-comfyui","owner":"jamesbrink","description":"Docker Image for ComfyUI Stable Diffusion","archived":false,"fork":false,"pushed_at":"2025-05-24T01:37:38.000Z","size":79,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-24T02:34:08.476Z","etag":null,"topics":["comfyui","docker-image","stable-diffusion"],"latest_commit_sha":null,"homepage":"https://github.com/comfyanonymous/ComfyUI","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamesbrink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-11T03:19:18.000Z","updated_at":"2025-05-24T01:37:42.000Z","dependencies_parsed_at":"2025-01-01T19:31:20.563Z","dependency_job_id":"eb56868d-9518-4d78-8684-7f1495bd38a8","html_url":"https://github.com/jamesbrink/docker-comfyui","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"290db7bdf14d6bfd67344f2223f53284835c3bc8"},"previous_names":["jamesbrink/docker-comfyui"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/jamesbrink/docker-comfyui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesbrink%2Fdocker-comfyui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesbrink%2Fdocker-comfyui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesbrink%2Fdocker-comfyui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesbrink%2Fdocker-comfyui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamesbrink","download_url":"https://codeload.github.com/jamesbrink/docker-comfyui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesbrink%2Fdocker-comfyui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270728073,"owners_count":24635135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["comfyui","docker-image","stable-diffusion"],"created_at":"2024-10-14T01:02:45.422Z","updated_at":"2025-08-16T15:08:39.959Z","avatar_url":"https://github.com/jamesbrink.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Image for ComfyUI (Stable Diffusion)\n\n## About\n\nA Docker image for running [ComfyUI][ComfyUI] with [ComfyUI Manager][ComfyUIManager] pre-installed. This image has been tested on **Linux with NVIDIA GPUs** and is fully compatible with both Docker and Podman.\n\n**Current Version**: ComfyUI v0.3.34 (latest release)\n\n### Key Features:\n- ✅ **Latest ComfyUI**: v0.3.34 with newest dependencies and features\n- ✅ **Permission-Fixed**: Works seamlessly with Docker and rootless Podman\n- ✅ **Easy Updates**: Clean separation of application and user data\n- ✅ **Data Persistence**: Workflows, models, and settings preserved across updates\n- ✅ **Pre-installed Manager**: ComfyUI Manager for easy custom node management \n\nThe following volume mounts are recommended for data persistence:\n- `/data/user`: Contains your workflows and personal workspace settings. Always mount this to preserve your workflows when updating or recreating the container\n- `/data/models`: Model files (checkpoints, VAE, Loras, etc.)\n- `/data/custom_nodes`: Custom nodes and extensions\n- `/data/output`: Generated images and other outputs\n- `/data/input`: Input images and other data\n\nThe `/data/user` volume is particularly important as it stores your workflow files (`.json`), ensuring you don't lose your work when updating ComfyUI or rebuilding the container. Other volumes like `models`, `input`, and `output` can be shared between different AI tools for a more integrated setup.\n\n## Updates and Upgrades\n\nThis container implements a clean separation between the ComfyUI application (in `/opt/comfyui`) and user data (in `/data`). To update ComfyUI:\n\n1. Pull or build a newer version of the container\n2. Stop the current container: `docker stop comfyui`\n3. Start with the new image: `docker run ...` (same command as before)\n\nYour user data, models, and custom nodes will be preserved across updates.\n\n## Architecture \u0026 Performance\n\nThis container implements an optimized architecture designed for production use:\n\n- **Application Layer**: ComfyUI installed in `/opt/comfyui` (read-only, versioned)\n- **Data Layer**: User data in `/data` (persistent, user-controlled volumes)\n- **Working Layer**: Symlinked copy in `/data/work` (efficient, space-saving)\n- **Permission Model**: High UID (10001) for Docker/Podman compatibility\n- **Update Model**: Rebuild container for app updates, volumes preserve data\n\n## Usage\n\nBuild and run the container:\n\n```shell\nmake build\ndocker run -d --gpus all -p 8188:8188 \\\n    -v ./user:/data/user \\\n    -v ./models:/data/models \\\n    -v ./output:/data/output \\\n    -v ./input:/data/input \\\n    -v ./custom_nodes:/data/custom_nodes \\\n    --name comfyui jamesbrink/comfyui\n```\n\nOptionally run container on host network:  \n\n```shell\ndocker run -d --gpus all --network=host \\\n    -v ./user:/data/user \\\n    -v ./models:/data/models \\\n    -v ./output:/data/output \\\n    -v ./input:/data/input \\\n    -v ./custom_nodes:/data/custom_nodes \\\n    --name comfyui jamesbrink/comfyui\n```\n\n### Using with Podman\n\nThis image is fully compatible with Podman and rootless containers:\n\n```shell\npodman run -d --device nvidia.com/gpu=all -p 8188:8188 \\\n    -v ./user:/data/user:Z \\\n    -v ./models:/data/models:Z \\\n    -v ./output:/data/output:Z \\\n    -v ./input:/data/input:Z \\\n    -v ./custom_nodes:/data/custom_nodes:Z \\\n    --name comfyui jamesbrink/comfyui\n```\n\n### Shared Model Setup\n\nIf you want to share models between ComfyUI and other tools like Fooocus, you can create a centralized directory structure:\n\n```shell\nmkdir -p ~/AI/ComfyUI/user           # Workflows and workspace settings\nmkdir -p ~/AI/Models/StableDiffusion # Shared models\nmkdir -p ~/AI/Output                 # Generated images\nmkdir -p ~/AI/Input                  # Input data\nmkdir -p ~/AI/ComfyUI/custom_nodes   # Custom nodes\n```\n\nThen run the container with these mapped volumes:\n\n```shell\ndocker run -d --gpus all --network=host \\\n    -v ~/AI/ComfyUI/user:/data/user \\\n    -v ~/AI/Models/StableDiffusion/:/data/models \\\n    -v ~/AI/Output:/data/output \\\n    -v ~/AI/Input:/data/input \\\n    -v ~/AI/ComfyUI/custom_nodes:/data/custom_nodes \\\n    --name comfyui jamesbrink/comfyui\n```\n\n## Kubernetes Deployment\n\nThe project includes Kubernetes manifests in the `k8s` directory for deploying ComfyUI in a Kubernetes cluster. The deployment requires a Kubernetes cluster with NVIDIA GPU support configured.\n\n### Prerequisites\n\n- Kubernetes cluster with NVIDIA GPU support (nvidia-device-plugin installed)\n- kubectl configured to access your cluster\n- Default StorageClass configured in your cluster\n\n### Deployment Steps\n\n1. Apply the PersistentVolumeClaims:\n```shell\nkubectl apply -f k8s/pvc.yaml\n```\n\n2. Deploy ComfyUI:\n```shell\nkubectl apply -f k8s/deployment.yaml\n```\n\n3. Create the service:\n```shell\nkubectl apply -f k8s/service.yaml\n```\n\n4. Access ComfyUI:\n\n   The service is configured to support both ClusterIP and NodePort access modes. Choose the most appropriate method for your environment:\n\n   a. **Port Forwarding (Testing)**:\n      ```shell\n      kubectl port-forward svc/comfyui 8188:8188\n      ```\n\n   b. **NodePort Access**:\n      ```shell\n      # Get the NodePort\n      kubectl get svc comfyui -o jsonpath='{.spec.ports[0].nodePort}'\n      # Access via any node's IP using the NodePort\n      # http://\u003cnode-ip\u003e:\u003cnode-port\u003e\n      ```\n\n   c. **Ingress (Recommended for Production)**:\n      ```shell\n      # Install NGINX Ingress Controller if not already installed\n      helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx\n      helm repo update\n      helm install ingress-nginx ingress-nginx/ingress-nginx\n\n      # Apply the ingress configuration\n      kubectl apply -f k8s/ingress.yaml\n      ```\n\n      The included ingress configuration provides:\n      - HTTP and HTTPS support (TLS configuration included but commented)\n      - WebSocket support for real-time updates\n      - Reasonable timeout values for long-running operations\n      - Easy customization for domains and TLS\n\n      To enable TLS:\n      1. Uncomment the TLS section in `k8s/ingress.yaml`\n      2. Replace `comfyui.example.com` with your domain\n      3. Provide your TLS certificate in a secret named `comfyui-tls`\n\n### Storage Configuration\n\nThe deployment uses five PersistentVolumeClaims:\n- `comfyui-user-pvc`: 1GB for workflows and workspace settings\n- `comfyui-models-pvc`: 200GB for model files\n- `comfyui-custom-nodes-pvc`: 5GB for custom nodes and extensions\n- `comfyui-output-pvc`: 10GB for generated images\n- `comfyui-input-pvc`: 10GB for input data\n\nAdjust the storage sizes in `k8s/pvc.yaml` according to your needs.\n\n[ComfyUI]: https://github.com/comfyanonymous/ComfyUI\n[ComfyUIManager]: https://github.com/ltdrdata/ComfyUI-Manager","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesbrink%2Fdocker-comfyui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesbrink%2Fdocker-comfyui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesbrink%2Fdocker-comfyui/lists"}