├── .dockerignore ├── .gitattributes ├── .github ├── FUNDING.yml └── workflows │ ├── build-base-cu124-pt25.yml │ ├── build-comfy3d-pt25.yml │ ├── build-cpu.yml │ ├── build-cu121-megapak.yml │ ├── build-cu121.yml │ ├── build-cu124-cn.yml │ ├── build-cu124-megapak.yml │ ├── build-cu124-slim.yml │ ├── build-cu126-slim.yml │ ├── build-cu128-test.yml │ ├── build-direct3ds2.yml │ ├── build-nightly.yml │ ├── build-rocm.yml │ └── build-xpu.yml ├── .gitignore ├── LICENSE ├── README.adoc ├── README.zh.adoc ├── archived ├── .github │ └── workflows │ │ ├── build-base-cu124-pt25.yml │ │ ├── build-base-cu124.yml │ │ ├── build-comfy3d-pt22.yml │ │ └── build-comfy3d-pt23.yml ├── base-cu124-pt25 │ └── Dockerfile ├── base-cu124 │ └── Dockerfile ├── comfy3d-pt22 │ ├── Dockerfile │ ├── README.adoc │ ├── README.zh.adoc │ ├── docker-compose.yml │ └── runner-scripts │ │ ├── download.sh │ │ ├── entrypoint.sh │ │ ├── pre-start.sh.example │ │ └── set-proxy.sh.example └── comfy3d-pt23 │ ├── Dockerfile │ ├── README.adoc │ ├── README.zh.adoc │ ├── docker-compose.yml │ └── runner-scripts │ ├── download.sh │ ├── entrypoint.sh │ ├── pre-start.sh.example │ └── set-proxy.sh.example ├── base-cu128-pt27 ├── Dockerfile └── README.txt ├── comfy3d-pt25 ├── Dockerfile ├── README.adoc ├── README.zh.adoc ├── builder-scripts │ ├── generate-pak5.sh │ ├── pak3.txt │ ├── pak4.txt │ ├── pak5.txt │ ├── pak6.txt │ ├── pak7.txt │ ├── pak8.txt │ ├── pak9.txt │ └── pakA.txt ├── docker-compose.yml └── runner-scripts │ ├── build-deps-trellis-demo.sh │ ├── build-deps.sh │ ├── download.sh │ ├── entrypoint.sh │ ├── pre-start.sh.example │ └── set-proxy.sh.example ├── cpu ├── Dockerfile ├── builder-scripts │ ├── generate-pak5.sh │ ├── pak3.txt │ ├── pak5.txt │ └── pak7.txt ├── docker-compose.yml └── runner-scripts │ ├── download-models.txt │ ├── download.sh │ ├── entrypoint.sh │ ├── pre-start.sh.example │ └── set-proxy.sh.example ├── cu121-megapak ├── Dockerfile ├── README.adoc ├── README.zh.adoc ├── builder-scripts │ ├── generate-pak5.sh │ ├── pak3.txt │ ├── pak5.txt │ └── pak7.txt ├── docker-compose.yml └── runner-scripts │ ├── download-models.txt │ ├── download.sh │ ├── entrypoint.sh │ ├── pre-start.sh.example │ └── set-proxy.sh.example ├── cu121 ├── Dockerfile ├── README.adoc ├── README.zh.adoc ├── docker-compose.yml ├── scripts │ ├── download-models.txt │ ├── download.sh │ ├── entrypoint.sh │ └── root-wrapper.sh └── storage │ └── .gitkeep ├── cu124-cn ├── Dockerfile ├── Dockerfile-cn ├── README.adoc ├── builder-scripts │ ├── generate-pak5.sh │ ├── pak3.txt │ ├── pak5.txt │ └── pak7.txt ├── docker-compose.yml └── runner-scripts │ ├── download-models.txt │ ├── download.sh │ ├── entrypoint.sh │ ├── minimal-start.sh │ ├── pre-start.sh.example │ └── set-proxy.sh.example ├── cu124-megapak ├── Dockerfile ├── README.adoc ├── README.zh.adoc ├── builder-scripts │ ├── generate-pak5.sh │ ├── pak3.txt │ ├── pak5.txt │ └── pak7.txt ├── docker-compose.yml └── runner-scripts │ ├── download-models.txt │ ├── download.sh │ ├── entrypoint.sh │ ├── pre-start.sh.example │ └── set-proxy.sh.example ├── cu124-slim ├── Dockerfile ├── README.adoc ├── builder-scripts │ ├── generate-pak5.sh │ ├── pak3.txt │ ├── pak5.txt │ └── pak7.txt ├── docker-compose.yml └── runner-scripts │ ├── download-models.txt │ ├── download.sh │ ├── entrypoint.sh │ ├── pre-start.sh.example │ └── set-proxy.sh.example ├── cu126-slim ├── Dockerfile ├── README.txt ├── builder-scripts │ ├── generate-pak5.sh │ ├── pak3.txt │ ├── pak5.txt │ └── pak7.txt ├── docker-compose.yml └── runner-scripts │ ├── download-models.txt │ ├── download.sh │ ├── entrypoint.sh │ ├── pre-start.sh.example │ └── set-proxy.sh.example ├── cu128-test ├── Dockerfile ├── README.txt ├── builder-scripts │ ├── generate-pak5.sh │ ├── pak3.txt │ ├── pak5.txt │ └── pak7.txt ├── docker-compose.yml └── runner-scripts │ ├── download-models.txt │ ├── download.sh │ ├── entrypoint.sh │ ├── pre-start.sh.example │ └── set-proxy.sh.example ├── direct3ds2 ├── Dockerfile ├── README.txt ├── builder-scripts │ ├── generate-pak5.sh │ ├── pak3.txt │ ├── pak5.txt │ └── pak7.txt └── runner-scripts │ ├── build-deps.sh │ ├── download-models.sh │ ├── download-repo.sh │ ├── entrypoint.sh │ ├── pre-start.sh.example │ └── set-proxy.sh.example ├── docs ├── README-DockerHub.md ├── chart-concept-cn.zh.svg ├── chart-concept-slim.svg ├── chart-concept.svg ├── chart-concept.zh.svg ├── wsl-directml.adoc └── wsl-directml.zh.adoc ├── nightly ├── Dockerfile └── README.adoc ├── rocm ├── Dockerfile ├── README.adoc ├── README.zh.adoc ├── builder-scripts │ ├── generate-pak5.sh │ ├── pak3.txt │ ├── pak5.txt │ └── pak7.txt ├── docker-compose.yml └── runner-scripts │ ├── download-models.txt │ ├── download.sh │ ├── entrypoint.sh │ ├── pre-start.sh.example │ └── set-proxy.sh.example └── xpu ├── Dockerfile ├── Dockerfile-cn ├── README.txt ├── builder-scripts ├── generate-pak5.sh ├── pak3.txt ├── pak5.txt └── pak7.txt ├── docker-compose.yml ├── runner-scripts-cn ├── download-models.txt ├── download.sh ├── entrypoint.sh ├── pre-start.sh.example └── set-proxy.sh.example ├── runner-scripts ├── download-models.txt ├── download.sh ├── entrypoint.sh ├── pre-start.sh.example └── set-proxy.sh.example └── under-development ├── Dockerfile-fedora-cn ├── Dockerfile-suse └── Dockerfile-suse-cn /.dockerignore: -------------------------------------------------------------------------------- 1 | **/.gitkeep 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: yanwk 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /.github/workflows/build-base-cu124-pt25.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'base-cu128-pt27' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # Can be manually triggered 5 | push: 6 | branches: [ main ] 7 | paths-ignore: 8 | - '**' 9 | - '!base-cu128-pt27/Dockerfile' 10 | - '!.github/workflows/build-base-cu128-pt27.yml' 11 | 12 | 13 | jobs: 14 | 15 | build-publish-base-cu128-pt27: 16 | environment: Publish to Docker Hub 17 | runs-on: ubuntu-latest 18 | steps: 19 | - 20 | name: Maximize build disk space 21 | uses: easimon/maximize-build-space@master 22 | with: 23 | overprovision-lvm: 'true' 24 | remove-android: 'true' 25 | - 26 | name: Git checkout 27 | uses: actions/checkout@v4 28 | - 29 | name: Set up QEMU 30 | uses: docker/setup-qemu-action@v3 31 | - 32 | name: Set up Docker Buildx 33 | uses: docker/setup-buildx-action@v3 34 | - 35 | name: Login to Docker Hub 36 | uses: docker/login-action@v3 37 | with: 38 | username: ${{ secrets.DOCKERHUB_USERNAME }} 39 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 40 | - 41 | name: Build and push 'base-cu128-pt27' 42 | uses: docker/build-push-action@v6 43 | with: 44 | context: ./base-cu128-pt27 45 | file: ./base-cu128-pt27/Dockerfile 46 | tags: | 47 | yanwk/comfyui-boot:base-cu128-pt27 48 | push: true 49 | -------------------------------------------------------------------------------- /.github/workflows/build-comfy3d-pt25.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'comfy3d-pt25' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # Can be manually triggered 5 | push: 6 | branches: [ main ] 7 | paths-ignore: 8 | - '**' 9 | - '!comfy3d-pt25/Dockerfile' 10 | - '!comfy3d-pt25/runner-scripts/**' 11 | - '!.github/workflows/build-comfy3d-pt25.yml' 12 | 13 | 14 | jobs: 15 | 16 | build-publish-comfy3d-pt25: 17 | environment: Publish to Docker Hub 18 | runs-on: ubuntu-latest 19 | steps: 20 | - 21 | name: Get current date 22 | id: date 23 | run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT 24 | - 25 | name: Maximize build disk space 26 | uses: easimon/maximize-build-space@master 27 | with: 28 | overprovision-lvm: 'true' 29 | remove-android: 'true' 30 | - 31 | name: Git checkout 32 | uses: actions/checkout@v4 33 | - 34 | name: Set up QEMU 35 | uses: docker/setup-qemu-action@v3 36 | - 37 | name: Set up Docker Buildx 38 | uses: docker/setup-buildx-action@v3 39 | - 40 | name: Login to Docker Hub 41 | uses: docker/login-action@v3 42 | with: 43 | username: ${{ secrets.DOCKERHUB_USERNAME }} 44 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 45 | - 46 | name: Build and push 'comfy3d-pt25' 47 | uses: docker/build-push-action@v6 48 | with: 49 | context: ./comfy3d-pt25 50 | file: ./comfy3d-pt25/Dockerfile 51 | tags: | 52 | yanwk/comfyui-boot:comfy3d-pt25 53 | yanwk/comfyui-boot:comfy3d-pt25-${{ steps.date.outputs.date }} 54 | push: true 55 | -------------------------------------------------------------------------------- /.github/workflows/build-cpu.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'cpu' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # Can be manually triggered 5 | schedule: # Runs on every Monday, 07:00 UTC 6 | - cron: '0 7 * * 1' 7 | push: 8 | branches: [ main ] 9 | paths-ignore: 10 | - '**' 11 | - '!cpu/Dockerfile' 12 | - '!cpu/builder-scripts/**' 13 | - '!cpu/runner-scripts/**' 14 | - '!.github/workflows/build-cpu.yml' 15 | 16 | jobs: 17 | 18 | build-publish-cpu: 19 | environment: Publish to Docker Hub 20 | runs-on: ubuntu-latest 21 | steps: 22 | - 23 | name: Get current date 24 | id: date 25 | run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT 26 | - 27 | name: Maximize build disk space 28 | uses: easimon/maximize-build-space@master 29 | with: 30 | overprovision-lvm: 'true' 31 | remove-android: 'true' 32 | - 33 | name: Git checkout 34 | uses: actions/checkout@v4 35 | - 36 | name: Set up QEMU 37 | uses: docker/setup-qemu-action@v3 38 | - 39 | name: Set up Docker Buildx 40 | uses: docker/setup-buildx-action@v3 41 | - 42 | name: Login to Docker Hub 43 | uses: docker/login-action@v3 44 | with: 45 | username: ${{ secrets.DOCKERHUB_USERNAME }} 46 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 47 | - 48 | name: Build and push 'cpu' 49 | uses: docker/build-push-action@v6 50 | with: 51 | context: ./cpu 52 | file: ./cpu/Dockerfile 53 | tags: | 54 | yanwk/comfyui-boot:cpu 55 | yanwk/comfyui-boot:cpu-${{ steps.date.outputs.date }} 56 | push: true 57 | -------------------------------------------------------------------------------- /.github/workflows/build-cu121-megapak.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'cu121-megapak' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # Can be manually triggered 5 | schedule: # Runs on every Monday, 07:00 UTC 6 | - cron: '0 7 * * 1' 7 | push: 8 | branches: [ main ] 9 | paths-ignore: 10 | - '**' 11 | - '!cu121-megapak/Dockerfile' 12 | - '!cu121-megapak/builder-scripts/**' 13 | - '!cu121-megapak/runner-scripts/**' 14 | - '!.github/workflows/build-cu121-megapak.yml' 15 | 16 | jobs: 17 | 18 | build-publish-cu121-megapak: 19 | environment: Publish to Docker Hub 20 | runs-on: ubuntu-latest 21 | steps: 22 | - 23 | name: Get current date 24 | id: date 25 | run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT 26 | - 27 | name: Maximize build disk space 28 | uses: easimon/maximize-build-space@master 29 | with: 30 | overprovision-lvm: 'true' 31 | remove-android: 'true' 32 | - 33 | name: Git checkout 34 | uses: actions/checkout@v4 35 | - 36 | name: Set up QEMU 37 | uses: docker/setup-qemu-action@v3 38 | - 39 | name: Set up Docker Buildx 40 | uses: docker/setup-buildx-action@v3 41 | - 42 | name: Login to Docker Hub 43 | uses: docker/login-action@v3 44 | with: 45 | username: ${{ secrets.DOCKERHUB_USERNAME }} 46 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 47 | - 48 | name: Build and push 'cu121-megapak' 49 | uses: docker/build-push-action@v6 50 | with: 51 | context: ./cu121-megapak 52 | file: ./cu121-megapak/Dockerfile 53 | tags: | 54 | yanwk/comfyui-boot:cu121-megapak 55 | yanwk/comfyui-boot:cu121-megapak-${{ steps.date.outputs.date }} 56 | push: true 57 | -------------------------------------------------------------------------------- /.github/workflows/build-cu121.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'cu121' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # Can be manually triggered 5 | schedule: # Runs on every Monday, 07:00 UTC 6 | - cron: '0 7 * * 1' 7 | push: 8 | branches: [ main ] 9 | paths-ignore: 10 | - '**' 11 | - '!cu121/Dockerfile' 12 | - '!cu121/scripts/**' 13 | - '!.github/workflows/build-cu121.yml' 14 | 15 | 16 | jobs: 17 | 18 | build-publish-cu121: 19 | environment: Publish to Docker Hub 20 | runs-on: ubuntu-latest 21 | steps: 22 | - 23 | name: Get current date 24 | id: date 25 | run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT 26 | - 27 | name: Maximize build disk space 28 | uses: easimon/maximize-build-space@master 29 | with: 30 | overprovision-lvm: 'true' 31 | remove-android: 'true' 32 | - 33 | name: Git checkout 34 | uses: actions/checkout@v4 35 | - 36 | name: Set up QEMU 37 | uses: docker/setup-qemu-action@v3 38 | - 39 | name: Set up Docker Buildx 40 | uses: docker/setup-buildx-action@v3 41 | - 42 | name: Login to Docker Hub 43 | uses: docker/login-action@v3 44 | with: 45 | username: ${{ secrets.DOCKERHUB_USERNAME }} 46 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 47 | - 48 | name: Build and push 'cu121' 49 | uses: docker/build-push-action@v6 50 | with: 51 | context: ./cu121 52 | file: ./cu121/Dockerfile 53 | tags: | 54 | yanwk/comfyui-boot:cu121 55 | yanwk/comfyui-boot:cu121-${{ steps.date.outputs.date }} 56 | push: true 57 | -------------------------------------------------------------------------------- /.github/workflows/build-cu124-cn.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'cu124-cn' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # 可以手动触发 5 | schedule: # 每周一 07:00 UTC 自动运行 6 | - cron: '0 7 * * 1' 7 | push: 8 | branches: [ main ] 9 | paths-ignore: 10 | - '**' 11 | - '!cu124-cn/Dockerfile' 12 | - '!cu124-cn/builder-scripts/**' 13 | - '!cu124-cn/runner-scripts/**' 14 | - '!.github/workflows/build-cu124-cn.yml' 15 | 16 | jobs: 17 | 18 | build-publish-cu124-cn: 19 | environment: Publish to Docker Hub 20 | runs-on: ubuntu-latest 21 | steps: 22 | - 23 | name: Get current date 24 | id: date 25 | run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT 26 | - 27 | name: Maximize build disk space 28 | uses: easimon/maximize-build-space@master 29 | with: 30 | overprovision-lvm: 'true' 31 | remove-android: 'true' 32 | - 33 | name: Git checkout 34 | uses: actions/checkout@v4 35 | - 36 | name: Set up QEMU 37 | uses: docker/setup-qemu-action@v3 38 | - 39 | name: Set up Docker Buildx 40 | uses: docker/setup-buildx-action@v3 41 | - 42 | name: Login to Docker Hub 43 | uses: docker/login-action@v3 44 | with: 45 | username: ${{ secrets.DOCKERHUB_USERNAME }} 46 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 47 | - 48 | name: Build and push 'cu124-cn' 49 | uses: docker/build-push-action@v6 50 | with: 51 | context: ./cu124-cn 52 | file: ./cu124-cn/Dockerfile 53 | tags: | 54 | yanwk/comfyui-boot:cu124-cn 55 | yanwk/comfyui-boot:cu124-cn-${{ steps.date.outputs.date }} 56 | push: true 57 | -------------------------------------------------------------------------------- /.github/workflows/build-cu124-megapak.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'cu124-megapak' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # Can be manually triggered 5 | schedule: # Runs on every Monday, 07:00 UTC 6 | - cron: '0 7 * * 1' 7 | push: 8 | branches: [ main ] 9 | paths-ignore: 10 | - '**' 11 | - '!cu124-megapak/Dockerfile' 12 | - '!cu124-megapak/builder-scripts/**' 13 | - '!cu124-megapak/runner-scripts/**' 14 | - '!.github/workflows/build-cu124-megapak.yml' 15 | 16 | jobs: 17 | 18 | build-publish-cu124-megapak: 19 | environment: Publish to Docker Hub 20 | runs-on: ubuntu-latest 21 | steps: 22 | - 23 | name: Get current date 24 | id: date 25 | run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT 26 | - 27 | name: Maximize build disk space 28 | uses: easimon/maximize-build-space@master 29 | with: 30 | overprovision-lvm: 'true' 31 | remove-android: 'true' 32 | - 33 | name: Git checkout 34 | uses: actions/checkout@v4 35 | - 36 | name: Set up QEMU 37 | uses: docker/setup-qemu-action@v3 38 | - 39 | name: Set up Docker Buildx 40 | uses: docker/setup-buildx-action@v3 41 | - 42 | name: Login to Docker Hub 43 | uses: docker/login-action@v3 44 | with: 45 | username: ${{ secrets.DOCKERHUB_USERNAME }} 46 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 47 | - 48 | name: Build and push 'cu124-megapak' 49 | uses: docker/build-push-action@v6 50 | with: 51 | context: ./cu124-megapak 52 | file: ./cu124-megapak/Dockerfile 53 | tags: | 54 | yanwk/comfyui-boot:cu124-megapak 55 | yanwk/comfyui-boot:cu124-megapak-${{ steps.date.outputs.date }} 56 | push: true 57 | -------------------------------------------------------------------------------- /.github/workflows/build-cu124-slim.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'cu124-slim' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # Can be manually triggered 5 | schedule: # Runs on every Monday, 07:00 UTC 6 | - cron: '0 7 * * 1' 7 | push: 8 | branches: [ main ] 9 | paths-ignore: 10 | - '**' 11 | - '!cu124-slim/Dockerfile' 12 | - '!cu124-slim/builder-scripts/**' 13 | - '!cu124-slim/runner-scripts/**' 14 | - '!.github/workflows/build-cu124-slim.yml' 15 | 16 | jobs: 17 | 18 | build-publish-cu124-slim: 19 | environment: Publish to Docker Hub 20 | runs-on: ubuntu-latest 21 | steps: 22 | - 23 | name: Get current date 24 | id: date 25 | run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT 26 | - 27 | name: Maximize build disk space 28 | uses: easimon/maximize-build-space@master 29 | with: 30 | overprovision-lvm: 'true' 31 | remove-android: 'true' 32 | - 33 | name: Git checkout 34 | uses: actions/checkout@v4 35 | - 36 | name: Set up QEMU 37 | uses: docker/setup-qemu-action@v3 38 | - 39 | name: Set up Docker Buildx 40 | uses: docker/setup-buildx-action@v3 41 | - 42 | name: Login to Docker Hub 43 | uses: docker/login-action@v3 44 | with: 45 | username: ${{ secrets.DOCKERHUB_USERNAME }} 46 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 47 | - 48 | name: Build and push 'cu124-slim' 49 | uses: docker/build-push-action@v6 50 | with: 51 | context: ./cu124-slim 52 | file: ./cu124-slim/Dockerfile 53 | tags: | 54 | yanwk/comfyui-boot:cu124-slim 55 | yanwk/comfyui-boot:cu124-slim-${{ steps.date.outputs.date }} 56 | push: true 57 | -------------------------------------------------------------------------------- /.github/workflows/build-cu126-slim.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'cu126-slim' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # Can be manually triggered 5 | schedule: # Runs on every Monday, 07:00 UTC 6 | - cron: '0 7 * * 1' 7 | push: 8 | branches: [ main ] 9 | paths-ignore: 10 | - '**' 11 | - '!cu126-slim/Dockerfile' 12 | - '!cu126-slim/builder-scripts/**' 13 | - '!cu126-slim/runner-scripts/**' 14 | - '!.github/workflows/build-cu126-slim.yml' 15 | 16 | jobs: 17 | 18 | build-publish-cu126-slim: 19 | environment: Publish to Docker Hub 20 | runs-on: ubuntu-latest 21 | steps: 22 | - 23 | name: Get current date 24 | id: date 25 | run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT 26 | - 27 | name: Maximize build disk space 28 | uses: easimon/maximize-build-space@master 29 | with: 30 | overprovision-lvm: 'true' 31 | remove-android: 'true' 32 | - 33 | name: Git checkout 34 | uses: actions/checkout@v4 35 | - 36 | name: Set up QEMU 37 | uses: docker/setup-qemu-action@v3 38 | - 39 | name: Set up Docker Buildx 40 | uses: docker/setup-buildx-action@v3 41 | - 42 | name: Login to Docker Hub 43 | uses: docker/login-action@v3 44 | with: 45 | username: ${{ secrets.DOCKERHUB_USERNAME }} 46 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 47 | - 48 | name: Build and push 'cu126-slim' 49 | uses: docker/build-push-action@v6 50 | with: 51 | context: ./cu126-slim 52 | file: ./cu126-slim/Dockerfile 53 | tags: | 54 | yanwk/comfyui-boot:cu126-slim 55 | yanwk/comfyui-boot:cu126-slim-${{ steps.date.outputs.date }} 56 | push: true 57 | -------------------------------------------------------------------------------- /.github/workflows/build-cu128-test.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'cu128-test' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # Can be manually triggered 5 | schedule: # Runs on every Monday, 07:00 UTC 6 | - cron: '0 7 * * 1' 7 | push: 8 | branches: [ main ] 9 | paths-ignore: 10 | - '**' 11 | - '!cu128-test/Dockerfile' 12 | - '!cu128-test/builder-scripts/**' 13 | - '!cu128-test/runner-scripts/**' 14 | - '!.github/workflows/build-cu128-test.yml' 15 | 16 | jobs: 17 | 18 | build-publish-cu128-test: 19 | environment: Publish to Docker Hub 20 | runs-on: ubuntu-latest 21 | steps: 22 | - 23 | name: Get current date 24 | id: date 25 | run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT 26 | - 27 | name: Maximize build disk space 28 | uses: easimon/maximize-build-space@master 29 | with: 30 | overprovision-lvm: 'true' 31 | remove-android: 'true' 32 | - 33 | name: Git checkout 34 | uses: actions/checkout@v4 35 | - 36 | name: Set up QEMU 37 | uses: docker/setup-qemu-action@v3 38 | - 39 | name: Set up Docker Buildx 40 | uses: docker/setup-buildx-action@v3 41 | - 42 | name: Login to Docker Hub 43 | uses: docker/login-action@v3 44 | with: 45 | username: ${{ secrets.DOCKERHUB_USERNAME }} 46 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 47 | - 48 | name: Build and push 'cu128-test' 49 | uses: docker/build-push-action@v6 50 | with: 51 | context: ./cu128-test 52 | file: ./cu128-test/Dockerfile 53 | tags: | 54 | yanwk/comfyui-boot:cu128-test 55 | yanwk/comfyui-boot:cu128-test-${{ steps.date.outputs.date }} 56 | push: true 57 | -------------------------------------------------------------------------------- /.github/workflows/build-direct3ds2.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'direct3ds2' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # Can be manually triggered 5 | push: 6 | branches: [ main ] 7 | paths-ignore: 8 | - '**' 9 | - '!direct3ds2/Dockerfile' 10 | - '!direct3ds2/builder-scripts/**' 11 | - '!direct3ds2/runner-scripts/**' 12 | - '!.github/workflows/build-direct3ds2.yml' 13 | 14 | 15 | jobs: 16 | 17 | build-publish-direct3ds2: 18 | environment: Publish to Docker Hub 19 | runs-on: ubuntu-latest 20 | steps: 21 | - 22 | name: Maximize build disk space 23 | uses: easimon/maximize-build-space@master 24 | with: 25 | overprovision-lvm: 'true' 26 | remove-android: 'true' 27 | - 28 | name: Git checkout 29 | uses: actions/checkout@v4 30 | - 31 | name: Set up QEMU 32 | uses: docker/setup-qemu-action@v3 33 | - 34 | name: Set up Docker Buildx 35 | uses: docker/setup-buildx-action@v3 36 | - 37 | name: Login to Docker Hub 38 | uses: docker/login-action@v3 39 | with: 40 | username: ${{ secrets.DOCKERHUB_USERNAME }} 41 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 42 | - 43 | name: Build and push 'direct3ds2' 44 | uses: docker/build-push-action@v6 45 | with: 46 | context: ./direct3ds2 47 | file: ./direct3ds2/Dockerfile 48 | tags: | 49 | yanwk/comfyui-boot:direct3ds2 50 | push: true 51 | -------------------------------------------------------------------------------- /.github/workflows/build-nightly.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'nightly' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # Can be manually triggered 5 | schedule: # Runs on every Friday, at 00:00 UTC 6 | - cron: '0 0 * * 5' 7 | push: 8 | branches: [ main ] 9 | paths-ignore: 10 | - '**' 11 | - '!nightly/Dockerfile' 12 | - '!.github/workflows/build-nightly.yml' 13 | 14 | jobs: 15 | 16 | build-publish-nightly: 17 | environment: Publish to Docker Hub 18 | runs-on: ubuntu-latest 19 | steps: 20 | - 21 | name: Get current commit hash 22 | id: commit 23 | uses: prompt/actions-commit-hash@v3 24 | - 25 | name: Get current date 26 | id: date 27 | run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT 28 | - 29 | name: Maximize build disk space 30 | uses: easimon/maximize-build-space@master 31 | with: 32 | overprovision-lvm: 'true' 33 | remove-android: 'true' 34 | - 35 | name: Git checkout 36 | uses: actions/checkout@v4 37 | - 38 | name: Set up QEMU 39 | uses: docker/setup-qemu-action@v3 40 | - 41 | name: Set up Docker Buildx 42 | uses: docker/setup-buildx-action@v3 43 | - 44 | name: Login to Docker Hub 45 | uses: docker/login-action@v3 46 | with: 47 | username: ${{ secrets.DOCKERHUB_USERNAME }} 48 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 49 | - 50 | name: Build and push 'nightly' 51 | uses: docker/build-push-action@v6 52 | with: 53 | context: ./nightly 54 | file: ./nightly/Dockerfile 55 | tags: | 56 | yanwk/comfyui-boot:nightly 57 | yanwk/comfyui-boot:nightly-${{ steps.date.outputs.date }}-${{ steps.commit.outputs.short }} 58 | push: true 59 | -------------------------------------------------------------------------------- /.github/workflows/build-rocm.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'rocm' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # Can be manually triggered 5 | # schedule: # Runs on every Monday, 07:00 UTC 6 | # - cron: '0 7 * * 1' 7 | # push: 8 | # branches: [ main ] 9 | # paths-ignore: 10 | # - '**' 11 | # - '!rocm/Dockerfile' 12 | # - '!rocm/runner-scripts/**' 13 | # - '!.github/workflows/build-rocm.yml' 14 | 15 | 16 | jobs: 17 | 18 | build-publish-rocm: 19 | environment: Publish to Docker Hub 20 | runs-on: ubuntu-latest 21 | steps: 22 | - 23 | name: Get current date 24 | id: date 25 | run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT 26 | - 27 | name: Maximize build disk space 28 | uses: easimon/maximize-build-space@master 29 | with: 30 | overprovision-lvm: 'true' 31 | remove-android: 'true' 32 | remove-dotnet: 'true' 33 | remove-docker-images: 'true' 34 | swap-size-mb: 512 35 | - 36 | name: Git checkout 37 | uses: actions/checkout@v4 38 | - 39 | name: Set up QEMU 40 | uses: docker/setup-qemu-action@v3 41 | - 42 | name: Set up Docker Buildx 43 | uses: docker/setup-buildx-action@v3 44 | - 45 | name: Login to Docker Hub 46 | uses: docker/login-action@v3 47 | with: 48 | username: ${{ secrets.DOCKERHUB_USERNAME }} 49 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 50 | - 51 | name: Build and push 'rocm' 52 | uses: docker/build-push-action@v6 53 | with: 54 | context: ./rocm 55 | file: ./rocm/Dockerfile 56 | tags: | 57 | yanwk/comfyui-boot:rocm 58 | yanwk/comfyui-boot:rocm-${{ steps.date.outputs.date }} 59 | push: true 60 | -------------------------------------------------------------------------------- /.github/workflows/build-xpu.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'xpu' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # Can be manually triggered 5 | 6 | jobs: 7 | 8 | build-publish-xpu: 9 | environment: Publish to Docker Hub 10 | runs-on: ubuntu-latest 11 | steps: 12 | - 13 | name: Get current date 14 | id: date 15 | run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT 16 | - 17 | name: Maximize build disk space 18 | uses: easimon/maximize-build-space@master 19 | with: 20 | overprovision-lvm: 'true' 21 | remove-android: 'true' 22 | remove-dotnet: 'true' 23 | remove-docker-images: 'true' 24 | swap-size-mb: 512 25 | - 26 | name: Git checkout 27 | uses: actions/checkout@v4 28 | - 29 | name: Set up QEMU 30 | uses: docker/setup-qemu-action@v3 31 | - 32 | name: Set up Docker Buildx 33 | uses: docker/setup-buildx-action@v3 34 | - 35 | name: Login to Docker Hub 36 | uses: docker/login-action@v3 37 | with: 38 | username: ${{ secrets.DOCKERHUB_USERNAME }} 39 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 40 | - 41 | name: Build and push 'xpu' 42 | uses: docker/build-push-action@v6 43 | with: 44 | context: ./xpu 45 | file: ./xpu/Dockerfile 46 | tags: | 47 | yanwk/comfyui-boot:xpu 48 | yanwk/comfyui-boot:xpu-${{ steps.date.outputs.date }} 49 | push: true 50 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/storage/ 2 | /.vscode/ 3 | -------------------------------------------------------------------------------- /README.adoc: -------------------------------------------------------------------------------- 1 | # Docker images for ComfyUI 2 | 3 | *link:README.zh.adoc[>💡中文说明点我💡<]* 4 | 5 | This repo is for 6 | https://hub.docker.com/r/yanwk/comfyui-boot[Docker images] 7 | that runs 8 | https://github.com/comfyanonymous/ComfyUI[ComfyUI] - 9 | a Stable Diffusion GUI powering node-based workflow. 10 | 11 | ## Quick Start - NVIDIA GPU 12 | 13 | ```sh 14 | mkdir -p storage 15 | 16 | docker run -it --rm \ 17 | --name comfyui-cu124 \ 18 | --gpus all \ 19 | -p 8188:8188 \ 20 | -v "$(pwd)"/storage:/root \ 21 | -e CLI_ARGS="" \ 22 | yanwk/comfyui-boot:cu124-slim 23 | ``` 24 | 25 | 26 | ## Image tags 27 | 28 | * link:cu121/README.adoc[`cu121`] 29 | 30 | ** Easy for ComfyUI beginners. Starts with ComfyUI, ComfyUI-Manager and the Photon (SD1.5) model. 31 | ** Using a low-privilege user within the container (easy for WSL2 deploy). 32 | ** Not recommended for Podman or rootless deploy (use any image below instead). 33 | ** Using CUDA 12.1 + Python 3.11. 34 | 35 | * link:cu124-slim/README.adoc[`cu124-slim`] 36 | 37 | ** Similar to `cu121`, equipped with many dependencies, starts with ComfyUI and ComfyUI-Manager only. 38 | ** Downloads less. No SD model included. 39 | ** Using 'root' user within the container (easy for rootless deploy). 40 | ** Using CUDA 12.4 + Python 3.12. 41 | 42 | * link:cu121-megapak/README.adoc[`cu121-megapak`] 43 | 44 | ** All-in-one bundle, including dev kits. 45 | ** Using CUDA 12.1 + Python 3.11. 46 | 47 | * link:cu124-megapak/README.adoc[`cu124-megapak`] 48 | 49 | ** All-in-one bundle, including dev kits. 50 | ** Using CUDA 12.4 + Python 3.12. 51 | 52 | * link:cu124-cn/README.adoc[`cu124-cn`] 53 | 54 | ** For users in mainland China. Using mirror sites for all download links. 55 | 56 | * link:rocm/README.adoc[`rocm`] 57 | 58 | ** For AMD GPUs with ROCm. 59 | 60 | * link:nightly/README.adoc[`nightly`] 61 | 62 | ** Using preview version of PyTorch. 63 | 64 | * link:comfy3d-pt25/README.adoc[`comfy3d-pt25`] 65 | 66 | ** Image dedicated for https://github.com/MrForExample/ComfyUI-3D-Pack[ComfyUI-3D-Pack]. 67 | 68 | 69 | ## License 70 | 71 | link:LICENSE[Mulan Public License,Version 2] 72 | 73 | This open source license is written and valid both in Chinese and English, how good is that! 74 | -------------------------------------------------------------------------------- /README.zh.adoc: -------------------------------------------------------------------------------- 1 | # 用于 ComfyUI 的 Docker 镜像 2 | 3 | https://github.com/comfyanonymous/ComfyUI[ComfyUI] 4 | 是一套使用节点工作流的 Stable Diffusion 图形界面。 + 5 | 本仓库所构建的 6 | https://hub.docker.com/r/yanwk/comfyui-boot[Docker 镜像] 7 | 包含其依赖项,及下载/启动脚本。 8 | 9 | 10 | ## 镜像标签 11 | 12 | * link:cu124-cn/README.adoc[`cu124-cn`] 13 | 14 | ** 针对国内网络环境重写 15 | ** 从下载到首次启动均无需代理 16 | ** 提供整合与精简两种安装方式 17 | ** 额外提供 `Dockerfile-cn` 以便本地构建 18 | ** 推荐初次尝试 ComfyUI 的国内用户使用 19 | 20 | * link:cu121/README.zh.adoc[`cu121`] 21 | 22 | ** 经典版本,简洁易上手,但需要良好的网络连接 23 | ** 默认仅安装基本的 ComfyUI 与 Manager 24 | ** 镜像中预装大量依赖项,方便后续无痛安装热门自定义节点(扩展插件) 25 | ** 容器内使用低特权用户运行(便于 WSL2 部署,仅该镜像如此设计) 26 | ** 不推荐 Podman 与 rootless 用户使用(改用本仓库内其他镜像均可) 27 | ** 使用 CUDA 12.1 与 Python 3.11 28 | 29 | * link:cu121-megapak/README.zh.adoc[`cu121-megapak`] 30 | 31 | ** 大型整合包,包含开发组件 32 | ** 容器内使用 root 用户运行(便于 rootless 部署) 33 | ** 使用 CUDA 12.1 与 Python 3.11 34 | 35 | * link:cu124-megapak/README.zh.adoc[`cu124-megapak`] 36 | 37 | ** 同上,但使用 CUDA 12.4 与 Python 3.12(在新 GPU 上可能性能更佳) 38 | 39 | * link:rocm/README.zh.adoc[`rocm`] 40 | 41 | ** 适用于 AMD GPU 42 | 43 | * link:nightly/README.adoc[`nightly`] 44 | 45 | ** 使用最新预览版的 PyTorch 46 | 47 | * link:comfy3d-pt25/README.zh.adoc[`comfy3d-pt25`] 48 | 49 | ** https://github.com/MrForExample/ComfyUI-3D-Pack[ComfyUI-3D-Pack] 专用镜像 50 | 51 | 52 | ## 声明 53 | 54 | 代码使用 55 | link:LICENSE[木兰公共许可证, 第2版] 。 56 | 中英双语哦! 57 | -------------------------------------------------------------------------------- /archived/.github/workflows/build-base-cu124-pt25.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'base-cu124-pt25' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # Can be manually triggered 5 | push: 6 | branches: [ main ] 7 | paths-ignore: 8 | - '**' 9 | - '!base-cu124-pt25/Dockerfile' 10 | - '!.github/workflows/build-base-cu124-pt25.yml' 11 | 12 | 13 | jobs: 14 | 15 | build-publish-base-cu124-pt25: 16 | environment: Publish to Docker Hub 17 | runs-on: ubuntu-latest 18 | steps: 19 | - 20 | name: Maximize build disk space 21 | uses: easimon/maximize-build-space@master 22 | with: 23 | overprovision-lvm: 'true' 24 | remove-android: 'true' 25 | - 26 | name: Git checkout 27 | uses: actions/checkout@v4 28 | - 29 | name: Set up QEMU 30 | uses: docker/setup-qemu-action@v3 31 | - 32 | name: Set up Docker Buildx 33 | uses: docker/setup-buildx-action@v3 34 | - 35 | name: Login to Docker Hub 36 | uses: docker/login-action@v3 37 | with: 38 | username: ${{ secrets.DOCKERHUB_USERNAME }} 39 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 40 | - 41 | name: Build and push 'base-cu124-pt25' 42 | uses: docker/build-push-action@v6 43 | with: 44 | context: ./base-cu124-pt25 45 | file: ./base-cu124-pt25/Dockerfile 46 | tags: | 47 | yanwk/comfyui-boot:base-cu124-pt25 48 | push: true 49 | -------------------------------------------------------------------------------- /archived/.github/workflows/build-base-cu124.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'base-cu124' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # Can be manually triggered 5 | push: 6 | branches: [ main ] 7 | paths-ignore: 8 | - '**' 9 | - '!base-cu124/Dockerfile' 10 | - '!.github/workflows/build-base-cu124.yml' 11 | 12 | 13 | jobs: 14 | 15 | build-publish-base-cu124: 16 | environment: Publish to Docker Hub 17 | runs-on: ubuntu-latest 18 | steps: 19 | - 20 | name: Maximize build disk space 21 | uses: easimon/maximize-build-space@master 22 | with: 23 | overprovision-lvm: 'true' 24 | remove-android: 'true' 25 | - 26 | name: Git checkout 27 | uses: actions/checkout@v4 28 | - 29 | name: Set up QEMU 30 | uses: docker/setup-qemu-action@v3 31 | - 32 | name: Set up Docker Buildx 33 | uses: docker/setup-buildx-action@v3 34 | - 35 | name: Login to Docker Hub 36 | uses: docker/login-action@v3 37 | with: 38 | username: ${{ secrets.DOCKERHUB_USERNAME }} 39 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 40 | - 41 | name: Build and push 'base-cu124' 42 | uses: docker/build-push-action@v6 43 | with: 44 | context: ./base-cu124 45 | file: ./base-cu124/Dockerfile 46 | tags: | 47 | yanwk/comfyui-boot:base-cu124 48 | push: true 49 | -------------------------------------------------------------------------------- /archived/.github/workflows/build-comfy3d-pt22.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'comfy3d-pt22' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # Can be manually triggered 5 | push: 6 | branches: [ main ] 7 | paths-ignore: 8 | - '**' 9 | - '!comfy3d-pt22/Dockerfile' 10 | - '!comfy3d-pt22/runner-scripts/**' 11 | - '!.github/workflows/build-comfy3d-pt22.yml' 12 | 13 | 14 | jobs: 15 | 16 | build-publish-comfy3d-pt22: 17 | environment: Publish to Docker Hub 18 | runs-on: ubuntu-latest 19 | steps: 20 | - 21 | name: Get current date 22 | id: date 23 | run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT 24 | - 25 | name: Maximize build disk space 26 | uses: easimon/maximize-build-space@master 27 | with: 28 | overprovision-lvm: 'true' 29 | remove-android: 'true' 30 | - 31 | name: Git checkout 32 | uses: actions/checkout@v4 33 | - 34 | name: Set up QEMU 35 | uses: docker/setup-qemu-action@v3 36 | - 37 | name: Set up Docker Buildx 38 | uses: docker/setup-buildx-action@v3 39 | - 40 | name: Login to Docker Hub 41 | uses: docker/login-action@v3 42 | with: 43 | username: ${{ secrets.DOCKERHUB_USERNAME }} 44 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 45 | - 46 | name: Build and push 'comfy3d-pt22' 47 | uses: docker/build-push-action@v6 48 | with: 49 | context: ./comfy3d-pt22 50 | file: ./comfy3d-pt22/Dockerfile 51 | tags: | 52 | yanwk/comfyui-boot:comfy3d-pt22 53 | yanwk/comfyui-boot:comfy3d-pt22-${{ steps.date.outputs.date }} 54 | push: true 55 | -------------------------------------------------------------------------------- /archived/.github/workflows/build-comfy3d-pt23.yml: -------------------------------------------------------------------------------- 1 | name: Publish 'comfy3d-pt23' to Docker Hub 2 | 3 | on: 4 | workflow_dispatch: # Can be manually triggered 5 | push: 6 | branches: [ main ] 7 | paths-ignore: 8 | - '**' 9 | - '!comfy3d-pt23/Dockerfile' 10 | - '!comfy3d-pt23/runner-scripts/**' 11 | - '!.github/workflows/build-comfy3d-pt23.yml' 12 | 13 | 14 | jobs: 15 | 16 | build-publish-comfy3d-pt23: 17 | environment: Publish to Docker Hub 18 | runs-on: ubuntu-latest 19 | steps: 20 | - 21 | name: Get current date 22 | id: date 23 | run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT 24 | - 25 | name: Maximize build disk space 26 | uses: easimon/maximize-build-space@master 27 | with: 28 | overprovision-lvm: 'true' 29 | remove-android: 'true' 30 | - 31 | name: Git checkout 32 | uses: actions/checkout@v4 33 | - 34 | name: Set up QEMU 35 | uses: docker/setup-qemu-action@v3 36 | - 37 | name: Set up Docker Buildx 38 | uses: docker/setup-buildx-action@v3 39 | - 40 | name: Login to Docker Hub 41 | uses: docker/login-action@v3 42 | with: 43 | username: ${{ secrets.DOCKERHUB_USERNAME }} 44 | password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }} 45 | - 46 | name: Build and push 'comfy3d-pt23' 47 | uses: docker/build-push-action@v6 48 | with: 49 | context: ./comfy3d-pt23 50 | file: ./comfy3d-pt23/Dockerfile 51 | tags: | 52 | yanwk/comfyui-boot:comfy3d-pt23 53 | yanwk/comfyui-boot:comfy3d-pt23-${{ steps.date.outputs.date }} 54 | push: true 55 | -------------------------------------------------------------------------------- /archived/base-cu124-pt25/Dockerfile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Dockerfile that builds 'yanwk/comfyui-boot:base-cu124-pt25' 3 | # An environment for PyTorch 2.5, CUDA 12.4, Python 3.12 4 | ################################################################################ 5 | 6 | FROM yanwk/comfyui-boot:base-cu124 7 | 8 | LABEL maintainer="YAN Wenkun " 9 | 10 | RUN set -eu 11 | 12 | RUN --mount=type=cache,target=/var/cache/zypp \ 13 | zypper --gpg-auto-import-keys \ 14 | dist-upgrade --no-confirm --no-recommends --auto-agree-with-licenses 15 | 16 | ################################################################################ 17 | # PyTorch Packages 18 | 19 | RUN --mount=type=cache,target=/root/.cache/pip \ 20 | pip list \ 21 | && pip install \ 22 | --upgrade pip wheel setuptools 23 | 24 | ARG PIP_INDEX_URL="https://download.pytorch.org/whl/cu124" 25 | ARG PIP_EXTRA_INDEX_URL="https://pypi.org/simple" 26 | 27 | RUN --mount=type=cache,target=/root/.cache/pip \ 28 | pip install \ 29 | --dry-run xformers==0.0.29.post1 torch==2.5.1 torchvision torchaudio 30 | 31 | RUN --mount=type=cache,target=/root/.cache/pip \ 32 | pip install \ 33 | --no-deps torch==2.5.1 34 | 35 | RUN --mount=type=cache,target=/root/.cache/pip \ 36 | pip install \ 37 | --no-deps xformers==0.0.29.post1 torch==2.5.1 38 | 39 | RUN --mount=type=cache,target=/root/.cache/pip \ 40 | pip install \ 41 | xformers==0.0.29.post1 torch==2.5.1 torchvision torchaudio 42 | 43 | ARG PIP_INDEX_URL= 44 | ARG PIP_EXTRA_INDEX_URL= 45 | 46 | # Bind libs (.so files) 47 | # Even we have CUDA installed by Zypper, we still need to install CUDA libs for Python in order to run PyTorch. 48 | # What's more, NVIDIA's openSUSE15 repo didn't provide CuDNN & NCCL, we have to use Python packages anyway. 49 | ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}\ 50 | :/usr/local/lib64/python3.12/site-packages/torch/lib\ 51 | :/usr/local/lib/python3.12/site-packages/nvidia/cuda_cupti/lib\ 52 | :/usr/local/lib/python3.12/site-packages/nvidia/cuda_runtime/lib\ 53 | :/usr/local/lib/python3.12/site-packages/nvidia/cudnn/lib\ 54 | :/usr/local/lib/python3.12/site-packages/nvidia/cufft/lib\ 55 | :/usr/local/lib/python3.12/site-packages/nvidia/cublas/lib\ 56 | :/usr/local/lib/python3.12/site-packages/nvidia/cuda_nvrtc/lib\ 57 | :/usr/local/lib/python3.12/site-packages/nvidia/curand/lib\ 58 | :/usr/local/lib/python3.12/site-packages/nvidia/cusolver/lib\ 59 | :/usr/local/lib/python3.12/site-packages/nvidia/cusparse/lib\ 60 | :/usr/local/lib/python3.12/site-packages/nvidia/nccl/lib\ 61 | :/usr/local/lib/python3.12/site-packages/nvidia/nvjitlink/lib\ 62 | :/usr/local/lib/python3.12/site-packages/nvidia/nvtx/lib" 63 | -------------------------------------------------------------------------------- /archived/comfy3d-pt22/README.adoc: -------------------------------------------------------------------------------- 1 | # Docker Image for Comfy3D 2 | 3 | This `comfy3d-pt22` Docker image is archived and will no longer receive updates. 4 | 5 | However, it may be useful if you need to run older version of Comfy3D. 6 | 7 | https://hub.docker.com/r/yanwk/comfyui-boot/tags?name=comfy3d-pt22[View on ] 8 | 9 | 10 | * By default, install only ComfyUI, ComfyUI-Manager, ComfyUI-3D-Pack 11 | 12 | * Comfy3D version: 13 | ** https://github.com/MrForExample/ComfyUI-3D-Pack/tree/3b4e715939376634c68aa4c1c7d4ea4a8665c098[3b4e715] 14 | (Jun 23, 2024) 15 | 16 | * Dev kits: 17 | ** CUDA dev kit (12.1) 18 | ** Python dev package (3.11) 19 | ** GCC C++ (11) 20 | 21 | * Key Components: 22 | ** torch==2.2.2+cu121 23 | ** xformers==0.0.25.post1 24 | 25 | ## Usage 26 | 27 | .Run with Docker 28 | [source,sh] 29 | ---- 30 | mkdir -p storage 31 | 32 | docker run -it --rm \ 33 | --name comfy3d-pt22 \ 34 | --gpus all \ 35 | -p 8188:8188 \ 36 | -v "$(pwd)"/storage:/root \ 37 | -e CLI_ARGS="" \ 38 | yanwk/comfyui-boot:comfy3d-pt22 39 | ---- 40 | 41 | .Run with Podman 42 | [source,sh] 43 | ---- 44 | mkdir -p storage 45 | 46 | podman run -it --rm \ 47 | --name comfy3d-pt22 \ 48 | --device nvidia.com/gpu=all \ 49 | --security-opt label=disable \ 50 | -p 8188:8188 \ 51 | -v "$(pwd)"/storage:/root \ 52 | -e CLI_ARGS="" \ 53 | docker.io/yanwk/comfyui-boot:comfy3d-pt22 54 | ---- 55 | -------------------------------------------------------------------------------- /archived/comfy3d-pt22/README.zh.adoc: -------------------------------------------------------------------------------- 1 | # Comfy3D 单独镜像 2 | 3 | 本镜像 `comfy3d-pt22` 不再更新。如果你需要运行旧版 Comfy3D,它可能会有用。 4 | 5 | https://hub.docker.com/r/yanwk/comfyui-boot/tags?name=comfy3d-pt22[在 上查看] 6 | 7 | 8 | * 默认仅安装 ComfyUI, ComfyUI-Manager, ComfyUI-3D-Pack 9 | 10 | * Comfy3D 版本: 11 | ** https://github.com/MrForExample/ComfyUI-3D-Pack/tree/3b4e715939376634c68aa4c1c7d4ea4a8665c098[3b4e715] 12 | (2024/06/23) 13 | 14 | * 开发组件: 15 | ** CUDA dev kit (12.1) 16 | ** Python dev package (3.11) 17 | ** GCC C++ (11) 18 | 19 | * 关键组件: 20 | ** torch==2.2.3+cu121 21 | ** xformers==0.0.25.post1 22 | 23 | ## 用法 24 | 25 | .使用 Docker 26 | [source,sh] 27 | ---- 28 | mkdir -p storage 29 | 30 | docker run -it --rm \ 31 | --name comfy3d-pt22 \ 32 | --gpus all \ 33 | -p 8188:8188 \ 34 | -v "$(pwd)"/storage:/root \ 35 | -e CLI_ARGS="" \ 36 | yanwk/comfyui-boot:comfy3d-pt22 37 | ---- 38 | 39 | .使用 Podman 40 | [source,sh] 41 | ---- 42 | mkdir -p storage 43 | 44 | podman run -it --rm \ 45 | --name comfy3d-pt22 \ 46 | --device nvidia.com/gpu=all \ 47 | --security-opt label=disable \ 48 | -p 8188:8188 \ 49 | -v "$(pwd)"/storage:/root \ 50 | -e CLI_ARGS="" \ 51 | docker.io/yanwk/comfyui-boot:comfy3d-pt22 52 | ---- 53 | 54 | -------------------------------------------------------------------------------- /archived/comfy3d-pt22/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | comfyui: 4 | init: true 5 | container_name: comfy3d-pt22 6 | build: 7 | context: . 8 | dockerfile: Dockerfile 9 | image: "yanwk/comfyui-boot:comfy3d-pt22" 10 | ports: 11 | - "8188:8188" 12 | volumes: 13 | - "./storage:/root" 14 | environment: 15 | - CLI_ARGS= 16 | security_opt: 17 | - "label=type:nvidia_container_t" 18 | deploy: 19 | resources: 20 | reservations: 21 | devices: 22 | - driver: nvidia 23 | device_ids: ['0'] 24 | capabilities: [gpu] 25 | -------------------------------------------------------------------------------- /archived/comfy3d-pt22/runner-scripts/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | # Regex that matches REPO_NAME 6 | # First from pattern [https://example.com/xyz/REPO_NAME.git] or [git@example.com:xyz/REPO_NAME.git] 7 | # Second from pattern [http(s)://example.com/xyz/REPO_NAME] 8 | # They all extract REPO_NAME to BASH_REMATCH[2] 9 | function clone_or_pull () { 10 | if [[ $1 =~ ^(.*[/:])(.*)(\.git)$ ]] || [[ $1 =~ ^(http.*\/)(.*)$ ]]; then 11 | echo "${BASH_REMATCH[2]}" ; 12 | set +e ; 13 | git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules "$1" \ 14 | || git -C "${BASH_REMATCH[2]}" pull --ff-only ; 15 | set -e ; 16 | else 17 | echo "[ERROR] Invalid URL: $1" ; 18 | return 1 ; 19 | fi ; 20 | } 21 | 22 | 23 | echo "########################################" 24 | echo "[INFO] Downloading ComfyUI..." 25 | echo "########################################" 26 | 27 | # Using stable version (has a release tag) 28 | set +e 29 | cd /root 30 | git clone https://github.com/comfyanonymous/ComfyUI.git || git -C ComfyUI pull --ff-only 31 | cd /root/ComfyUI 32 | git reset --hard "$(git tag | grep -e '^v' | sort -V | tail -1)" 33 | set -e 34 | 35 | 36 | echo "########################################" 37 | echo "[INFO] Downloading ComfyUI-3D-Pack..." 38 | echo "########################################" 39 | 40 | cd /root/ComfyUI/custom_nodes 41 | 42 | set +e 43 | git clone --recurse-submodules https://github.com/MrForExample/ComfyUI-3D-Pack.git \ 44 | || git -C "ComfyUI-3D-Pack" pull --ff-only ; 45 | set -e 46 | 47 | git -C "ComfyUI-3D-Pack" reset --hard 3b4e715939376634c68aa4c1c7d4ea4a8665c098 48 | 49 | 50 | # Finish 51 | touch /root/.download-complete 52 | -------------------------------------------------------------------------------- /archived/comfy3d-pt22/runner-scripts/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Run user's set-proxy script 6 | cd /root 7 | if [ ! -f "/root/user-scripts/set-proxy.sh" ] ; then 8 | mkdir -p /root/user-scripts 9 | cp /runner-scripts/set-proxy.sh.example /root/user-scripts/set-proxy.sh 10 | else 11 | echo "[INFO] Running set-proxy script..." 12 | 13 | chmod +x /root/user-scripts/set-proxy.sh 14 | source /root/user-scripts/set-proxy.sh 15 | fi ; 16 | 17 | # Install ComfyUI 18 | cd /root 19 | if [ ! -f "/root/.download-complete" ] ; then 20 | chmod +x /runner-scripts/download.sh 21 | bash /runner-scripts/download.sh 22 | fi ; 23 | 24 | # Run user's pre-start script 25 | cd /root 26 | if [ ! -f "/root/user-scripts/pre-start.sh" ] ; then 27 | mkdir -p /root/user-scripts 28 | cp /runner-scripts/pre-start.sh.example /root/user-scripts/pre-start.sh 29 | else 30 | echo "[INFO] Running pre-start script..." 31 | 32 | chmod +x /root/user-scripts/pre-start.sh 33 | source /root/user-scripts/pre-start.sh 34 | fi ; 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] Starting ComfyUI..." 39 | echo "########################################" 40 | 41 | # Let .pyc files be stored in one place 42 | export PYTHONPYCACHEPREFIX="/root/.cache/pycache" 43 | # Let PIP install packages to /root/.local 44 | export PIP_USER=true 45 | # Add above to PATH 46 | export PATH="${PATH}:/root/.local/bin" 47 | # Suppress [WARNING: Running pip as the 'root' user] 48 | export PIP_ROOT_USER_ACTION=ignore 49 | 50 | cd /root 51 | 52 | python3 ./ComfyUI/main.py --listen --port 8188 ${CLI_ARGS} 53 | -------------------------------------------------------------------------------- /archived/comfy3d-pt22/runner-scripts/pre-start.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo "[INFO] Continue without pre-start script." 5 | -------------------------------------------------------------------------------- /archived/comfy3d-pt22/runner-scripts/set-proxy.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | # Tip: Within containers, you cannot access your host machine via 127.0.0.1. 5 | # You will need "host.docker.internal"(for Docker) or "host.containers.internal"(for Podman) 6 | 7 | # Example of setting proxy 8 | #export HTTP_PROXY=http://host.docker.internal:1081 9 | #export HTTPS_PROXY=$HTTP_PROXY 10 | #export http_proxy=$HTTP_PROXY 11 | #export https_proxy=$HTTP_PROXY 12 | #export NO_PROXY="localhost,*.local,*.internal,[::1],fd00::/7, 13 | #10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16, 14 | #10.*,127.*,169.254.*,172.16.*,172.17.*,172.18.*,172.19.*,172.20.*, 15 | #172.21.*,172.22.*,172.23.*,172.24.*,172.25.*,172.26.*,172.27.*, 16 | #172.28.*,172.29.*,172.30.*,172.31.*,172.32.*,192.168.*, 17 | #*.cn,ghproxy.com,*.ghproxy.com,ghproxy.org,*.ghproxy.org, 18 | #gh-proxy.com,*.gh-proxy.com,ghproxy.net,*.ghproxy.net" 19 | #export no_proxy=$NO_PROXY 20 | #echo "[INFO] Proxy set to $HTTP_PROXY" 21 | 22 | echo "[INFO] Continue without proxy." 23 | -------------------------------------------------------------------------------- /archived/comfy3d-pt23/README.adoc: -------------------------------------------------------------------------------- 1 | # Docker Image for Comfy3D 2 | 3 | This `comfy3d-pt23` Docker image is archived and will no longer receive updates. 4 | 5 | However, it may be useful if you need to run older version of Comfy3D. 6 | 7 | https://hub.docker.com/r/yanwk/comfyui-boot/tags?name=comfy3d-pt23[View on ] 8 | 9 | 10 | * By default, install only ComfyUI, ComfyUI-Manager, ComfyUI-3D-Pack 11 | 12 | * Comfy3D version: 13 | ** https://github.com/MrForExample/ComfyUI-3D-Pack/tree/bdc5e3029ed96d9fa25e651e12fce1553a4422c4[bdc5e30] 14 | (Oct 18, 2024) 15 | 16 | * Dev kits: 17 | ** CUDA dev kit (12.1) 18 | ** Python dev package (3.11) 19 | ** GCC C++ (11) 20 | 21 | * Key Components: 22 | ** torch==2.3.0+cu121 23 | ** xformers==0.0.26.post1 24 | 25 | ## Usage 26 | 27 | .Run with Docker 28 | [source,sh] 29 | ---- 30 | mkdir -p storage 31 | 32 | docker run -it --rm \ 33 | --name comfy3d-pt23 \ 34 | --gpus all \ 35 | -p 8188:8188 \ 36 | -v "$(pwd)"/storage:/root \ 37 | -e CLI_ARGS="" \ 38 | yanwk/comfyui-boot:comfy3d-pt23 39 | ---- 40 | 41 | .Run with Podman 42 | [source,sh] 43 | ---- 44 | mkdir -p storage 45 | 46 | podman run -it --rm \ 47 | --name comfy3d-pt23 \ 48 | --device nvidia.com/gpu=all \ 49 | --security-opt label=disable \ 50 | -p 8188:8188 \ 51 | -v "$(pwd)"/storage:/root \ 52 | -e CLI_ARGS="" \ 53 | docker.io/yanwk/comfyui-boot:comfy3d-pt23 54 | ---- 55 | -------------------------------------------------------------------------------- /archived/comfy3d-pt23/README.zh.adoc: -------------------------------------------------------------------------------- 1 | # Comfy3D 单独镜像 2 | 3 | 本镜像 `comfy3d-pt23` 不再更新。如果你需要运行旧版 Comfy3D,它可能会有用。 4 | 5 | https://hub.docker.com/r/yanwk/comfyui-boot/tags?name=comfy3d-pt23[在 上查看] 6 | 7 | 8 | * 默认仅安装 ComfyUI, ComfyUI-Manager, ComfyUI-3D-Pack 9 | 10 | * Comfy3D 版本: 11 | ** https://github.com/MrForExample/ComfyUI-3D-Pack/tree/bdc5e3029ed96d9fa25e651e12fce1553a4422c4[bdc5e30] 12 | (2024/10/18) 13 | 14 | * 开发组件: 15 | ** CUDA dev kit (12.1) 16 | ** Python dev package (3.11) 17 | ** GCC C++ (11) 18 | 19 | * 关键组件: 20 | ** torch==2.3.0+cu121 21 | ** xformers==0.0.26.post1 22 | 23 | ## 用法 24 | 25 | .使用 Docker 26 | [source,sh] 27 | ---- 28 | mkdir -p storage 29 | 30 | docker run -it --rm \ 31 | --name comfy3d-pt23 \ 32 | --gpus all \ 33 | -p 8188:8188 \ 34 | -v "$(pwd)"/storage:/root \ 35 | -e CLI_ARGS="" \ 36 | yanwk/comfyui-boot:comfy3d-pt23 37 | ---- 38 | 39 | .使用 Podman 40 | [source,sh] 41 | ---- 42 | mkdir -p storage 43 | 44 | podman run -it --rm \ 45 | --name comfy3d-pt23 \ 46 | --device nvidia.com/gpu=all \ 47 | --security-opt label=disable \ 48 | -p 8188:8188 \ 49 | -v "$(pwd)"/storage:/root \ 50 | -e CLI_ARGS="" \ 51 | docker.io/yanwk/comfyui-boot:comfy3d-pt23 52 | ---- 53 | 54 | -------------------------------------------------------------------------------- /archived/comfy3d-pt23/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | comfyui: 4 | init: true 5 | container_name: comfy3d-pt23 6 | build: 7 | context: . 8 | dockerfile: Dockerfile 9 | image: "yanwk/comfyui-boot:comfy3d-pt23" 10 | ports: 11 | - "8188:8188" 12 | volumes: 13 | - "./storage:/root" 14 | environment: 15 | - CLI_ARGS= 16 | security_opt: 17 | - "label=type:nvidia_container_t" 18 | deploy: 19 | resources: 20 | reservations: 21 | devices: 22 | - driver: nvidia 23 | device_ids: ['0'] 24 | capabilities: [gpu] 25 | -------------------------------------------------------------------------------- /archived/comfy3d-pt23/runner-scripts/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | # Regex that matches REPO_NAME 6 | # First from pattern [https://example.com/xyz/REPO_NAME.git] or [git@example.com:xyz/REPO_NAME.git] 7 | # Second from pattern [http(s)://example.com/xyz/REPO_NAME] 8 | # They all extract REPO_NAME to BASH_REMATCH[2] 9 | function clone_or_pull () { 10 | if [[ $1 =~ ^(.*[/:])(.*)(\.git)$ ]] || [[ $1 =~ ^(http.*\/)(.*)$ ]]; then 11 | echo "${BASH_REMATCH[2]}" ; 12 | set +e ; 13 | git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules "$1" \ 14 | || git -C "${BASH_REMATCH[2]}" pull --ff-only ; 15 | set -e ; 16 | else 17 | echo "[ERROR] Invalid URL: $1" ; 18 | return 1 ; 19 | fi ; 20 | } 21 | 22 | 23 | echo "########################################" 24 | echo "[INFO] Downloading ComfyUI..." 25 | echo "########################################" 26 | 27 | # Using stable version (has a release tag) 28 | set +e 29 | cd /root 30 | git clone https://github.com/comfyanonymous/ComfyUI.git || git -C ComfyUI pull --ff-only 31 | cd /root/ComfyUI 32 | git reset --hard "$(git tag | grep -e '^v' | sort -V | tail -1)" 33 | set -e 34 | 35 | 36 | echo "########################################" 37 | echo "[INFO] Downloading ComfyUI-3D-Pack..." 38 | echo "########################################" 39 | 40 | cd /root/ComfyUI/custom_nodes 41 | 42 | set +e 43 | git clone --recurse-submodules https://github.com/MrForExample/ComfyUI-3D-Pack.git \ 44 | || git -C "ComfyUI-3D-Pack" pull --ff-only ; 45 | set -e 46 | 47 | git -C "ComfyUI-3D-Pack" reset --hard bdc5e3029ed96d9fa25e651e12fce1553a4422c4 48 | 49 | 50 | # Finish 51 | touch /root/.download-complete 52 | -------------------------------------------------------------------------------- /archived/comfy3d-pt23/runner-scripts/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Run user's set-proxy script 6 | cd /root 7 | if [ ! -f "/root/user-scripts/set-proxy.sh" ] ; then 8 | mkdir -p /root/user-scripts 9 | cp /runner-scripts/set-proxy.sh.example /root/user-scripts/set-proxy.sh 10 | else 11 | echo "[INFO] Running set-proxy script..." 12 | 13 | chmod +x /root/user-scripts/set-proxy.sh 14 | source /root/user-scripts/set-proxy.sh 15 | fi ; 16 | 17 | # Install ComfyUI 18 | cd /root 19 | if [ ! -f "/root/.download-complete" ] ; then 20 | chmod +x /runner-scripts/download.sh 21 | bash /runner-scripts/download.sh 22 | fi ; 23 | 24 | # Run user's pre-start script 25 | cd /root 26 | if [ ! -f "/root/user-scripts/pre-start.sh" ] ; then 27 | mkdir -p /root/user-scripts 28 | cp /runner-scripts/pre-start.sh.example /root/user-scripts/pre-start.sh 29 | else 30 | echo "[INFO] Running pre-start script..." 31 | 32 | chmod +x /root/user-scripts/pre-start.sh 33 | source /root/user-scripts/pre-start.sh 34 | fi ; 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] Starting ComfyUI..." 39 | echo "########################################" 40 | 41 | # Let .pyc files be stored in one place 42 | export PYTHONPYCACHEPREFIX="/root/.cache/pycache" 43 | # Let PIP install packages to /root/.local 44 | export PIP_USER=true 45 | # Add above to PATH 46 | export PATH="${PATH}:/root/.local/bin" 47 | # Suppress [WARNING: Running pip as the 'root' user] 48 | export PIP_ROOT_USER_ACTION=ignore 49 | 50 | cd /root 51 | 52 | python3 ./ComfyUI/main.py --listen --port 8188 ${CLI_ARGS} 53 | -------------------------------------------------------------------------------- /archived/comfy3d-pt23/runner-scripts/pre-start.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo "[INFO] Continue without pre-start script." 5 | -------------------------------------------------------------------------------- /archived/comfy3d-pt23/runner-scripts/set-proxy.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | # Tip: Within containers, you cannot access your host machine via 127.0.0.1. 5 | # You will need "host.docker.internal"(for Docker) or "host.containers.internal"(for Podman) 6 | 7 | # Example of setting proxy 8 | #export HTTP_PROXY=http://host.docker.internal:1081 9 | #export HTTPS_PROXY=$HTTP_PROXY 10 | #export http_proxy=$HTTP_PROXY 11 | #export https_proxy=$HTTP_PROXY 12 | #export NO_PROXY="localhost,*.local,*.internal,[::1],fd00::/7, 13 | #10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16, 14 | #10.*,127.*,169.254.*,172.16.*,172.17.*,172.18.*,172.19.*,172.20.*, 15 | #172.21.*,172.22.*,172.23.*,172.24.*,172.25.*,172.26.*,172.27.*, 16 | #172.28.*,172.29.*,172.30.*,172.31.*,172.32.*,192.168.*, 17 | #*.cn,ghproxy.com,*.ghproxy.com,ghproxy.org,*.ghproxy.org, 18 | #gh-proxy.com,*.gh-proxy.com,ghproxy.net,*.ghproxy.net" 19 | #export no_proxy=$NO_PROXY 20 | #echo "[INFO] Proxy set to $HTTP_PROXY" 21 | 22 | echo "[INFO] Continue without proxy." 23 | -------------------------------------------------------------------------------- /base-cu128-pt27/README.txt: -------------------------------------------------------------------------------- 1 | Under Construction... 2 | 3 | Targeting PyTorch 2.7.1 + CUDA 12.8 + Python 3.13 4 | 5 | May rename in the future 6 | -------------------------------------------------------------------------------- /comfy3d-pt25/builder-scripts/generate-pak5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo '#' > pak5.txt 5 | 6 | array=( 7 | https://github.com/comfyanonymous/ComfyUI/raw/refs/heads/master/requirements.txt 8 | https://github.com/MrForExample/ComfyUI-3D-Pack/raw/refs/heads/main/requirements.txt 9 | https://github.com/edenartlab/eden_comfy_pipelines/raw/refs/heads/main/requirements.txt 10 | https://github.com/kijai/ComfyUI-KJNodes/raw/refs/heads/main/requirements.txt 11 | https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite/raw/refs/heads/main/requirements.txt 12 | https://github.com/ltdrdata/ComfyUI-Impact-Pack/raw/refs/heads/Main/requirements.txt 13 | https://github.com/ltdrdata/ComfyUI-Impact-Subpack/raw/refs/heads/main/requirements.txt 14 | https://github.com/ltdrdata/ComfyUI-Inspire-Pack/raw/refs/heads/main/requirements.txt 15 | https://github.com/ltdrdata/ComfyUI-Manager/raw/refs/heads/main/requirements.txt 16 | https://github.com/WASasquatch/was-node-suite-comfyui/raw/refs/heads/main/requirements.txt 17 | ) 18 | 19 | for line in "${array[@]}"; 20 | do curl -w "\n" -sSL "${line}" >> pak5.txt 21 | done 22 | 23 | sed -i '/^#/d' pak5.txt 24 | sed -i 's/[[:space:]]*$//' pak5.txt 25 | sed -i 's/>=.*$//' pak5.txt 26 | sed -i 's/_/-/g' pak5.txt 27 | 28 | # Don't "sort foo.txt >foo.txt". See: https://stackoverflow.com/a/29244408 29 | sort -ufo pak5.txt pak5.txt 30 | 31 | # Remove duplicate items, compare to pak3.txt 32 | grep -Fixv -f pak3.txt pak5.txt > temp.txt && mv temp.txt pak5.txt 33 | 34 | echo " generated. Check before use." 35 | -------------------------------------------------------------------------------- /comfy3d-pt25/builder-scripts/pak3.txt: -------------------------------------------------------------------------------- 1 | accelerate 2 | diffusers 3 | ftfy 4 | huggingface-hub[hf-transfer] 5 | imageio 6 | joblib 7 | kornia 8 | matplotlib 9 | onnx 10 | onnxruntime-gpu 11 | opencv-contrib-python-headless 12 | pandas 13 | pillow 14 | pygit2 15 | python-ffmpeg 16 | regex 17 | scikit-build-core 18 | scikit-image 19 | scikit-learn 20 | scipy 21 | timm 22 | torchmetrics 23 | transformers 24 | -------------------------------------------------------------------------------- /comfy3d-pt25/builder-scripts/pak4.txt: -------------------------------------------------------------------------------- 1 | spconv-cu124 2 | -------------------------------------------------------------------------------- /comfy3d-pt25/builder-scripts/pak5.txt: -------------------------------------------------------------------------------- 1 | aiohttp 2 | cachetools 3 | chardet 4 | clip-interrogator==0.6.0 5 | color-matcher 6 | dill 7 | easydict 8 | einops 9 | fairscale 10 | GitPython 11 | gpytoolbox 12 | igraph 13 | imageio-ffmpeg 14 | iopath 15 | jaxtyping 16 | libigl 17 | matrix-client==0.4.0 18 | mss 19 | nerfacc 20 | ninja 21 | numba 22 | OmegaConf 23 | open-clip-torch 24 | openai 25 | packaging 26 | peft 27 | piexif 28 | pilgram 29 | plyfile 30 | psutil 31 | PyGithub 32 | pygltflib 33 | pyhocon 34 | PyMCubes 35 | pymeshfix 36 | pymeshlab 37 | python-dotenv 38 | pytorch-lightning 39 | pytorch-msssim 40 | pyvista 41 | pyyaml 42 | rembg 43 | requests 44 | rich 45 | safetensors 46 | segment-anything 47 | sentencepiece 48 | slangtorch 49 | soundfile 50 | spandrel 51 | tokenizers 52 | toml 53 | torchsde 54 | torchtyping 55 | tqdm 56 | trimesh 57 | typer 58 | typing-extensions 59 | ultralytics 60 | uv 61 | webcolors 62 | xatlas 63 | -------------------------------------------------------------------------------- /comfy3d-pt25/builder-scripts/pak6.txt: -------------------------------------------------------------------------------- 1 | dlib 2 | insightface 3 | git+https://github.com/openai/CLIP.git 4 | git+https://github.com/WASasquatch/cstr 5 | git+https://github.com/WASasquatch/ffmpy.git 6 | git+https://github.com/WASasquatch/img2texture.git 7 | git+https://github.com/EasternJournalist/utils3d.git#egg=utils3d 8 | -------------------------------------------------------------------------------- /comfy3d-pt25/builder-scripts/pak7.txt: -------------------------------------------------------------------------------- 1 | https://github.com/YanWenKun/ComfyUI-3D-Pack-LinuxWheels/releases/download/v5.1/pointnet2_ops-3.0.0-cp312-cp312-linux_x86_64.whl 2 | https://github.com/YanWenKun/ComfyUI-3D-Pack-LinuxWheels/releases/download/v5.1/simple_knn-0.0.0-cp312-cp312-linux_x86_64.whl 3 | https://github.com/YanWenKun/ComfyUI-3D-Pack-LinuxWheels/releases/download/v5.1/diff_gaussian_rasterization-0.0.0-cp312-cp312-linux_x86_64.whl 4 | https://github.com/YanWenKun/ComfyUI-3D-Pack-LinuxWheels/releases/download/v5.1/kiui-0.2.14-py3-none-any.whl 5 | https://github.com/YanWenKun/ComfyUI-3D-Pack-LinuxWheels/releases/download/v5.1/nvdiffrast-0.3.3-py3-none-any.whl 6 | https://github.com/YanWenKun/ComfyUI-3D-Pack-LinuxWheels/releases/download/v5.1/pytorch3d-0.7.8-cp312-cp312-linux_x86_64.whl 7 | -------------------------------------------------------------------------------- /comfy3d-pt25/builder-scripts/pak8.txt: -------------------------------------------------------------------------------- 1 | # https://pip.pypa.io/en/stable/reference/requirements-file-format/ 2 | # https://github.com/rusty1s/pytorch_scatter?tab=readme-ov-file#binaries 3 | --find-links https://data.pyg.org/whl/torch-2.5.1%2Bcu124.html 4 | torch-scatter 5 | -------------------------------------------------------------------------------- /comfy3d-pt25/builder-scripts/pak9.txt: -------------------------------------------------------------------------------- 1 | --find-links https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.5.1_cu124.html 2 | kaolin 3 | -------------------------------------------------------------------------------- /comfy3d-pt25/builder-scripts/pakA.txt: -------------------------------------------------------------------------------- 1 | numpy==1.26.4 2 | -------------------------------------------------------------------------------- /comfy3d-pt25/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | comfyui: 4 | init: true 5 | container_name: comfy3d-pt25 6 | build: 7 | context: . 8 | dockerfile: Dockerfile 9 | image: "yanwk/comfyui-boot:comfy3d-pt25" 10 | ports: 11 | - "8188:8188" 12 | volumes: 13 | - "./storage:/root" 14 | environment: 15 | - CLI_ARGS= 16 | security_opt: 17 | - "label=type:nvidia_container_t" 18 | deploy: 19 | resources: 20 | reservations: 21 | devices: 22 | - driver: nvidia 23 | device_ids: ['0'] 24 | capabilities: [gpu] 25 | -------------------------------------------------------------------------------- /comfy3d-pt25/runner-scripts/build-deps-trellis-demo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eo pipefail 4 | 5 | echo "########################################" 6 | echo "[INFO] Building Dependencies for 3D-Pack..." 7 | echo "########################################" 8 | 9 | cd /root 10 | 11 | if [ -z "${CMAKE_ARGS}" ]; then 12 | export CMAKE_ARGS='-DBUILD_opencv_world=ON -DWITH_CUDA=ON -DCUDA_FAST_MATH=ON -DWITH_CUBLAS=ON -DWITH_NVCUVID=ON' 13 | echo "[INFO] CMAKE_ARGS not set, setting to ${CMAKE_ARGS}" 14 | fi ; 15 | 16 | # Compile PyTorch3D 17 | # Put it first because it takes longest time. 18 | pip install --force-reinstall \ 19 | "git+https://github.com/facebookresearch/pytorch3d.git" 20 | 21 | # Compile libs in Comfy3D_Pre_Builds 22 | aria2c \ 23 | https://github.com/MrForExample/Comfy3D_Pre_Builds/archive/refs/heads/main.zip \ 24 | -d /tmp \ 25 | -o Comfy3D_Pre_Builds-main.zip ; 26 | unzip -q /tmp/Comfy3D_Pre_Builds-main.zip -d /tmp ; 27 | rm /tmp/Comfy3D_Pre_Builds-main.zip ; 28 | 29 | for D in /tmp/Comfy3D_Pre_Builds-main/_Libs/*; do 30 | if [ -d "${D}" ] ; then 31 | pip install --force-reinstall "${D}" 32 | fi 33 | done 34 | 35 | # Compile other deps, using latest 36 | cd /root 37 | 38 | pip install --force-reinstall \ 39 | "git+https://github.com/ashawkey/kiuikit.git" 40 | 41 | pip install --force-reinstall \ 42 | "git+https://github.com/NVlabs/nvdiffrast.git" 43 | 44 | # For TRELLIS 45 | # Note: vox2seq is already included in Comfy3D_Pre_Builds. 46 | 47 | pip install git+https://github.com/JeffreyXiang/diffoctreerast.git 48 | 49 | mkdir -p /tmp/build 50 | 51 | git clone --depth=1 https://github.com/autonomousvision/mip-splatting.git \ 52 | /tmp/build/mip-splatting 53 | #pip uninstall --break-system-packages --yes diff-gaussian-rasterization 54 | pip install --force-reinstall \ 55 | /tmp/build/mip-splatting/submodules/diff-gaussian-rasterization/ 56 | 57 | # (Optional) Compile Flash Attention for Ampere and later GPUs. 58 | # "MAX_JOBS" limits Ninja jobs to avoid OOM. 59 | # If have >96GB RAM, just remove MAX_JOBS line. 60 | export MAX_JOBS=4 61 | pip install flash-attn --no-build-isolation 62 | 63 | # For TRELLIS demo 64 | pip install gradio==4.44.1 gradio_litmodel3d==0.0.1 65 | 66 | # Ensure Numpy1 67 | pip install numpy==1.26.4 68 | 69 | # Finish 70 | touch /root/.build-complete 71 | 72 | echo "########################################" 73 | echo "[INFO] Build Complete." 74 | echo "########################################" 75 | -------------------------------------------------------------------------------- /comfy3d-pt25/runner-scripts/build-deps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eo pipefail 4 | 5 | echo "########################################" 6 | echo "[INFO] Building Dependencies for 3D-Pack..." 7 | echo "########################################" 8 | 9 | cd /root 10 | 11 | if [ -z "${CMAKE_ARGS}" ]; then 12 | export CMAKE_ARGS='-DBUILD_opencv_world=ON -DWITH_CUDA=ON -DCUDA_FAST_MATH=ON -DWITH_CUBLAS=ON -DWITH_NVCUVID=ON' 13 | echo "[INFO] CMAKE_ARGS not set, setting to ${CMAKE_ARGS}" 14 | fi ; 15 | 16 | # Compile PyTorch3D 17 | # Put it first because it takes longest time. 18 | pip install --force-reinstall \ 19 | "git+https://github.com/facebookresearch/pytorch3d.git" 20 | 21 | # Compile libs in Comfy3D_Pre_Builds 22 | aria2c \ 23 | https://github.com/MrForExample/Comfy3D_Pre_Builds/archive/refs/heads/main.zip \ 24 | -d /tmp \ 25 | -o Comfy3D_Pre_Builds-main.zip ; 26 | unzip -q /tmp/Comfy3D_Pre_Builds-main.zip -d /tmp ; 27 | rm /tmp/Comfy3D_Pre_Builds-main.zip ; 28 | 29 | for D in /tmp/Comfy3D_Pre_Builds-main/_Libs/*; do 30 | if [ -d "${D}" ] ; then 31 | pip install --force-reinstall "${D}" 32 | fi 33 | done 34 | 35 | # Compile other deps, using latest 36 | cd /root 37 | 38 | pip install --force-reinstall \ 39 | "git+https://github.com/ashawkey/diff-gaussian-rasterization.git" 40 | 41 | pip install --force-reinstall \ 42 | "git+https://github.com/ashawkey/kiuikit.git" 43 | 44 | pip install --force-reinstall \ 45 | "git+https://github.com/NVlabs/nvdiffrast.git" 46 | 47 | # For TRELLIS 48 | # Note: vox2seq is already included in Comfy3D_Pre_Builds. 49 | 50 | pip install git+https://github.com/JeffreyXiang/diffoctreerast.git 51 | 52 | # Ensure Numpy1 53 | pip install numpy==1.26.4 54 | 55 | # Finish 56 | touch /root/.build-complete 57 | 58 | echo "########################################" 59 | echo "[INFO] Build Complete." 60 | echo "########################################" 61 | -------------------------------------------------------------------------------- /comfy3d-pt25/runner-scripts/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | function clone_or_pull () { 6 | if [[ $1 =~ ^(.*[/:])(.*)(\.git)$ ]] || [[ $1 =~ ^(http.*\/)(.*)$ ]]; then 7 | echo "${BASH_REMATCH[2]}" ; 8 | set +e ; 9 | git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules "$1" \ 10 | || git -C "${BASH_REMATCH[2]}" pull --ff-only ; 11 | set -e ; 12 | else 13 | echo "[ERROR] Invalid URL: $1" ; 14 | return 1 ; 15 | fi ; 16 | } 17 | 18 | 19 | echo "########################################" 20 | echo "[INFO] Downloading ComfyUI..." 21 | echo "########################################" 22 | 23 | set +e 24 | 25 | cd /root 26 | git clone https://github.com/comfyanonymous/ComfyUI.git || git -C ComfyUI pull --ff-only 27 | 28 | cd /root/ComfyUI 29 | git reset --hard "$(git tag | grep -e '^v' | sort -V | tail -1)" 30 | 31 | set -e 32 | 33 | echo "########################################" 34 | echo "[INFO] Downloading ComfyUI-3D-Pack..." 35 | echo "########################################" 36 | 37 | cd /root/ComfyUI/custom_nodes 38 | clone_or_pull https://github.com/YanWenKun/ComfyUI-3D-Pack.git 39 | 40 | # Copy example files of 3D-Pack 41 | set +e 42 | 43 | mkdir -p /root/ComfyUI/user/default/workflows 44 | 45 | cp -r /root/ComfyUI/custom_nodes/ComfyUI-3D-Pack/_Example_Workflows/. \ 46 | /root/ComfyUI/user/default/workflows/ 47 | 48 | rm -rf /root/ComfyUI/user/default/workflows/_Example_Inputs_Files 49 | rm -rf /root/ComfyUI/user/default/workflows/_Example_Outputs 50 | 51 | cp -r /root/ComfyUI/custom_nodes/ComfyUI-3D-Pack/_Example_Workflows/_Example_Inputs_Files/. \ 52 | /root/ComfyUI/input/ 53 | 54 | set -e 55 | 56 | echo "########################################" 57 | echo "[INFO] Downloading Custom Nodes..." 58 | echo "########################################" 59 | 60 | cd /root/ComfyUI/custom_nodes 61 | 62 | # ComfyUI-Manager 63 | clone_or_pull https://github.com/ltdrdata/ComfyUI-Manager.git 64 | 65 | # Nodes used by 3D-Pack 66 | clone_or_pull https://github.com/cubiq/ComfyUI_IPAdapter_plus.git 67 | clone_or_pull https://github.com/edenartlab/eden_comfy_pipelines.git 68 | clone_or_pull https://github.com/kijai/ComfyUI-KJNodes.git 69 | clone_or_pull https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git 70 | clone_or_pull https://github.com/ltdrdata/ComfyUI-Impact-Pack.git 71 | clone_or_pull https://github.com/ltdrdata/ComfyUI-Impact-Subpack.git 72 | clone_or_pull https://github.com/ltdrdata/ComfyUI-Inspire-Pack.git 73 | clone_or_pull https://github.com/ssitu/ComfyUI_UltimateSDUpscale.git 74 | clone_or_pull https://github.com/WASasquatch/was-node-suite-comfyui.git 75 | 76 | # Finish 77 | touch /root/.download-complete 78 | -------------------------------------------------------------------------------- /comfy3d-pt25/runner-scripts/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Run user's set-proxy script 6 | cd /root 7 | if [ ! -f "/root/user-scripts/set-proxy.sh" ] ; then 8 | mkdir -p /root/user-scripts 9 | cp /runner-scripts/set-proxy.sh.example /root/user-scripts/set-proxy.sh 10 | else 11 | echo "[INFO] Running set-proxy script..." 12 | 13 | chmod +x /root/user-scripts/set-proxy.sh 14 | source /root/user-scripts/set-proxy.sh 15 | fi ; 16 | 17 | # Install ComfyUI 18 | cd /root 19 | if [ ! -f "/root/.download-complete" ] ; then 20 | chmod +x /runner-scripts/download.sh 21 | bash /runner-scripts/download.sh 22 | fi ; 23 | 24 | # Run user's pre-start script 25 | cd /root 26 | if [ ! -f "/root/user-scripts/pre-start.sh" ] ; then 27 | mkdir -p /root/user-scripts 28 | cp /runner-scripts/pre-start.sh.example /root/user-scripts/pre-start.sh 29 | else 30 | echo "[INFO] Running pre-start script..." 31 | 32 | chmod +x /root/user-scripts/pre-start.sh 33 | source /root/user-scripts/pre-start.sh 34 | fi ; 35 | 36 | # Let .pyc files be stored in one place 37 | export PYTHONPYCACHEPREFIX="/root/.cache/pycache" 38 | # Let PIP install packages to /root/.local 39 | export PIP_USER=true 40 | # Add above to PATH 41 | export PATH="${PATH}:/root/.local/bin" 42 | # Suppress [WARNING: Running pip as the 'root' user] 43 | export PIP_ROOT_USER_ACTION=ignore 44 | 45 | # Build Dependencies 46 | cd /root 47 | if [ ! -f "/root/.build-complete" ] ; then 48 | chmod +x /runner-scripts/build-deps.sh 49 | bash /runner-scripts/build-deps.sh 50 | fi ; 51 | 52 | echo "########################################" 53 | echo "[INFO] Starting ComfyUI..." 54 | echo "########################################" 55 | 56 | cd /root 57 | 58 | python3 ./ComfyUI/main.py --listen --port 8188 ${CLI_ARGS} 59 | -------------------------------------------------------------------------------- /comfy3d-pt25/runner-scripts/pre-start.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo "[INFO] Continue without pre-start script." 5 | -------------------------------------------------------------------------------- /comfy3d-pt25/runner-scripts/set-proxy.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | # Tip: Within containers, you cannot access your host machine via 127.0.0.1. 5 | # You will need "host.docker.internal"(for Docker) or "host.containers.internal"(for Podman) 6 | 7 | # Example of setting proxy 8 | #export HTTP_PROXY=http://host.docker.internal:1081 9 | #export HTTPS_PROXY=$HTTP_PROXY 10 | #export http_proxy=$HTTP_PROXY 11 | #export https_proxy=$HTTP_PROXY 12 | #export NO_PROXY="localhost,*.local,*.internal,[::1],fd00::/7, 13 | #10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16, 14 | #10.*,127.*,169.254.*,172.16.*,172.17.*,172.18.*,172.19.*,172.20.*, 15 | #172.21.*,172.22.*,172.23.*,172.24.*,172.25.*,172.26.*,172.27.*, 16 | #172.28.*,172.29.*,172.30.*,172.31.*,172.32.*,192.168.*, 17 | #*.cn,ghproxy.com,*.ghproxy.com,ghproxy.org,*.ghproxy.org, 18 | #gh-proxy.com,*.gh-proxy.com,ghproxy.net,*.ghproxy.net" 19 | #export no_proxy=$NO_PROXY 20 | #echo "[INFO] Proxy set to $HTTP_PROXY" 21 | 22 | echo "[INFO] Continue without proxy." 23 | -------------------------------------------------------------------------------- /cpu/builder-scripts/generate-pak5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo '#' > pak5.txt 5 | 6 | array=( 7 | https://github.com/comfyanonymous/ComfyUI/raw/refs/heads/master/requirements.txt 8 | https://github.com/crystian/ComfyUI-Crystools/raw/refs/heads/main/requirements.txt 9 | https://github.com/cubiq/ComfyUI_essentials/raw/refs/heads/main/requirements.txt 10 | https://github.com/cubiq/ComfyUI_FaceAnalysis/raw/refs/heads/main/requirements.txt 11 | https://github.com/cubiq/ComfyUI_InstantID/raw/refs/heads/main/requirements.txt 12 | https://github.com/cubiq/PuLID_ComfyUI/raw/refs/heads/main/requirements.txt 13 | https://github.com/Fannovel16/comfyui_controlnet_aux/raw/refs/heads/main/requirements.txt 14 | https://github.com/Fannovel16/ComfyUI-Frame-Interpolation/raw/refs/heads/main/requirements-no-cupy.txt 15 | https://github.com/FizzleDorf/ComfyUI_FizzNodes/raw/refs/heads/main/requirements.txt 16 | https://github.com/Gourieff/ComfyUI-ReActor/raw/refs/heads/main/requirements.txt 17 | https://github.com/huchenlei/ComfyUI-layerdiffuse/raw/refs/heads/main/requirements.txt 18 | https://github.com/jags111/efficiency-nodes-comfyui/raw/refs/heads/main/requirements.txt 19 | https://github.com/kijai/ComfyUI-KJNodes/raw/refs/heads/main/requirements.txt 20 | https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite/raw/refs/heads/main/requirements.txt 21 | https://github.com/ltdrdata/ComfyUI-Impact-Pack/raw/refs/heads/Main/requirements.txt 22 | https://github.com/ltdrdata/ComfyUI-Impact-Subpack/raw/refs/heads/main/requirements.txt 23 | https://github.com/ltdrdata/ComfyUI-Inspire-Pack/raw/refs/heads/main/requirements.txt 24 | https://github.com/ltdrdata/ComfyUI-Manager/raw/refs/heads/main/requirements.txt 25 | https://github.com/melMass/comfy_mtb/raw/refs/heads/main/requirements.txt 26 | https://github.com/storyicon/comfyui_segment_anything/raw/refs/heads/main/requirements.txt 27 | https://github.com/WASasquatch/was-node-suite-comfyui/raw/refs/heads/main/requirements.txt 28 | ) 29 | 30 | for line in "${array[@]}"; 31 | do curl -w "\n" -sSL "${line}" >> pak5.txt 32 | done 33 | 34 | sed -i '/^#/d' pak5.txt 35 | sed -i 's/[[:space:]]*$//' pak5.txt 36 | sed -i 's/>=.*$//' pak5.txt 37 | sed -i 's/_/-/g' pak5.txt 38 | 39 | # Don't "sort foo.txt >foo.txt". See: https://stackoverflow.com/a/29244408 40 | sort -ufo pak5.txt pak5.txt 41 | 42 | # Remove duplicate items, compare to pak3.txt 43 | grep -Fixv -f pak3.txt pak5.txt > temp.txt && mv temp.txt pak5.txt 44 | 45 | echo " generated. Check before use." 46 | -------------------------------------------------------------------------------- /cpu/builder-scripts/pak3.txt: -------------------------------------------------------------------------------- 1 | # 'compel lark' for smZNodes 2 | # 'torchdiffeq' for DepthFM 3 | # 'fairscale' for APISR 4 | accelerate 5 | compel 6 | diffusers 7 | fairscale 8 | ftfy 9 | huggingface-hub[hf-transfer] 10 | imageio 11 | joblib 12 | kornia 13 | lark 14 | matplotlib 15 | # Temp fix for mediapipe 16 | onnx==1.16.2 17 | onnxruntime 18 | opencv-contrib-python-headless 19 | pandas 20 | pilgram 21 | pillow 22 | pygit2 23 | python-ffmpeg 24 | regex 25 | scikit-build-core 26 | scikit-image 27 | scikit-learn 28 | scipy 29 | timm 30 | torchdiffeq 31 | torchmetrics 32 | transformers 33 | -------------------------------------------------------------------------------- /cpu/builder-scripts/pak5.txt: -------------------------------------------------------------------------------- 1 | addict 2 | aiohttp 3 | albumentations 4 | cachetools 5 | clip-interrogator 6 | color-matcher 7 | colour-science 8 | deepdiff 9 | dill 10 | einops 11 | filelock 12 | fvcore 13 | GitPython 14 | imageio-ffmpeg 15 | importlib-metadata 16 | mediapipe 17 | mss 18 | numba 19 | numexpr 20 | omegaconf 21 | piexif 22 | pixeloe 23 | psutil 24 | py-cpuinfo 25 | PyGithub 26 | python-dateutil 27 | pyyaml 28 | qrcode[pil] 29 | rembg 30 | requirements-parser 31 | rich 32 | rich-argparse 33 | safetensors 34 | segment-anything 35 | sentencepiece 36 | simpleeval 37 | soundfile 38 | spandrel 39 | svglib 40 | tokenizers 41 | toml 42 | torchsde 43 | tqdm 44 | transparent-background 45 | trimesh[easy] 46 | typer 47 | typing-extensions 48 | ultralytics 49 | uv 50 | webcolors 51 | yacs 52 | yapf 53 | -------------------------------------------------------------------------------- /cpu/builder-scripts/pak7.txt: -------------------------------------------------------------------------------- 1 | dlib 2 | facexlib 3 | insightface 4 | git+https://github.com/openai/CLIP.git 5 | git+https://github.com/WASasquatch/cstr 6 | git+https://github.com/WASasquatch/ffmpy.git 7 | git+https://github.com/WASasquatch/img2texture.git 8 | -------------------------------------------------------------------------------- /cpu/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | comfyui: 4 | init: true 5 | container_name: comfyui-cpu 6 | build: 7 | context: . 8 | dockerfile: Dockerfile 9 | image: "yanwk/comfyui-boot:cpu" 10 | ports: 11 | - "8188:8188" 12 | volumes: 13 | - "./storage:/root" 14 | environment: 15 | - CLI_ARGS="--cpu" 16 | -------------------------------------------------------------------------------- /cpu/runner-scripts/download-models.txt: -------------------------------------------------------------------------------- 1 | # TAESD models for high-quality on-the-fly previews 2 | 3 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesd_decoder.pth 4 | dir=vae_approx 5 | out=taesd_decoder.pth 6 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesdxl_decoder.pth 7 | dir=vae_approx 8 | out=taesdxl_decoder.pth 9 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesd3_decoder.pth 10 | dir=vae_approx 11 | out=taesd3_decoder.pth 12 | https://raw.githubusercontent.com/madebyollin/taesd/main/taef1_decoder.pth 13 | dir=vae_approx 14 | out=taef1_decoder.pth 15 | -------------------------------------------------------------------------------- /cpu/runner-scripts/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | # Regex note: the "${BASH_REMATCH[2]}" here is REPO_NAME 6 | # from [https://example.com/somebody/REPO_NAME.git] or [git@example.com:somebody/REPO_NAME.git] 7 | function clone_or_pull () { 8 | if [[ $1 =~ ^(.*[/:])(.*)(\.git)$ ]] || [[ $1 =~ ^(http.*\/)(.*)$ ]]; then 9 | echo "${BASH_REMATCH[2]}" ; 10 | set +e ; 11 | git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules "$1" \ 12 | || git -C "${BASH_REMATCH[2]}" pull --ff-only ; 13 | set -e ; 14 | else 15 | echo "[ERROR] Invalid URL: $1" ; 16 | return 1 ; 17 | fi ; 18 | } 19 | 20 | 21 | echo "########################################" 22 | echo "[INFO] Downloading ComfyUI & Manager..." 23 | echo "########################################" 24 | 25 | set +e 26 | cd /root 27 | git clone https://github.com/comfyanonymous/ComfyUI.git || git -C "ComfyUI" pull --ff-only 28 | cd /root/ComfyUI 29 | # Using stable version (has a release tag) 30 | git reset --hard "$(git tag | grep -e '^v' | sort -V | tail -1)" 31 | set -e 32 | 33 | cd /root/ComfyUI/custom_nodes 34 | clone_or_pull https://github.com/ltdrdata/ComfyUI-Manager.git 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] Downloading Models..." 39 | echo "########################################" 40 | 41 | # Models 42 | cd /root/ComfyUI/models 43 | aria2c \ 44 | --input-file=/runner-scripts/download-models.txt \ 45 | --allow-overwrite=false \ 46 | --auto-file-renaming=false \ 47 | --continue=true \ 48 | --max-connection-per-server=5 49 | 50 | # Finish 51 | touch /root/.download-complete 52 | -------------------------------------------------------------------------------- /cpu/runner-scripts/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Run user's set-proxy script 6 | cd /root 7 | if [ ! -f "/root/user-scripts/set-proxy.sh" ] ; then 8 | mkdir -p /root/user-scripts 9 | cp /runner-scripts/set-proxy.sh.example /root/user-scripts/set-proxy.sh 10 | else 11 | echo "[INFO] Running set-proxy script..." 12 | 13 | chmod +x /root/user-scripts/set-proxy.sh 14 | source /root/user-scripts/set-proxy.sh 15 | fi ; 16 | 17 | # Install ComfyUI 18 | cd /root 19 | if [ ! -f "/root/.download-complete" ] ; then 20 | chmod +x /runner-scripts/download.sh 21 | bash /runner-scripts/download.sh 22 | fi ; 23 | 24 | # Run user's pre-start script 25 | cd /root 26 | if [ ! -f "/root/user-scripts/pre-start.sh" ] ; then 27 | mkdir -p /root/user-scripts 28 | cp /runner-scripts/pre-start.sh.example /root/user-scripts/pre-start.sh 29 | else 30 | echo "[INFO] Running pre-start script..." 31 | 32 | chmod +x /root/user-scripts/pre-start.sh 33 | source /root/user-scripts/pre-start.sh 34 | fi ; 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] Starting ComfyUI..." 39 | echo "########################################" 40 | 41 | # Let .pyc files be stored in one place 42 | export PYTHONPYCACHEPREFIX="/root/.cache/pycache" 43 | # Let PIP install packages to /root/.local 44 | export PIP_USER=true 45 | # Add above to PATH 46 | export PATH="${PATH}:/root/.local/bin" 47 | # Suppress [WARNING: Running pip as the 'root' user] 48 | export PIP_ROOT_USER_ACTION=ignore 49 | 50 | cd /root 51 | 52 | python3 ./ComfyUI/main.py --listen --port 8188 ${CLI_ARGS} 53 | -------------------------------------------------------------------------------- /cpu/runner-scripts/pre-start.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo "[INFO] Continue without pre-start script." 5 | -------------------------------------------------------------------------------- /cpu/runner-scripts/set-proxy.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | # Tip: Within containers, you cannot access your host machine via 127.0.0.1. 5 | # You can use "host.docker.internal"(for Docker) or "host.containers.internal"(for Podman) 6 | 7 | # Example of setting proxy 8 | #export HTTP_PROXY=http://host.docker.internal:1081 9 | #export HTTPS_PROXY=$HTTP_PROXY 10 | #export http_proxy=$HTTP_PROXY 11 | #export https_proxy=$HTTP_PROXY 12 | #export NO_PROXY="localhost,*.local,*.internal,[::1],fd00::/7, 13 | #10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16, 14 | #10.*,127.*,169.254.*,172.16.*,172.17.*,172.18.*,172.19.*,172.20.*, 15 | #172.21.*,172.22.*,172.23.*,172.24.*,172.25.*,172.26.*,172.27.*, 16 | #172.28.*,172.29.*,172.30.*,172.31.*,172.32.*,192.168.*" 17 | #export no_proxy=$NO_PROXY 18 | #echo "[INFO] Proxy set to $HTTP_PROXY" 19 | 20 | echo "[INFO] Continue without proxy." 21 | -------------------------------------------------------------------------------- /cu121-megapak/README.adoc: -------------------------------------------------------------------------------- 1 | # You've found MEGAPAK! 2 | 3 | image:https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-cu121-megapak.yml/badge.svg["GitHub Workflow Status",link="https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-cu121-megapak.yml"] 4 | 5 | https://hub.docker.com/r/yanwk/comfyui-boot/tags?name=cu121-megapak[View on ] 6 | 7 | 8 | *link:README.zh.adoc[中文说明]* 9 | 10 | `megapak` is a big all-in-one Docker image that has: 11 | 12 | * Dev kits: 13 | ** CUDA dev kit (12.1) 14 | ** Python dev package (3.11) 15 | ** GCC C++ (12) 16 | ** OpenCV-devel 17 | ** CMake, Ninja... 18 | 19 | * Latest stable version of xFormers + PyTorch 20 | 21 | * Tools: 22 | ** Vim, Fish, fd... 23 | 24 | And will: 25 | 26 | * Install a lot of Custom Nodes by default 27 | 28 | * Download more models 29 | 30 | Also, if you'd like to build your own development environment for ComfyUI ecosystem, this image would be a good starting point. 31 | 32 | ## Note - For WSL2 Users 33 | 34 | The design of `cu121-megapak` is similar to the `cu121` image, as well as the usage. With one key difference: 35 | 36 | * The user within the container is `root`, not "runner". 37 | ** This makes rootless deploy on Linux easier. 38 | 39 | But WSL2 users need to be aware of the file storage. + 40 | Bind-mount a directory from Windows(NTFS) filesystem into Linux(ext4) would perform I/O much slower, and have dubious ownership. + 41 | Recommend using a Docker volume or a WSL2 directory for file storage. + 42 | (You can still manage your ComfyUI files in Explorer via URL `\\wsl$`). 43 | 44 | More discussion in 45 | https://github.com/YanWenKun/ComfyUI-Docker/issues/43[#43]. 46 | 47 | `latest` image uses a low-privilege user (runner), so it doesn't have dubious ownership issue under WSL2. 48 | 49 | If confused, give a try to the native 50 | https://github.com/YanWenKun/ComfyUI-Windows-Portable[ComfyUI-Windows-Portable]. 51 | 52 | ## Usage 53 | 54 | .Run with Docker 55 | [source,sh] 56 | ---- 57 | mkdir -p storage 58 | 59 | docker run -it --rm \ 60 | --name comfyui-mega \ 61 | --gpus all \ 62 | -p 8188:8188 \ 63 | -v "$(pwd)"/storage:/root \ 64 | -e CLI_ARGS="" \ 65 | yanwk/comfyui-boot:megapak 66 | ---- 67 | 68 | .Run with Podman 69 | [source,sh] 70 | ---- 71 | mkdir -p storage 72 | 73 | podman run -it --rm \ 74 | --name comfyui-mega \ 75 | --device nvidia.com/gpu=all \ 76 | --security-opt label=disable \ 77 | -p 8188:8188 \ 78 | -v "$(pwd)"/storage:/root \ 79 | -e CLI_ARGS="" \ 80 | docker.io/yanwk/comfyui-boot:megapak 81 | ---- 82 | 83 | Recommend running ephemeral containers (`--rm`) to keep everything clean and visible. 84 | 85 | ## Skip downloading 86 | 87 | The container will run the download script on the first start 88 | and will create an empty file `.download-complete` as a marker when the download is complete. 89 | 90 | If the download does not complete, on the next start, the download script will resume downloading (using aria2's mechanism). 91 | 92 | You can create the `.download-complete` file to skip the download script. 93 | 94 | [source,sh] 95 | ---- 96 | mkdir -p storage 97 | touch storage/.download-complete 98 | ---- 99 | -------------------------------------------------------------------------------- /cu121-megapak/README.zh.adoc: -------------------------------------------------------------------------------- 1 | # 你发现了 MEGAPAK! 2 | 3 | image:https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-cu121-megapak.yml/badge.svg["GitHub Workflow Status",link="https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-cu121-megapak.yml"] 4 | 5 | https://hub.docker.com/r/yanwk/comfyui-boot/tags?name=cu121-megapak[在 上查看] 6 | 7 | `megapak` 是一个大而全的 Docker 镜像,包含: 8 | 9 | * 开发组件: 10 | ** CUDA dev (12.1) 11 | ** Python dev (3.11) 12 | ** GCC C++ (12) 13 | ** OpenCV-devel 14 | ** CMake, Ninja... 15 | 16 | * 最新稳定版 xFormers + PyTorch 17 | 18 | * 工具: 19 | ** Vim, Fish, fd... 20 | 21 | 并且会: 22 | 23 | * 默认即安装大量自定义节点 24 | 25 | * 下载更多模型文件 26 | 27 | 此外,如果你在考虑攒一个自己的、面向 ComfyUI 生态的开发环境,这个镜像会是个不错的起点。 28 | 29 | ## 提示 - WSL2 用户 30 | 31 | `cu121-megapak` 镜像的设计理念和 `cu121` 差不多,但有一个显著差异: 32 | 33 | * 容器内用户为 `root`,不是 runner。 34 | ** 这样便于 Linux 下 rootless 式部署运行。 35 | 36 | 但 WSL2 用户需要额外注意,建议不要挂载/映射 NTFS 文件系统下的目录作为存储,一来跨文件系统互访性能很差,二来会有文件权限混乱的问题。 37 | 38 | 建议使用 Docker Volume 来存储文件,或者存储到 WSL2 下的目录,这两者均基于 WSL2 虚拟机的 ext4 虚拟硬盘,IO 性能较好,不存在跨访混乱。 + 39 | 但在 Windows 下访问存储目录会比较不便,需要通过地址 `\\wsl$` 以网络文件形式访问。 40 | 41 | 更多讨论可以参看 42 | https://github.com/YanWenKun/ComfyUI-Docker/issues/43[#43] 43 | 。 44 | 45 | `latest` 镜像因为使用了低特权用户(runner),不存权限混乱问题。 46 | 47 | 如果搞不明白,也可以换 Win 原生的 https://github.com/YanWenKun/ComfyUI-Windows-Portable/blob/main/README.zh.adoc[ComfyUI Windows 多节点整合包] 试试。 48 | 49 | ## 用法 50 | 51 | .使用 Docker 52 | [source,sh] 53 | ---- 54 | mkdir -p storage 55 | 56 | docker run -it --rm \ 57 | --name comfyui-mega \ 58 | --gpus all \ 59 | -p 8188:8188 \ 60 | -v "$(pwd)"/storage:/root \ 61 | -e CLI_ARGS="" \ 62 | yanwk/comfyui-boot:megapak 63 | ---- 64 | 65 | .使用 Podman 66 | [source,sh] 67 | ---- 68 | mkdir -p storage 69 | 70 | podman run -it --rm \ 71 | --name comfyui-mega \ 72 | --device nvidia.com/gpu=all \ 73 | --security-opt label=disable \ 74 | -p 8188:8188 \ 75 | -v "$(pwd)"/storage:/root \ 76 | -e CLI_ARGS="" \ 77 | docker.io/yanwk/comfyui-boot:megapak 78 | ---- 79 | 80 | 个人推荐使用一次性容器 (`--rm`) 来保持环境整洁、配置清晰。 81 | 82 | ## 跳过下载模型文件等 83 | 84 | 下载脚本使用 aria2 的断点下载功能,如果下载未完成,再次运行容器时,会继续下载。 85 | 86 | 如果不希望下载,在容器运行前先创建空白文件 `.download-complete` 即可跳过下载脚本: 87 | 88 | [source,sh] 89 | ---- 90 | mkdir -p storage 91 | touch storage/.download-complete 92 | ---- 93 | -------------------------------------------------------------------------------- /cu121-megapak/builder-scripts/generate-pak5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo '#' > pak5.txt 5 | 6 | array=( 7 | https://github.com/comfyanonymous/ComfyUI/raw/refs/heads/master/requirements.txt 8 | https://github.com/crystian/ComfyUI-Crystools/raw/refs/heads/main/requirements.txt 9 | https://github.com/cubiq/ComfyUI_essentials/raw/refs/heads/main/requirements.txt 10 | https://github.com/cubiq/ComfyUI_FaceAnalysis/raw/refs/heads/main/requirements.txt 11 | https://github.com/cubiq/ComfyUI_InstantID/raw/refs/heads/main/requirements.txt 12 | https://github.com/cubiq/PuLID_ComfyUI/raw/refs/heads/main/requirements.txt 13 | https://github.com/Fannovel16/comfyui_controlnet_aux/raw/refs/heads/main/requirements.txt 14 | https://github.com/Fannovel16/ComfyUI-Frame-Interpolation/raw/refs/heads/main/requirements-no-cupy.txt 15 | https://github.com/FizzleDorf/ComfyUI_FizzNodes/raw/refs/heads/main/requirements.txt 16 | https://github.com/Gourieff/ComfyUI-ReActor/raw/refs/heads/main/requirements.txt 17 | https://github.com/huchenlei/ComfyUI-layerdiffuse/raw/refs/heads/main/requirements.txt 18 | https://github.com/jags111/efficiency-nodes-comfyui/raw/refs/heads/main/requirements.txt 19 | https://github.com/kijai/ComfyUI-KJNodes/raw/refs/heads/main/requirements.txt 20 | https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite/raw/refs/heads/main/requirements.txt 21 | https://github.com/ltdrdata/ComfyUI-Impact-Pack/raw/refs/heads/Main/requirements.txt 22 | https://github.com/ltdrdata/ComfyUI-Impact-Subpack/raw/refs/heads/main/requirements.txt 23 | https://github.com/ltdrdata/ComfyUI-Inspire-Pack/raw/refs/heads/main/requirements.txt 24 | https://github.com/ltdrdata/ComfyUI-Manager/raw/refs/heads/main/requirements.txt 25 | https://github.com/melMass/comfy_mtb/raw/refs/heads/main/requirements.txt 26 | https://github.com/storyicon/comfyui_segment_anything/raw/refs/heads/main/requirements.txt 27 | https://github.com/WASasquatch/was-node-suite-comfyui/raw/refs/heads/main/requirements.txt 28 | ) 29 | 30 | for line in "${array[@]}"; 31 | do curl -w "\n" -sSL "${line}" >> pak5.txt 32 | done 33 | 34 | sed -i '/^#/d' pak5.txt 35 | sed -i 's/[[:space:]]*$//' pak5.txt 36 | sed -i 's/>=.*$//' pak5.txt 37 | sed -i 's/_/-/g' pak5.txt 38 | 39 | # Don't "sort foo.txt >foo.txt". See: https://stackoverflow.com/a/29244408 40 | sort -ufo pak5.txt pak5.txt 41 | 42 | # Remove duplicate items, compare to pak3.txt 43 | grep -Fixv -f pak3.txt pak5.txt > temp.txt && mv temp.txt pak5.txt 44 | 45 | echo " generated. Check before use." 46 | -------------------------------------------------------------------------------- /cu121-megapak/builder-scripts/pak3.txt: -------------------------------------------------------------------------------- 1 | # 'cupy-cuda12x' for Frame Interpolation 2 | # 'compel lark' for smZNodes 3 | # 'torchdiffeq' for DepthFM 4 | # 'fairscale' for APISR 5 | accelerate 6 | compel 7 | cupy-cuda12x 8 | diffusers 9 | fairscale 10 | ftfy 11 | huggingface-hub[hf-transfer] 12 | imageio 13 | joblib 14 | kornia 15 | lark 16 | matplotlib 17 | # Temp fix for mediapipe 18 | onnx==1.16.2 19 | onnxruntime-gpu 20 | opencv-contrib-python-headless 21 | pandas 22 | pilgram 23 | pillow 24 | pygit2 25 | python-ffmpeg 26 | regex 27 | scikit-build-core 28 | scikit-image 29 | scikit-learn 30 | scipy 31 | timm 32 | torchdiffeq 33 | torchmetrics 34 | transformers 35 | -------------------------------------------------------------------------------- /cu121-megapak/builder-scripts/pak5.txt: -------------------------------------------------------------------------------- 1 | addict 2 | aiohttp 3 | albumentations 4 | cachetools 5 | clip-interrogator 6 | color-matcher 7 | colour-science 8 | deepdiff 9 | dill 10 | einops 11 | filelock 12 | fvcore 13 | GitPython 14 | imageio-ffmpeg 15 | importlib-metadata 16 | matrix-client==0.4.0 17 | mediapipe 18 | mss 19 | numba 20 | numexpr 21 | omegaconf 22 | piexif 23 | pixeloe 24 | psutil 25 | py-cpuinfo 26 | PyGithub 27 | pynvml 28 | python-dateutil 29 | pyyaml 30 | qrcode[pil] 31 | rembg 32 | requirements-parser 33 | rich 34 | rich-argparse 35 | safetensors 36 | segment-anything 37 | sentencepiece 38 | simpleeval 39 | soundfile 40 | spandrel 41 | svglib 42 | tokenizers 43 | toml 44 | torchsde 45 | tqdm 46 | transparent-background 47 | trimesh[easy] 48 | typer 49 | typing-extensions 50 | ultralytics 51 | uv 52 | webcolors 53 | yacs 54 | yapf 55 | -------------------------------------------------------------------------------- /cu121-megapak/builder-scripts/pak7.txt: -------------------------------------------------------------------------------- 1 | dlib 2 | facexlib 3 | insightface 4 | git+https://github.com/openai/CLIP.git 5 | git+https://github.com/WASasquatch/cstr 6 | git+https://github.com/WASasquatch/ffmpy.git 7 | git+https://github.com/WASasquatch/img2texture.git 8 | 9 | # Gradio needs urllib3~=2.0, 10 | # but matrix-client(used by ComfyUI-Manager) needs urllib3~=1.21. 11 | # Have to give up Gradio here. 12 | #gradio 13 | #gradio-client 14 | -------------------------------------------------------------------------------- /cu121-megapak/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | comfyui: 4 | init: true 5 | container_name: comfyui 6 | build: 7 | context: . 8 | dockerfile: Dockerfile 9 | image: "yanwk/comfyui-boot:cu121-megapak" 10 | ports: 11 | - "8188:8188" 12 | volumes: 13 | - "./storage:/root" 14 | environment: 15 | - CLI_ARGS= 16 | security_opt: 17 | - "label=type:nvidia_container_t" 18 | deploy: 19 | resources: 20 | reservations: 21 | devices: 22 | - driver: nvidia 23 | device_ids: ['0'] 24 | capabilities: [gpu] 25 | -------------------------------------------------------------------------------- /cu121-megapak/runner-scripts/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Run user's set-proxy script 6 | cd /root 7 | if [ ! -f "/root/user-scripts/set-proxy.sh" ] ; then 8 | mkdir -p /root/user-scripts 9 | cp /runner-scripts/set-proxy.sh.example /root/user-scripts/set-proxy.sh 10 | else 11 | echo "[INFO] Running set-proxy script..." 12 | 13 | chmod +x /root/user-scripts/set-proxy.sh 14 | source /root/user-scripts/set-proxy.sh 15 | fi ; 16 | 17 | # Install ComfyUI 18 | cd /root 19 | if [ ! -f "/root/.download-complete" ] ; then 20 | chmod +x /runner-scripts/download.sh 21 | bash /runner-scripts/download.sh 22 | fi ; 23 | 24 | # Run user's pre-start script 25 | cd /root 26 | if [ ! -f "/root/user-scripts/pre-start.sh" ] ; then 27 | mkdir -p /root/user-scripts 28 | cp /runner-scripts/pre-start.sh.example /root/user-scripts/pre-start.sh 29 | else 30 | echo "[INFO] Running pre-start script..." 31 | 32 | chmod +x /root/user-scripts/pre-start.sh 33 | source /root/user-scripts/pre-start.sh 34 | fi ; 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] Starting ComfyUI..." 39 | echo "########################################" 40 | 41 | # Let .pyc files be stored in one place 42 | export PYTHONPYCACHEPREFIX="/root/.cache/pycache" 43 | # Let PIP install packages to /root/.local 44 | export PIP_USER=true 45 | # Add above to PATH 46 | export PATH="${PATH}:/root/.local/bin" 47 | # Suppress [WARNING: Running pip as the 'root' user] 48 | export PIP_ROOT_USER_ACTION=ignore 49 | 50 | cd /root 51 | 52 | python3 ./ComfyUI/main.py --listen --port 8188 ${CLI_ARGS} 53 | -------------------------------------------------------------------------------- /cu121-megapak/runner-scripts/pre-start.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo "[INFO] Continue without pre-start script." 5 | -------------------------------------------------------------------------------- /cu121-megapak/runner-scripts/set-proxy.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | # Tip: Within containers, you cannot access your host machine via 127.0.0.1. 5 | # You will need "host.docker.internal"(for Docker) or "host.containers.internal"(for Podman) 6 | 7 | # Example of setting proxy 8 | #export HTTP_PROXY=http://host.docker.internal:1081 9 | #export HTTPS_PROXY=$HTTP_PROXY 10 | #export http_proxy=$HTTP_PROXY 11 | #export https_proxy=$HTTP_PROXY 12 | #export NO_PROXY="localhost,*.local,*.internal,[::1],fd00::/7, 13 | #10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16, 14 | #10.*,127.*,169.254.*,172.16.*,172.17.*,172.18.*,172.19.*,172.20.*, 15 | #172.21.*,172.22.*,172.23.*,172.24.*,172.25.*,172.26.*,172.27.*, 16 | #172.28.*,172.29.*,172.30.*,172.31.*,172.32.*,192.168.*, 17 | #*.cn,ghproxy.com,*.ghproxy.com,ghproxy.org,*.ghproxy.org, 18 | #gh-proxy.com,*.gh-proxy.com,ghproxy.net,*.ghproxy.net" 19 | #export no_proxy=$NO_PROXY 20 | #echo "[INFO] Proxy set to $HTTP_PROXY" 21 | 22 | echo "[INFO] Continue without proxy." 23 | -------------------------------------------------------------------------------- /cu121/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | # An old issue: docker-compose will mount volume as root. 3 | # Workaround: https://github.com/docker/compose/issues/3270 4 | # (Command 'docker run -v' is not affected) 5 | file-chown: 6 | container_name: file-chown 7 | build: 8 | context: . 9 | dockerfile: Dockerfile 10 | image: "yanwk/comfyui-boot:cu121" 11 | user: "root" 12 | volumes: 13 | - "./storage:/home/runner" 14 | command: "chown -R runner:runner /home/runner" 15 | 16 | comfyui: 17 | init: true 18 | container_name: comfyui 19 | depends_on: 20 | file-chown: 21 | condition: service_completed_successfully 22 | build: 23 | context: . 24 | dockerfile: Dockerfile 25 | image: "yanwk/comfyui-boot:cu121" 26 | ports: 27 | - "8188:8188" 28 | volumes: 29 | - "./storage:/home/runner" 30 | environment: 31 | - CLI_ARGS= 32 | security_opt: 33 | - "label=type:nvidia_container_t" 34 | deploy: 35 | resources: 36 | reservations: 37 | devices: 38 | - driver: nvidia 39 | device_ids: ['0'] 40 | capabilities: [gpu] 41 | -------------------------------------------------------------------------------- /cu121/scripts/download-models.txt: -------------------------------------------------------------------------------- 1 | # Checkpoints 2 | 3 | # Photon is a SD 1.5 model, which is less GPU-demanding, and the file size is smaller. 4 | # It's a good start point for users who are new to ComfyUI. 5 | 6 | https://huggingface.co/digiplay/Photon_v1/resolve/main/photon_v1.safetensors 7 | dir=checkpoints 8 | out=photon_v1.safetensors 9 | 10 | # VAE 11 | 12 | https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors 13 | dir=vae 14 | out=vae-ft-mse-840000-ema-pruned.safetensors 15 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesd_decoder.pth 16 | dir=vae_approx 17 | out=taesd_decoder.pth 18 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesdxl_decoder.pth 19 | dir=vae_approx 20 | out=taesdxl_decoder.pth 21 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesd3_decoder.pth 22 | dir=vae_approx 23 | out=taesd3_decoder.pth 24 | https://raw.githubusercontent.com/madebyollin/taesd/main/taef1_decoder.pth 25 | dir=vae_approx 26 | out=taef1_decoder.pth 27 | 28 | # Upscale 29 | 30 | # These two RealESRGAN models are kind of "classic" and easy to start with. 31 | # For more fine-tuned upscaler models, check: https://openmodeldb.info/ 32 | 33 | https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth 34 | dir=upscale_models 35 | out=RealESRGAN_x4plus.pth 36 | https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth 37 | dir=upscale_models 38 | out=RealESRGAN_x4plus_anime_6B.pth 39 | 40 | # Embeddings 41 | 42 | https://huggingface.co/datasets/gsdf/EasyNegative/resolve/main/EasyNegative.safetensors 43 | dir=embeddings 44 | out=easynegative.safetensors 45 | https://huggingface.co/lenML/DeepNegative/resolve/main/NG_DeepNegative_V1_75T.pt 46 | dir=embeddings 47 | out=ng_deepnegative_v1_75t.pt 48 | -------------------------------------------------------------------------------- /cu121/scripts/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "########################################" 4 | echo "[INFO] Downloading ComfyUI & Manager..." 5 | echo "########################################" 6 | 7 | set -euxo pipefail 8 | 9 | # ComfyUI 10 | # Using stable version (has a release tag) 11 | cd /home/runner 12 | ( 13 | git clone https://github.com/comfyanonymous/ComfyUI.git && 14 | cd ComfyUI && 15 | git reset --hard "$(git tag | grep -e '^v' | sort -V | tail -1)" 16 | ) || 17 | # If fails, try git-pull 18 | ( 19 | cd /home/runner/ComfyUI && git pull 20 | ) 21 | 22 | # ComfyUI Manager 23 | cd /home/runner/ComfyUI/custom_nodes 24 | git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules \ 25 | https://github.com/ltdrdata/ComfyUI-Manager.git \ 26 | || (cd /home/runner/ComfyUI/custom_nodes/ComfyUI-Manager && git pull) 27 | 28 | echo "########################################" 29 | echo "[INFO] Downloading Models..." 30 | echo "########################################" 31 | 32 | # Models 33 | cd /home/runner/ComfyUI/models 34 | aria2c --input-file=/home/scripts/download-models.txt \ 35 | --allow-overwrite=false --auto-file-renaming=false --continue=true \ 36 | --max-connection-per-server=5 37 | 38 | # Finish 39 | touch /home/runner/.download-complete 40 | -------------------------------------------------------------------------------- /cu121/scripts/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Run user's set-proxy script 6 | cd /home/runner 7 | if [ -f "/home/runner/scripts/set-proxy.sh" ] ; then 8 | echo "[INFO] Running set-proxy script..." 9 | 10 | chmod +x /home/runner/scripts/set-proxy.sh 11 | source /home/runner/scripts/set-proxy.sh 12 | fi ; 13 | 14 | # Install ComfyUI 15 | cd /home/runner 16 | if [ ! -f "/home/runner/.download-complete" ] ; then 17 | chmod +x /home/scripts/download.sh 18 | bash /home/scripts/download.sh 19 | fi ; 20 | 21 | # Run user's pre-start script 22 | cd /home/runner 23 | if [ -f "/home/runner/scripts/pre-start.sh" ] ; then 24 | echo "[INFO] Running pre-start script..." 25 | 26 | chmod +x /home/runner/scripts/pre-start.sh 27 | source /home/runner/scripts/pre-start.sh 28 | else 29 | echo "[INFO] No pre-start script found. Skipping." 30 | fi ; 31 | 32 | 33 | echo "########################################" 34 | echo "[INFO] Starting ComfyUI..." 35 | echo "########################################" 36 | 37 | export PATH="${PATH}:/home/runner/.local/bin" 38 | export PYTHONPYCACHEPREFIX="/home/runner/.cache/pycache" 39 | 40 | cd /home/runner 41 | 42 | python3 ./ComfyUI/main.py --listen --port 8188 ${CLI_ARGS} 43 | -------------------------------------------------------------------------------- /cu121/scripts/root-wrapper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # When you have to run as root inside container (e.g. rootless Podman) 4 | 5 | set -e 6 | 7 | ln -sf /root/.* /home/runner 8 | ln -sf /root/* /home/runner 9 | 10 | cd /root 11 | 12 | if [ ! -f "/root/bin/python3.11" ] ; then 13 | python3 -m venv --system-site-packages . 14 | fi ; 15 | source /root/bin/activate 16 | 17 | chmod +x /home/scripts/entrypoint.sh 18 | source /home/scripts/entrypoint.sh 19 | -------------------------------------------------------------------------------- /cu121/storage/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YanWenKun/ComfyUI-Docker/8b2050fc782db95353ad59ff4c8ee25d7239c121/cu121/storage/.gitkeep -------------------------------------------------------------------------------- /cu124-cn/builder-scripts/generate-pak5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo '#' > pak5.txt 5 | 6 | array=( 7 | https://github.com/comfyanonymous/ComfyUI/raw/refs/heads/master/requirements.txt 8 | https://github.com/crystian/ComfyUI-Crystools/raw/refs/heads/main/requirements.txt 9 | https://github.com/cubiq/ComfyUI_essentials/raw/refs/heads/main/requirements.txt 10 | https://github.com/cubiq/ComfyUI_FaceAnalysis/raw/refs/heads/main/requirements.txt 11 | https://github.com/cubiq/ComfyUI_InstantID/raw/refs/heads/main/requirements.txt 12 | https://github.com/cubiq/PuLID_ComfyUI/raw/refs/heads/main/requirements.txt 13 | https://github.com/Fannovel16/comfyui_controlnet_aux/raw/refs/heads/main/requirements.txt 14 | https://github.com/Fannovel16/ComfyUI-Frame-Interpolation/raw/refs/heads/main/requirements-no-cupy.txt 15 | https://github.com/FizzleDorf/ComfyUI_FizzNodes/raw/refs/heads/main/requirements.txt 16 | https://github.com/Gourieff/ComfyUI-ReActor/raw/refs/heads/main/requirements.txt 17 | https://github.com/huchenlei/ComfyUI-layerdiffuse/raw/refs/heads/main/requirements.txt 18 | https://github.com/jags111/efficiency-nodes-comfyui/raw/refs/heads/main/requirements.txt 19 | https://github.com/kijai/ComfyUI-KJNodes/raw/refs/heads/main/requirements.txt 20 | https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite/raw/refs/heads/main/requirements.txt 21 | https://github.com/ltdrdata/ComfyUI-Impact-Pack/raw/refs/heads/Main/requirements.txt 22 | https://github.com/ltdrdata/ComfyUI-Impact-Subpack/raw/refs/heads/main/requirements.txt 23 | https://github.com/ltdrdata/ComfyUI-Inspire-Pack/raw/refs/heads/main/requirements.txt 24 | https://github.com/ltdrdata/ComfyUI-Manager/raw/refs/heads/main/requirements.txt 25 | https://github.com/melMass/comfy_mtb/raw/refs/heads/main/requirements.txt 26 | https://github.com/storyicon/comfyui_segment_anything/raw/refs/heads/main/requirements.txt 27 | https://github.com/WASasquatch/was-node-suite-comfyui/raw/refs/heads/main/requirements.txt 28 | ) 29 | 30 | for line in "${array[@]}"; 31 | do curl -w "\n" -sSL "${line}" >> pak5.txt 32 | done 33 | 34 | sed -i '/^#/d' pak5.txt 35 | sed -i 's/[[:space:]]*$//' pak5.txt 36 | sed -i 's/>=.*$//' pak5.txt 37 | sed -i 's/_/-/g' pak5.txt 38 | 39 | # 不要原地写入 "sort foo.txt >foo.txt",详见: https://stackoverflow.com/a/29244408 40 | sort -ufo pak5.txt pak5.txt 41 | 42 | # 根据 pak3.txt 已有内容,删除重复项 43 | grep -Fixv -f pak3.txt pak5.txt > temp.txt && mv temp.txt pak5.txt 44 | 45 | echo "已生成 ,检查后再用" 46 | -------------------------------------------------------------------------------- /cu124-cn/builder-scripts/pak3.txt: -------------------------------------------------------------------------------- 1 | # 'cupy-cuda12x' for Frame Interpolation 2 | # 'compel lark' for smZNodes 3 | # 'torchdiffeq' for DepthFM 4 | # 'fairscale' for APISR 5 | accelerate 6 | compel 7 | cupy-cuda12x 8 | diffusers 9 | fairscale 10 | ftfy 11 | huggingface-hub[hf-transfer] 12 | imageio 13 | joblib 14 | kornia 15 | lark 16 | matplotlib 17 | # Temp fix for mediapipe 18 | onnx==1.16.2 19 | onnxruntime-gpu 20 | opencv-contrib-python-headless 21 | pandas 22 | pilgram 23 | pillow 24 | pygit2 25 | python-ffmpeg 26 | regex 27 | scikit-build-core 28 | scikit-image 29 | scikit-learn 30 | scipy 31 | timm 32 | torchdiffeq 33 | torchmetrics 34 | transformers 35 | -------------------------------------------------------------------------------- /cu124-cn/builder-scripts/pak5.txt: -------------------------------------------------------------------------------- 1 | addict 2 | aiohttp 3 | albumentations 4 | cachetools 5 | clip-interrogator 6 | color-matcher 7 | colour-science 8 | deepdiff 9 | dill 10 | einops 11 | filelock 12 | fvcore 13 | GitPython 14 | imageio-ffmpeg 15 | importlib-metadata 16 | matrix-client==0.4.0 17 | mediapipe 18 | mss 19 | numba 20 | numexpr 21 | omegaconf 22 | piexif 23 | pixeloe 24 | psutil 25 | py-cpuinfo 26 | PyGithub 27 | pynvml 28 | python-dateutil 29 | pyyaml 30 | qrcode[pil] 31 | rembg 32 | requirements-parser 33 | rich 34 | rich-argparse 35 | safetensors 36 | segment-anything 37 | sentencepiece 38 | simpleeval 39 | soundfile 40 | spandrel 41 | svglib 42 | tokenizers 43 | toml 44 | torchsde 45 | tqdm 46 | transparent-background 47 | trimesh[easy] 48 | typer 49 | typing-extensions 50 | ultralytics 51 | uv 52 | webcolors 53 | yacs 54 | yapf 55 | -------------------------------------------------------------------------------- /cu124-cn/builder-scripts/pak7.txt: -------------------------------------------------------------------------------- 1 | dlib 2 | facexlib 3 | insightface 4 | git+https://github.com/openai/CLIP.git 5 | git+https://github.com/WASasquatch/cstr 6 | git+https://github.com/WASasquatch/ffmpy.git 7 | git+https://github.com/WASasquatch/img2texture.git 8 | -------------------------------------------------------------------------------- /cu124-cn/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | comfyui: 4 | init: true 5 | container_name: comfyui 6 | build: 7 | context: . 8 | dockerfile: Dockerfile 9 | image: "yanwk/comfyui-boot:cu124-cn" 10 | ports: 11 | - "8188:8188" 12 | volumes: 13 | - "./storage:/root" 14 | environment: 15 | - CLI_ARGS= 16 | security_opt: 17 | - "label=type:nvidia_container_t" 18 | deploy: 19 | resources: 20 | reservations: 21 | devices: 22 | - driver: nvidia 23 | device_ids: ['0'] 24 | capabilities: [gpu] 25 | -------------------------------------------------------------------------------- /cu124-cn/runner-scripts/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # 运行用户的配置代理脚本 6 | cd /root 7 | if [ ! -f "/root/user-scripts/set-proxy.sh" ] ; then 8 | mkdir -p /root/user-scripts 9 | cp /runner-scripts/set-proxy.sh.example /root/user-scripts/set-proxy.sh 10 | else 11 | echo "[INFO] 执行配置代理脚本……" 12 | 13 | chmod +x /root/user-scripts/set-proxy.sh 14 | source /root/user-scripts/set-proxy.sh 15 | fi ; 16 | 17 | # 安装 ComfyUI 18 | cd /root 19 | if [ ! -f "/root/.download-complete" ] ; then 20 | chmod +x /runner-scripts/download.sh 21 | bash /runner-scripts/download.sh 22 | fi ; 23 | 24 | # 运行用户的预启动脚本 25 | cd /root 26 | if [ ! -f "/root/user-scripts/pre-start.sh" ] ; then 27 | mkdir -p /root/user-scripts 28 | cp /runner-scripts/pre-start.sh.example /root/user-scripts/pre-start.sh 29 | else 30 | echo "[INFO] 执行预启动脚本……" 31 | 32 | chmod +x /root/user-scripts/pre-start.sh 33 | source /root/user-scripts/pre-start.sh 34 | fi ; 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] 启动 ComfyUI..." 39 | echo "########################################" 40 | 41 | # 使得 .pyc 缓存文件集中保存 42 | export PYTHONPYCACHEPREFIX="/root/.cache/pycache" 43 | # 使得 PIP 安装新包到 /root/.local 44 | export PIP_USER=true 45 | # 添加上述路径到 PATH 46 | export PATH="${PATH}:/root/.local/bin" 47 | # 不再显示警报 [WARNING: Running pip as the 'root' user] 48 | export PIP_ROOT_USER_ACTION=ignore 49 | 50 | cd /root 51 | 52 | python3 ./ComfyUI/main.py --listen --port 8188 ${CLI_ARGS} 53 | -------------------------------------------------------------------------------- /cu124-cn/runner-scripts/minimal-start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 最小化启动脚本 4 | 5 | set -e 6 | 7 | # 运行用户的配置代理脚本 8 | cd /root 9 | if [ ! -f "/root/user-scripts/set-proxy.sh" ] ; then 10 | mkdir -p /root/user-scripts 11 | cp /runner-scripts/set-proxy.sh.example /root/user-scripts/set-proxy.sh 12 | else 13 | echo "[INFO] 执行配置代理脚本……" 14 | 15 | chmod +x /root/user-scripts/set-proxy.sh 16 | source /root/user-scripts/set-proxy.sh 17 | fi ; 18 | 19 | # 下载 ComfyUI 与 Manager,不下载扩展,不下载模型文件 20 | cd /root 21 | if [ ! -f "/root/.download-complete" ] ; then 22 | echo "########################################" 23 | echo "[INFO] 下载 ComfyUI & Manager..." 24 | echo "########################################" 25 | 26 | set +e 27 | 28 | git clone https://gh-proxy.com/https://github.com/comfyanonymous/ComfyUI.git || git -C ComfyUI pull --ff-only 29 | cd /root/ComfyUI 30 | git reset --hard "$(git tag | grep -e '^v' | sort -V | tail -1)" 31 | 32 | cd /root/ComfyUI/custom_nodes 33 | git clone --depth=1 https://gh-proxy.com/https://github.com/ltdrdata/ComfyUI-Manager.git || git -C ComfyUI-Manager pull --ff-only 34 | 35 | set -e 36 | 37 | touch /root/.download-complete 38 | fi ; 39 | 40 | # 运行用户的预启动脚本 41 | cd /root 42 | if [ ! -f "/root/user-scripts/pre-start.sh" ] ; then 43 | mkdir -p /root/user-scripts 44 | cp /runner-scripts/pre-start.sh.example /root/user-scripts/pre-start.sh 45 | else 46 | echo "[INFO] 执行预启动脚本……" 47 | 48 | chmod +x /root/user-scripts/pre-start.sh 49 | source /root/user-scripts/pre-start.sh 50 | fi ; 51 | 52 | 53 | echo "########################################" 54 | echo "[INFO] 启动 ComfyUI..." 55 | echo "########################################" 56 | 57 | # 使得 .pyc 缓存文件集中保存 58 | export PYTHONPYCACHEPREFIX="/root/.cache/pycache" 59 | # 使得 PIP 安装新包到 /root/.local 60 | export PIP_USER=true 61 | # 添加上述路径到 PATH 62 | export PATH="${PATH}:/root/.local/bin" 63 | # 不再显示警报 [WARNING: Running pip as the 'root' user] 64 | export PIP_ROOT_USER_ACTION=ignore 65 | 66 | cd /root 67 | 68 | python3 ./ComfyUI/main.py --listen --port 8188 ${CLI_ARGS} 69 | -------------------------------------------------------------------------------- /cu124-cn/runner-scripts/pre-start.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo "[INFO] 无预启动脚本,跳过。" 5 | -------------------------------------------------------------------------------- /cu124-cn/runner-scripts/set-proxy.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | # 提示:容器中无法直接通过 127.0.0.1 或 localhost 访问宿主机 5 | # 需要使用 "host.docker.internal"(Docker) 或 "host.containers.internal"(Podman) 6 | 7 | # 代理配置样例 8 | #export HTTP_PROXY=http://host.docker.internal:1081 9 | #export HTTPS_PROXY=$HTTP_PROXY 10 | #export http_proxy=$HTTP_PROXY 11 | #export https_proxy=$HTTP_PROXY 12 | #export NO_PROXY="localhost,*.local,*.internal,[::1],fd00::/7, 13 | #10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16, 14 | #10.*,127.*,169.254.*,172.16.*,172.17.*,172.18.*,172.19.*,172.20.*, 15 | #172.21.*,172.22.*,172.23.*,172.24.*,172.25.*,172.26.*,172.27.*, 16 | #172.28.*,172.29.*,172.30.*,172.31.*,172.32.*,192.168.*, 17 | #*.cn,ghproxy.com,*.ghproxy.com,ghproxy.org,*.ghproxy.org, 18 | #gh-proxy.com,*.gh-proxy.com,ghproxy.net,*.ghproxy.net" 19 | #export no_proxy=$NO_PROXY 20 | #echo "[INFO] 代理设置为 $HTTP_PROXY" 21 | 22 | echo "[INFO] 无代理脚本,跳过。" 23 | -------------------------------------------------------------------------------- /cu124-megapak/README.zh.adoc: -------------------------------------------------------------------------------- 1 | # MEGAPAK,但是 CUDA 12.4 2 | 3 | image:https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-cu124-megapak.yml/badge.svg["GitHub Workflow Status",link="https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-cu124-megapak.yml"] 4 | 5 | https://hub.docker.com/r/yanwk/comfyui-boot/tags?name=cu124-megapak[在 上查看] 6 | 7 | 8 | * 基于 `cu121-megapak` 演进而来 9 | 10 | * 开发组件: 11 | ** CUDA dev kit (12.4) 12 | ** Python dev package (3.12) 13 | ** GCC C++ (13) 14 | ** OpenCV-devel 15 | ** CMake, Ninja... 16 | 17 | * 最新稳定版 xFormers + PyTorch 18 | 19 | * 工具: 20 | ** Vim, Fish, fd... 21 | 22 | ## 用法 23 | 24 | .使用 Docker 运行 25 | [source,sh] 26 | ---- 27 | mkdir -p storage 28 | 29 | docker run -it --rm \ 30 | --name comfyui-cu124-mega \ 31 | --gpus all \ 32 | -p 8188:8188 \ 33 | -v "$(pwd)"/storage:/root \ 34 | -e CLI_ARGS="--fast" \ 35 | yanwk/comfyui-boot:cu124-megapak 36 | ---- 37 | 38 | .使用 Podman 运行 39 | [source,bash] 40 | ---- 41 | mkdir -p storage 42 | 43 | podman run -it --rm \ 44 | --name comfyui-cu124-mega \ 45 | --device nvidia.com/gpu=all \ 46 | --security-opt label=disable \ 47 | -p 8188:8188 \ 48 | -v "$(pwd)"/storage:/root \ 49 | -e CLI_ARGS="--fast" \ 50 | docker.io/yanwk/comfyui-boot:cu124-megapak 51 | ---- 52 | 53 | ## 跳过下载模型文件等 54 | 55 | 下载脚本使用 aria2 的断点下载功能,如果下载未完成,再次运行容器时,会继续下载。 56 | 57 | 如果不希望下载,在容器运行前先创建空白文件 `.download-complete` 即可跳过下载脚本: 58 | 59 | [source,sh] 60 | ---- 61 | mkdir -p storage 62 | touch storage/.download-complete 63 | ---- 64 | 65 | 66 | [[cli-args]] 67 | ## CLI_ARGS 参考 68 | 69 | [%autowidth,cols=2] 70 | |=== 71 | |启动参数 |说明 72 | 73 | |--lowvram 74 | |如果显存只有 4G (程序启动时会检测显存,自动开启) 75 | 76 | |--novram 77 | |如果用了 __--lowvram__ 还是显存不够,直接改用 CPU 内存 78 | 79 | |--cpu 80 | |用 CPU 来跑,会很慢 81 | 82 | |--use-pytorch-cross-attention 83 | |如果不想用 xFormers,而改用 PyTorch 原生交叉注意力机制。在 WSL2 上可能会有更好的速度/显存占用表现,但在 Linux 宿主机上会明显更慢。 84 | 85 | |--preview-method taesd 86 | |使用基于 TAESD 的高质量实时预览。使用 Manager 会覆盖该参数(需在 Manager 界面中设置预览方式)。 87 | 88 | |--front-end-version Comfy-Org/ComfyUI_frontend@latest 89 | |使用最新版本的 ComfyUI 前端 90 | 91 | |--fast 92 | |使用实验性的高性能模式,对 40 系显卡 + CUDA 12.4 + 最新 PyTorch + fp8-e4m3fn 模型可达 40% 性能提升。但也有可能造成图像质量劣化。 93 | https://github.com/comfyanonymous/ComfyUI/commit/9953f22fce0ba899da0676a0b374e5d1f72bf259[来源] 94 | |=== 95 | 96 | 更多启动参数见 ComfyUI 的 97 | https://github.com/comfyanonymous/ComfyUI/blob/master/comfy/cli_args.py[cli_args.py] 98 | 。 99 | 100 | 101 | [[env-vars]] 102 | ## 环境变量参考 103 | 104 | [cols="2,2,3"] 105 | |=== 106 | |变量名|参考值|备注 107 | 108 | |HTTP_PROXY + 109 | HTTPS_PROXY 110 | |http://localhost:1081 + 111 | http://localhost:1081 112 | |设置 HTTP 代理。 113 | 114 | |PIP_INDEX_URL 115 | |'https://mirrors.cernet.edu.cn/pypi/web/simple' 116 | |设置 PyPI 镜像站点。 117 | 118 | |HF_ENDPOINT 119 | |'https://hf-mirror.com' 120 | |设置 HuggingFace 镜像站点。 121 | 122 | |HF_TOKEN 123 | |'hf_your_token' 124 | |设置 HuggingFace 125 | https://huggingface.co/settings/tokens[访问令牌] 126 | (Access Token)。 127 | 128 | |HF_HUB_ENABLE_HF_TRANSFER 129 | |1 130 | |启用 HuggingFace Hub 实验性高速传输,仅对 >1000Mbps 且十分稳定的连接有意义(比如云服务器)。 131 | https://huggingface.co/docs/huggingface_hub/hf_transfer[文档] 132 | 133 | |TORCH_CUDA_ARCH_LIST 134 | |7.5 + 135 | 或 + 136 | '5.2+PTX;6.0;6.1+PTX;7.5;8.0;8.6;8.9+PTX' 137 | |设置 PyTorch 及扩展的编译目标(CUDA 架构版本)。 138 | 对于大多数用户,无需设置,在 Linux 下会自动选择。 139 | 如有需要,一般仅需设置自己的 GPU 这一个目标。 140 | https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/[参考] 141 | 142 | |CMAKE_ARGS 143 | |'-DBUILD_opencv_world=ON -DWITH_CUDA=ON -DCUDA_FAST_MATH=ON -DWITH_CUBLAS=ON -DWITH_NVCUVID=ON' 144 | |设置 CMAKE 编译参数,脚本中已默认设置,一般情况无需调整。 145 | 146 | |=== 147 | -------------------------------------------------------------------------------- /cu124-megapak/builder-scripts/generate-pak5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo '#' > pak5.txt 5 | 6 | array=( 7 | https://github.com/comfyanonymous/ComfyUI/raw/refs/heads/master/requirements.txt 8 | https://github.com/crystian/ComfyUI-Crystools/raw/refs/heads/main/requirements.txt 9 | https://github.com/cubiq/ComfyUI_essentials/raw/refs/heads/main/requirements.txt 10 | https://github.com/cubiq/ComfyUI_FaceAnalysis/raw/refs/heads/main/requirements.txt 11 | https://github.com/cubiq/ComfyUI_InstantID/raw/refs/heads/main/requirements.txt 12 | https://github.com/cubiq/PuLID_ComfyUI/raw/refs/heads/main/requirements.txt 13 | https://github.com/Fannovel16/comfyui_controlnet_aux/raw/refs/heads/main/requirements.txt 14 | https://github.com/Fannovel16/ComfyUI-Frame-Interpolation/raw/refs/heads/main/requirements-no-cupy.txt 15 | https://github.com/FizzleDorf/ComfyUI_FizzNodes/raw/refs/heads/main/requirements.txt 16 | https://github.com/Gourieff/ComfyUI-ReActor/raw/refs/heads/main/requirements.txt 17 | https://github.com/huchenlei/ComfyUI-layerdiffuse/raw/refs/heads/main/requirements.txt 18 | https://github.com/jags111/efficiency-nodes-comfyui/raw/refs/heads/main/requirements.txt 19 | https://github.com/kijai/ComfyUI-KJNodes/raw/refs/heads/main/requirements.txt 20 | https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite/raw/refs/heads/main/requirements.txt 21 | https://github.com/ltdrdata/ComfyUI-Impact-Pack/raw/refs/heads/Main/requirements.txt 22 | https://github.com/ltdrdata/ComfyUI-Impact-Subpack/raw/refs/heads/main/requirements.txt 23 | https://github.com/ltdrdata/ComfyUI-Inspire-Pack/raw/refs/heads/main/requirements.txt 24 | https://github.com/ltdrdata/ComfyUI-Manager/raw/refs/heads/main/requirements.txt 25 | https://github.com/melMass/comfy_mtb/raw/refs/heads/main/requirements.txt 26 | https://github.com/storyicon/comfyui_segment_anything/raw/refs/heads/main/requirements.txt 27 | https://github.com/WASasquatch/was-node-suite-comfyui/raw/refs/heads/main/requirements.txt 28 | ) 29 | 30 | for line in "${array[@]}"; 31 | do curl -w "\n" -sSL "${line}" >> pak5.txt 32 | done 33 | 34 | sed -i '/^#/d' pak5.txt 35 | sed -i 's/[[:space:]]*$//' pak5.txt 36 | sed -i 's/>=.*$//' pak5.txt 37 | sed -i 's/_/-/g' pak5.txt 38 | 39 | # Don't "sort foo.txt >foo.txt". See: https://stackoverflow.com/a/29244408 40 | sort -ufo pak5.txt pak5.txt 41 | 42 | # Remove duplicate items, compare to pak3.txt 43 | grep -Fixv -f pak3.txt pak5.txt > temp.txt && mv temp.txt pak5.txt 44 | 45 | echo " generated. Check before use." 46 | -------------------------------------------------------------------------------- /cu124-megapak/builder-scripts/pak3.txt: -------------------------------------------------------------------------------- 1 | # 'cupy-cuda12x' for Frame Interpolation 2 | # 'compel lark' for smZNodes 3 | # 'torchdiffeq' for DepthFM 4 | # 'fairscale' for APISR 5 | accelerate 6 | compel 7 | cupy-cuda12x 8 | diffusers 9 | fairscale 10 | ftfy 11 | huggingface-hub[hf-transfer] 12 | imageio 13 | joblib 14 | kornia 15 | lark 16 | matplotlib 17 | # Temp fix for mediapipe 18 | onnx==1.16.2 19 | onnxruntime-gpu 20 | opencv-contrib-python-headless 21 | pandas 22 | pilgram 23 | pillow 24 | pygit2 25 | python-ffmpeg 26 | regex 27 | scikit-build-core 28 | scikit-image 29 | scikit-learn 30 | scipy 31 | timm 32 | torchdiffeq 33 | torchmetrics 34 | transformers 35 | -------------------------------------------------------------------------------- /cu124-megapak/builder-scripts/pak5.txt: -------------------------------------------------------------------------------- 1 | addict 2 | aiohttp 3 | albumentations 4 | cachetools 5 | clip-interrogator 6 | color-matcher 7 | colour-science 8 | deepdiff 9 | dill 10 | einops 11 | filelock 12 | fvcore 13 | GitPython 14 | imageio-ffmpeg 15 | importlib-metadata 16 | matrix-client==0.4.0 17 | mediapipe 18 | mss 19 | numba 20 | numexpr 21 | omegaconf 22 | piexif 23 | pixeloe 24 | psutil 25 | py-cpuinfo 26 | PyGithub 27 | pynvml 28 | python-dateutil 29 | pyyaml 30 | qrcode[pil] 31 | rembg 32 | requirements-parser 33 | rich 34 | rich-argparse 35 | safetensors 36 | segment-anything 37 | sentencepiece 38 | simpleeval 39 | soundfile 40 | spandrel 41 | svglib 42 | tokenizers 43 | toml 44 | torchsde 45 | tqdm 46 | transparent-background 47 | trimesh[easy] 48 | typer 49 | typing-extensions 50 | ultralytics 51 | uv 52 | webcolors 53 | yacs 54 | yapf 55 | -------------------------------------------------------------------------------- /cu124-megapak/builder-scripts/pak7.txt: -------------------------------------------------------------------------------- 1 | dlib 2 | facexlib 3 | insightface 4 | git+https://github.com/openai/CLIP.git 5 | git+https://github.com/WASasquatch/cstr 6 | git+https://github.com/WASasquatch/ffmpy.git 7 | git+https://github.com/WASasquatch/img2texture.git 8 | -------------------------------------------------------------------------------- /cu124-megapak/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | comfyui: 4 | init: true 5 | container_name: comfyui 6 | build: 7 | context: . 8 | dockerfile: Dockerfile 9 | image: "yanwk/comfyui-boot:cu124-megapak" 10 | ports: 11 | - "8188:8188" 12 | volumes: 13 | - "./storage:/root" 14 | environment: 15 | - CLI_ARGS= 16 | security_opt: 17 | - "label=type:nvidia_container_t" 18 | deploy: 19 | resources: 20 | reservations: 21 | devices: 22 | - driver: nvidia 23 | device_ids: ['0'] 24 | capabilities: [gpu] 25 | -------------------------------------------------------------------------------- /cu124-megapak/runner-scripts/download-models.txt: -------------------------------------------------------------------------------- 1 | # Checkpoints 2 | 3 | https://huggingface.co/Comfy-Org/flux1-schnell/resolve/main/flux1-schnell-fp8.safetensors 4 | dir=checkpoints 5 | out=flux1-schnell-fp8.safetensors 6 | 7 | # VAE 8 | 9 | https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors 10 | dir=vae 11 | out=vae-ft-mse-840000-ema-pruned.safetensors 12 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesd_decoder.pth 13 | dir=vae_approx 14 | out=taesd_decoder.pth 15 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesdxl_decoder.pth 16 | dir=vae_approx 17 | out=taesdxl_decoder.pth 18 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesd3_decoder.pth 19 | dir=vae_approx 20 | out=taesd3_decoder.pth 21 | https://raw.githubusercontent.com/madebyollin/taesd/main/taef1_decoder.pth 22 | dir=vae_approx 23 | out=taef1_decoder.pth 24 | 25 | # Upscale 26 | 27 | https://huggingface.co/gemasai/4x_NMKD-Siax_200k/resolve/main/4x_NMKD-Siax_200k.pth 28 | dir=upscale_models 29 | out=4x_NMKD-Siax_200k.pth 30 | https://huggingface.co/uwg/upscaler/resolve/main/ESRGAN/4x_foolhardy_Remacri.pth 31 | dir=upscale_models 32 | out=4x_foolhardy_Remacri.pth 33 | https://huggingface.co/uwg/upscaler/resolve/main/ESRGAN/8x_NMKD-Superscale_150000_G.pth 34 | dir=upscale_models 35 | out=8x_NMKD-Superscale_150000_G.pth 36 | 37 | # Embeddings 38 | 39 | https://huggingface.co/datasets/gsdf/EasyNegative/resolve/main/EasyNegative.safetensors 40 | dir=embeddings 41 | out=easynegative.safetensors 42 | https://huggingface.co/lenML/DeepNegative/resolve/main/NG_DeepNegative_V1_75T.pt 43 | dir=embeddings 44 | out=ng_deepnegative_v1_75t.pt 45 | -------------------------------------------------------------------------------- /cu124-megapak/runner-scripts/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Run user's set-proxy script 6 | cd /root 7 | if [ ! -f "/root/user-scripts/set-proxy.sh" ] ; then 8 | mkdir -p /root/user-scripts 9 | cp /runner-scripts/set-proxy.sh.example /root/user-scripts/set-proxy.sh 10 | else 11 | echo "[INFO] Running set-proxy script..." 12 | 13 | chmod +x /root/user-scripts/set-proxy.sh 14 | source /root/user-scripts/set-proxy.sh 15 | fi ; 16 | 17 | # Install ComfyUI 18 | cd /root 19 | if [ ! -f "/root/.download-complete" ] ; then 20 | chmod +x /runner-scripts/download.sh 21 | bash /runner-scripts/download.sh 22 | fi ; 23 | 24 | # Run user's pre-start script 25 | cd /root 26 | if [ ! -f "/root/user-scripts/pre-start.sh" ] ; then 27 | mkdir -p /root/user-scripts 28 | cp /runner-scripts/pre-start.sh.example /root/user-scripts/pre-start.sh 29 | else 30 | echo "[INFO] Running pre-start script..." 31 | 32 | chmod +x /root/user-scripts/pre-start.sh 33 | source /root/user-scripts/pre-start.sh 34 | fi ; 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] Starting ComfyUI..." 39 | echo "########################################" 40 | 41 | # Let .pyc files be stored in one place 42 | export PYTHONPYCACHEPREFIX="/root/.cache/pycache" 43 | # Let PIP install packages to /root/.local 44 | export PIP_USER=true 45 | # Add above to PATH 46 | export PATH="${PATH}:/root/.local/bin" 47 | # Suppress [WARNING: Running pip as the 'root' user] 48 | export PIP_ROOT_USER_ACTION=ignore 49 | 50 | cd /root 51 | 52 | python3 ./ComfyUI/main.py --listen --port 8188 ${CLI_ARGS} 53 | -------------------------------------------------------------------------------- /cu124-megapak/runner-scripts/pre-start.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo "[INFO] Continue without pre-start script." 5 | -------------------------------------------------------------------------------- /cu124-megapak/runner-scripts/set-proxy.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | # Tip: Within containers, you cannot access your host machine via 127.0.0.1. 5 | # You will need "host.docker.internal"(for Docker) or "host.containers.internal"(for Podman) 6 | 7 | # Example of setting proxy 8 | #export HTTP_PROXY=http://host.docker.internal:1081 9 | #export HTTPS_PROXY=$HTTP_PROXY 10 | #export http_proxy=$HTTP_PROXY 11 | #export https_proxy=$HTTP_PROXY 12 | #export NO_PROXY="localhost,*.local,*.internal,[::1],fd00::/7, 13 | #10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16, 14 | #10.*,127.*,169.254.*,172.16.*,172.17.*,172.18.*,172.19.*,172.20.*, 15 | #172.21.*,172.22.*,172.23.*,172.24.*,172.25.*,172.26.*,172.27.*, 16 | #172.28.*,172.29.*,172.30.*,172.31.*,172.32.*,192.168.*, 17 | #*.cn,ghproxy.com,*.ghproxy.com,ghproxy.org,*.ghproxy.org, 18 | #gh-proxy.com,*.gh-proxy.com,ghproxy.net,*.ghproxy.net" 19 | #export no_proxy=$NO_PROXY 20 | #echo "[INFO] Proxy set to $HTTP_PROXY" 21 | 22 | echo "[INFO] Continue without proxy." 23 | -------------------------------------------------------------------------------- /cu124-slim/builder-scripts/generate-pak5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo '#' > pak5.txt 5 | 6 | array=( 7 | https://github.com/comfyanonymous/ComfyUI/raw/refs/heads/master/requirements.txt 8 | https://github.com/crystian/ComfyUI-Crystools/raw/refs/heads/main/requirements.txt 9 | https://github.com/cubiq/ComfyUI_essentials/raw/refs/heads/main/requirements.txt 10 | https://github.com/cubiq/ComfyUI_FaceAnalysis/raw/refs/heads/main/requirements.txt 11 | https://github.com/cubiq/ComfyUI_InstantID/raw/refs/heads/main/requirements.txt 12 | https://github.com/cubiq/PuLID_ComfyUI/raw/refs/heads/main/requirements.txt 13 | https://github.com/Fannovel16/comfyui_controlnet_aux/raw/refs/heads/main/requirements.txt 14 | https://github.com/Fannovel16/ComfyUI-Frame-Interpolation/raw/refs/heads/main/requirements-no-cupy.txt 15 | https://github.com/FizzleDorf/ComfyUI_FizzNodes/raw/refs/heads/main/requirements.txt 16 | https://github.com/Gourieff/ComfyUI-ReActor/raw/refs/heads/main/requirements.txt 17 | https://github.com/huchenlei/ComfyUI-layerdiffuse/raw/refs/heads/main/requirements.txt 18 | https://github.com/jags111/efficiency-nodes-comfyui/raw/refs/heads/main/requirements.txt 19 | https://github.com/kijai/ComfyUI-KJNodes/raw/refs/heads/main/requirements.txt 20 | https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite/raw/refs/heads/main/requirements.txt 21 | https://github.com/ltdrdata/ComfyUI-Impact-Pack/raw/refs/heads/Main/requirements.txt 22 | https://github.com/ltdrdata/ComfyUI-Impact-Subpack/raw/refs/heads/main/requirements.txt 23 | https://github.com/ltdrdata/ComfyUI-Inspire-Pack/raw/refs/heads/main/requirements.txt 24 | https://github.com/ltdrdata/ComfyUI-Manager/raw/refs/heads/main/requirements.txt 25 | https://github.com/melMass/comfy_mtb/raw/refs/heads/main/requirements.txt 26 | https://github.com/storyicon/comfyui_segment_anything/raw/refs/heads/main/requirements.txt 27 | https://github.com/WASasquatch/was-node-suite-comfyui/raw/refs/heads/main/requirements.txt 28 | ) 29 | 30 | for line in "${array[@]}"; 31 | do curl -w "\n" -sSL "${line}" >> pak5.txt 32 | done 33 | 34 | sed -i '/^#/d' pak5.txt 35 | sed -i 's/[[:space:]]*$//' pak5.txt 36 | sed -i 's/>=.*$//' pak5.txt 37 | sed -i 's/_/-/g' pak5.txt 38 | 39 | # Don't "sort foo.txt >foo.txt". See: https://stackoverflow.com/a/29244408 40 | sort -ufo pak5.txt pak5.txt 41 | 42 | # Remove duplicate items, compare to pak3.txt 43 | grep -Fixv -f pak3.txt pak5.txt > temp.txt && mv temp.txt pak5.txt 44 | 45 | echo " generated. Check before use." 46 | -------------------------------------------------------------------------------- /cu124-slim/builder-scripts/pak3.txt: -------------------------------------------------------------------------------- 1 | # 'cupy-cuda12x' for Frame Interpolation 2 | # 'compel lark' for smZNodes 3 | # 'torchdiffeq' for DepthFM 4 | # 'fairscale' for APISR 5 | accelerate 6 | compel 7 | cupy-cuda12x 8 | diffusers 9 | fairscale 10 | ftfy 11 | huggingface-hub[hf-transfer] 12 | imageio 13 | joblib 14 | kornia 15 | lark 16 | matplotlib 17 | # Temp fix for mediapipe 18 | onnx==1.16.2 19 | onnxruntime-gpu 20 | opencv-contrib-python-headless 21 | pandas 22 | pilgram 23 | pillow 24 | pygit2 25 | python-ffmpeg 26 | regex 27 | scikit-build-core 28 | scikit-image 29 | scikit-learn 30 | scipy 31 | timm 32 | torchdiffeq 33 | torchmetrics 34 | transformers 35 | -------------------------------------------------------------------------------- /cu124-slim/builder-scripts/pak5.txt: -------------------------------------------------------------------------------- 1 | addict 2 | aiohttp 3 | albumentations 4 | cachetools 5 | clip-interrogator 6 | color-matcher 7 | colour-science 8 | deepdiff 9 | dill 10 | einops 11 | filelock 12 | fvcore 13 | GitPython 14 | imageio-ffmpeg 15 | importlib-metadata 16 | matrix-client==0.4.0 17 | mediapipe 18 | mss 19 | numba 20 | numexpr 21 | omegaconf 22 | piexif 23 | pixeloe 24 | psutil 25 | py-cpuinfo 26 | PyGithub 27 | pynvml 28 | python-dateutil 29 | pyyaml 30 | qrcode[pil] 31 | rembg 32 | requirements-parser 33 | rich 34 | rich-argparse 35 | safetensors 36 | segment-anything 37 | sentencepiece 38 | simpleeval 39 | soundfile 40 | spandrel 41 | svglib 42 | tokenizers 43 | toml 44 | torchsde 45 | tqdm 46 | transparent-background 47 | trimesh[easy] 48 | typer 49 | typing-extensions 50 | ultralytics 51 | uv 52 | webcolors 53 | yacs 54 | yapf 55 | -------------------------------------------------------------------------------- /cu124-slim/builder-scripts/pak7.txt: -------------------------------------------------------------------------------- 1 | dlib 2 | facexlib 3 | insightface 4 | git+https://github.com/openai/CLIP.git 5 | git+https://github.com/WASasquatch/cstr 6 | git+https://github.com/WASasquatch/ffmpy.git 7 | git+https://github.com/WASasquatch/img2texture.git 8 | -------------------------------------------------------------------------------- /cu124-slim/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | comfyui: 4 | init: true 5 | container_name: comfyui 6 | build: 7 | context: . 8 | dockerfile: Dockerfile 9 | image: "yanwk/comfyui-boot:cu124-slim" 10 | ports: 11 | - "8188:8188" 12 | volumes: 13 | - "./storage:/root" 14 | environment: 15 | - CLI_ARGS= 16 | security_opt: 17 | - "label=type:nvidia_container_t" 18 | deploy: 19 | resources: 20 | reservations: 21 | devices: 22 | - driver: nvidia 23 | device_ids: ['0'] 24 | capabilities: [gpu] 25 | -------------------------------------------------------------------------------- /cu124-slim/runner-scripts/download-models.txt: -------------------------------------------------------------------------------- 1 | # TAESD models for high-quality on-the-fly previews 2 | 3 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesd_decoder.pth 4 | dir=vae_approx 5 | out=taesd_decoder.pth 6 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesdxl_decoder.pth 7 | dir=vae_approx 8 | out=taesdxl_decoder.pth 9 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesd3_decoder.pth 10 | dir=vae_approx 11 | out=taesd3_decoder.pth 12 | https://raw.githubusercontent.com/madebyollin/taesd/main/taef1_decoder.pth 13 | dir=vae_approx 14 | out=taef1_decoder.pth 15 | -------------------------------------------------------------------------------- /cu124-slim/runner-scripts/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | # Note: the "${BASH_REMATCH[2]}" here is REPO_NAME 6 | # from [https://example.com/somebody/REPO_NAME.git] or [git@example.com:somebody/REPO_NAME.git] 7 | function clone_or_pull () { 8 | if [[ $1 =~ ^(.*[/:])(.*)(\.git)$ ]] || [[ $1 =~ ^(http.*\/)(.*)$ ]]; then 9 | echo "${BASH_REMATCH[2]}" ; 10 | set +e ; 11 | git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules "$1" \ 12 | || git -C "${BASH_REMATCH[2]}" pull --ff-only ; 13 | set -e ; 14 | else 15 | echo "[ERROR] Invalid URL: $1" ; 16 | return 1 ; 17 | fi ; 18 | } 19 | 20 | 21 | echo "########################################" 22 | echo "[INFO] Downloading ComfyUI & Manager..." 23 | echo "########################################" 24 | 25 | set +e 26 | cd /root 27 | git clone https://github.com/comfyanonymous/ComfyUI.git || git -C "ComfyUI" pull --ff-only 28 | cd /root/ComfyUI 29 | # Using stable version (has a release tag) 30 | git reset --hard "$(git tag | grep -e '^v' | sort -V | tail -1)" 31 | set -e 32 | 33 | cd /root/ComfyUI/custom_nodes 34 | clone_or_pull https://github.com/ltdrdata/ComfyUI-Manager.git 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] Downloading Models..." 39 | echo "########################################" 40 | 41 | # Models 42 | cd /root/ComfyUI/models 43 | aria2c \ 44 | --input-file=/runner-scripts/download-models.txt \ 45 | --allow-overwrite=false \ 46 | --auto-file-renaming=false \ 47 | --continue=true \ 48 | --max-connection-per-server=5 49 | 50 | # Finish 51 | touch /root/.download-complete 52 | -------------------------------------------------------------------------------- /cu124-slim/runner-scripts/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Run user's set-proxy script 6 | cd /root 7 | if [ ! -f "/root/user-scripts/set-proxy.sh" ] ; then 8 | mkdir -p /root/user-scripts 9 | cp /runner-scripts/set-proxy.sh.example /root/user-scripts/set-proxy.sh 10 | else 11 | echo "[INFO] Running set-proxy script..." 12 | 13 | chmod +x /root/user-scripts/set-proxy.sh 14 | source /root/user-scripts/set-proxy.sh 15 | fi ; 16 | 17 | # Install ComfyUI 18 | cd /root 19 | if [ ! -f "/root/.download-complete" ] ; then 20 | chmod +x /runner-scripts/download.sh 21 | bash /runner-scripts/download.sh 22 | fi ; 23 | 24 | # Run user's pre-start script 25 | cd /root 26 | if [ ! -f "/root/user-scripts/pre-start.sh" ] ; then 27 | mkdir -p /root/user-scripts 28 | cp /runner-scripts/pre-start.sh.example /root/user-scripts/pre-start.sh 29 | else 30 | echo "[INFO] Running pre-start script..." 31 | 32 | chmod +x /root/user-scripts/pre-start.sh 33 | source /root/user-scripts/pre-start.sh 34 | fi ; 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] Starting ComfyUI..." 39 | echo "########################################" 40 | 41 | # Let .pyc files be stored in one place 42 | export PYTHONPYCACHEPREFIX="/root/.cache/pycache" 43 | # Let PIP install packages to /root/.local 44 | export PIP_USER=true 45 | # Add above to PATH 46 | export PATH="${PATH}:/root/.local/bin" 47 | # Suppress [WARNING: Running pip as the 'root' user] 48 | export PIP_ROOT_USER_ACTION=ignore 49 | 50 | cd /root 51 | 52 | python3 ./ComfyUI/main.py --listen --port 8188 ${CLI_ARGS} 53 | -------------------------------------------------------------------------------- /cu124-slim/runner-scripts/pre-start.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo "[INFO] Continue without pre-start script." 5 | -------------------------------------------------------------------------------- /cu124-slim/runner-scripts/set-proxy.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | # Tip: Within containers, you cannot access your host machine via 127.0.0.1. 5 | # You can use "host.docker.internal"(for Docker) or "host.containers.internal"(for Podman) 6 | 7 | # Example of setting proxy 8 | #export HTTP_PROXY=http://host.docker.internal:1081 9 | #export HTTPS_PROXY=$HTTP_PROXY 10 | #export http_proxy=$HTTP_PROXY 11 | #export https_proxy=$HTTP_PROXY 12 | #export NO_PROXY="localhost,*.local,*.internal,[::1],fd00::/7, 13 | #10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16, 14 | #10.*,127.*,169.254.*,172.16.*,172.17.*,172.18.*,172.19.*,172.20.*, 15 | #172.21.*,172.22.*,172.23.*,172.24.*,172.25.*,172.26.*,172.27.*, 16 | #172.28.*,172.29.*,172.30.*,172.31.*,172.32.*,192.168.*" 17 | #export no_proxy=$NO_PROXY 18 | #echo "[INFO] Proxy set to $HTTP_PROXY" 19 | 20 | echo "[INFO] Continue without proxy." 21 | -------------------------------------------------------------------------------- /cu126-slim/README.txt: -------------------------------------------------------------------------------- 1 | This Docker image is confirmed working. 2 | 3 | But I plan to skip this version (cu126), and directly go for cu128. 4 | 5 | If you want to use this image, the usage is the same as cu124-slim. 6 | -------------------------------------------------------------------------------- /cu126-slim/builder-scripts/generate-pak5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo '#' > pak5.txt 5 | 6 | array=( 7 | https://github.com/comfyanonymous/ComfyUI/raw/refs/heads/master/requirements.txt 8 | https://github.com/crystian/ComfyUI-Crystools/raw/refs/heads/main/requirements.txt 9 | https://github.com/cubiq/ComfyUI_essentials/raw/refs/heads/main/requirements.txt 10 | https://github.com/cubiq/ComfyUI_FaceAnalysis/raw/refs/heads/main/requirements.txt 11 | https://github.com/cubiq/ComfyUI_InstantID/raw/refs/heads/main/requirements.txt 12 | https://github.com/cubiq/PuLID_ComfyUI/raw/refs/heads/main/requirements.txt 13 | https://github.com/Fannovel16/comfyui_controlnet_aux/raw/refs/heads/main/requirements.txt 14 | https://github.com/Fannovel16/ComfyUI-Frame-Interpolation/raw/refs/heads/main/requirements-no-cupy.txt 15 | https://github.com/FizzleDorf/ComfyUI_FizzNodes/raw/refs/heads/main/requirements.txt 16 | https://github.com/Gourieff/ComfyUI-ReActor/raw/refs/heads/main/requirements.txt 17 | https://github.com/huchenlei/ComfyUI-layerdiffuse/raw/refs/heads/main/requirements.txt 18 | https://github.com/jags111/efficiency-nodes-comfyui/raw/refs/heads/main/requirements.txt 19 | https://github.com/kijai/ComfyUI-KJNodes/raw/refs/heads/main/requirements.txt 20 | https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite/raw/refs/heads/main/requirements.txt 21 | https://github.com/ltdrdata/ComfyUI-Impact-Pack/raw/refs/heads/Main/requirements.txt 22 | https://github.com/ltdrdata/ComfyUI-Impact-Subpack/raw/refs/heads/main/requirements.txt 23 | https://github.com/ltdrdata/ComfyUI-Inspire-Pack/raw/refs/heads/main/requirements.txt 24 | https://github.com/ltdrdata/ComfyUI-Manager/raw/refs/heads/main/requirements.txt 25 | https://github.com/melMass/comfy_mtb/raw/refs/heads/main/requirements.txt 26 | https://github.com/WASasquatch/was-node-suite-comfyui/raw/refs/heads/main/requirements.txt 27 | https://github.com/akatz-ai/ComfyUI-AKatz-Nodes/raw/refs/heads/main/requirements.txt 28 | https://github.com/akatz-ai/ComfyUI-DepthCrafter-Nodes/raw/refs/heads/main/requirements.txt 29 | https://github.com/Amorano/Jovimetrix/raw/refs/heads/main/requirements.txt 30 | https://github.com/chflame163/ComfyUI_LayerStyle/raw/refs/heads/main/repair_dependency_list.txt 31 | https://github.com/chflame163/ComfyUI_LayerStyle/raw/refs/heads/main/requirements.txt 32 | https://github.com/city96/ComfyUI-GGUF/raw/refs/heads/main/requirements.txt 33 | https://github.com/digitaljohn/comfyui-propost/raw/refs/heads/master/requirements.txt 34 | https://github.com/Jonseed/ComfyUI-Detail-Daemon/raw/refs/heads/main/requirements.txt 35 | https://github.com/kijai/ComfyUI-DepthAnythingV2/raw/refs/heads/main/requirements.txt 36 | https://github.com/kijai/ComfyUI-Florence2/raw/refs/heads/main/requirements.txt 37 | https://github.com/neverbiasu/ComfyUI-SAM2/raw/refs/heads/main/requirements.txt 38 | https://github.com/pydn/ComfyUI-to-Python-Extension/raw/refs/heads/main/requirements.txt 39 | https://github.com/yolain/ComfyUI-Easy-Use/raw/refs/heads/main/requirements.txt 40 | ) 41 | 42 | for line in "${array[@]}"; 43 | do curl -w "\n" -sSL "${line}" >> pak5.txt 44 | done 45 | 46 | sed -i '/^#/d' pak5.txt 47 | sed -i 's/[[:space:]]*$//' pak5.txt 48 | sed -i 's/>=.*$//' pak5.txt 49 | sed -i 's/_/-/g' pak5.txt 50 | 51 | # Don't "sort foo.txt >foo.txt". See: https://stackoverflow.com/a/29244408 52 | sort -ufo pak5.txt pak5.txt 53 | 54 | # Remove duplicate items, compare to pak3.txt 55 | grep -Fixv -f pak3.txt pak5.txt > temp.txt && mv temp.txt pak5.txt 56 | 57 | echo " generated. Check before use." 58 | -------------------------------------------------------------------------------- /cu126-slim/builder-scripts/pak3.txt: -------------------------------------------------------------------------------- 1 | # Essentials 2 | accelerate 3 | diffusers 4 | ftfy 5 | huggingface-hub[hf-transfer] 6 | imageio[ffmpeg] 7 | joblib 8 | kornia 9 | matplotlib 10 | omegaconf 11 | #onnx 12 | onnxruntime-gpu 13 | opencv-contrib-python-headless 14 | pandas 15 | pilgram 16 | pillow 17 | pygit2 18 | python-ffmpeg 19 | regex 20 | scikit-build-core 21 | scikit-image 22 | scikit-learn 23 | scipy 24 | timm 25 | torchmetrics 26 | transformers 27 | 28 | # Hand-picks 29 | compel # For smZNodes 30 | cupy-cuda12x # For Frame Interpolation 31 | fairscale # For APISR 32 | lark # For smZNodes 33 | torchdiffeq # For DepthFM 34 | triton 35 | 36 | # Temp fix for mediapipe 37 | onnx==1.16.2 38 | -------------------------------------------------------------------------------- /cu126-slim/builder-scripts/pak5.txt: -------------------------------------------------------------------------------- 1 | addict 2 | aenum 3 | aiohttp 4 | albumentations 5 | black 6 | blendmodes 7 | blend-modes 8 | cachetools 9 | clip-interrogator 10 | color-matcher 11 | colour-science 12 | daltonlens 13 | deepdiff 14 | dill 15 | einops 16 | filelock 17 | fvcore 18 | gguf 19 | GitPython 20 | glfw 21 | hydra-core 22 | imageio-ffmpeg 23 | importlib-metadata 24 | iopath 25 | loguru 26 | markdownify 27 | mediapipe 28 | mido[ports-rtmidi] 29 | mss 30 | numba 31 | numexpr 32 | peft 33 | piexif 34 | pixeloe 35 | psutil 36 | py-cpuinfo 37 | pydub 38 | PyGithub 39 | pymatting 40 | pynvml 41 | PyOpenGL 42 | python-dateutil 43 | pyyaml 44 | qrcode[pil] 45 | rembg 46 | requests 47 | requirements-parser 48 | rich 49 | rich-argparse 50 | safetensors 51 | segment-anything 52 | sentencepiece 53 | simpleeval 54 | soundfile 55 | spandrel 56 | stereoscopy[auto-align] 57 | svglib 58 | tokenizers 59 | toml 60 | torchsde 61 | tqdm 62 | transparent-background 63 | trimesh[easy] 64 | typer 65 | typing-extensions 66 | ultralytics 67 | uv 68 | vnoise 69 | webcolors 70 | yacs 71 | yapf 72 | -------------------------------------------------------------------------------- /cu126-slim/builder-scripts/pak7.txt: -------------------------------------------------------------------------------- 1 | dlib 2 | facexlib 3 | insightface 4 | git+https://github.com/openai/CLIP.git 5 | git+https://github.com/WASasquatch/cstr 6 | git+https://github.com/WASasquatch/ffmpy.git 7 | git+https://github.com/WASasquatch/img2texture.git 8 | -------------------------------------------------------------------------------- /cu126-slim/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | comfyui: 4 | init: true 5 | container_name: comfyui 6 | build: 7 | context: . 8 | dockerfile: Dockerfile 9 | image: "yanwk/comfyui-boot:cu126-slim" 10 | ports: 11 | - "8188:8188" 12 | volumes: 13 | - "./storage:/root" 14 | environment: 15 | - CLI_ARGS= 16 | security_opt: 17 | - "label=type:nvidia_container_t" 18 | deploy: 19 | resources: 20 | reservations: 21 | devices: 22 | - driver: nvidia 23 | device_ids: ['0'] 24 | capabilities: [gpu] 25 | -------------------------------------------------------------------------------- /cu126-slim/runner-scripts/download-models.txt: -------------------------------------------------------------------------------- 1 | # TAESD models for high-quality on-the-fly previews 2 | 3 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesd_decoder.pth 4 | dir=vae_approx 5 | out=taesd_decoder.pth 6 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesdxl_decoder.pth 7 | dir=vae_approx 8 | out=taesdxl_decoder.pth 9 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesd3_decoder.pth 10 | dir=vae_approx 11 | out=taesd3_decoder.pth 12 | https://raw.githubusercontent.com/madebyollin/taesd/main/taef1_decoder.pth 13 | dir=vae_approx 14 | out=taef1_decoder.pth 15 | -------------------------------------------------------------------------------- /cu126-slim/runner-scripts/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | # Note: the "${BASH_REMATCH[2]}" here is REPO_NAME 6 | # from [https://example.com/somebody/REPO_NAME.git] or [git@example.com:somebody/REPO_NAME.git] 7 | function clone_or_pull () { 8 | if [[ $1 =~ ^(.*[/:])(.*)(\.git)$ ]] || [[ $1 =~ ^(http.*\/)(.*)$ ]]; then 9 | echo "${BASH_REMATCH[2]}" ; 10 | set +e ; 11 | git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules "$1" \ 12 | || git -C "${BASH_REMATCH[2]}" pull --ff-only ; 13 | set -e ; 14 | else 15 | echo "[ERROR] Invalid URL: $1" ; 16 | return 1 ; 17 | fi ; 18 | } 19 | 20 | 21 | echo "########################################" 22 | echo "[INFO] Downloading ComfyUI & Manager..." 23 | echo "########################################" 24 | 25 | set +e 26 | cd /root 27 | git clone https://github.com/comfyanonymous/ComfyUI.git || git -C "ComfyUI" pull --ff-only 28 | cd /root/ComfyUI 29 | # Using stable version (has a release tag) 30 | git reset --hard "$(git tag | grep -e '^v' | sort -V | tail -1)" 31 | set -e 32 | 33 | cd /root/ComfyUI/custom_nodes 34 | clone_or_pull https://github.com/ltdrdata/ComfyUI-Manager.git 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] Downloading Models..." 39 | echo "########################################" 40 | 41 | # Models 42 | cd /root/ComfyUI/models 43 | aria2c \ 44 | --input-file=/runner-scripts/download-models.txt \ 45 | --allow-overwrite=false \ 46 | --auto-file-renaming=false \ 47 | --continue=true \ 48 | --max-connection-per-server=5 49 | 50 | # Finish 51 | touch /root/.download-complete 52 | -------------------------------------------------------------------------------- /cu126-slim/runner-scripts/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Run user's set-proxy script 6 | cd /root 7 | if [ ! -f "/root/user-scripts/set-proxy.sh" ] ; then 8 | mkdir -p /root/user-scripts 9 | cp /runner-scripts/set-proxy.sh.example /root/user-scripts/set-proxy.sh 10 | else 11 | echo "[INFO] Running set-proxy script..." 12 | 13 | chmod +x /root/user-scripts/set-proxy.sh 14 | source /root/user-scripts/set-proxy.sh 15 | fi ; 16 | 17 | # Install ComfyUI 18 | cd /root 19 | if [ ! -f "/root/.download-complete" ] ; then 20 | chmod +x /runner-scripts/download.sh 21 | bash /runner-scripts/download.sh 22 | fi ; 23 | 24 | # Run user's pre-start script 25 | cd /root 26 | if [ ! -f "/root/user-scripts/pre-start.sh" ] ; then 27 | mkdir -p /root/user-scripts 28 | cp /runner-scripts/pre-start.sh.example /root/user-scripts/pre-start.sh 29 | else 30 | echo "[INFO] Running pre-start script..." 31 | 32 | chmod +x /root/user-scripts/pre-start.sh 33 | source /root/user-scripts/pre-start.sh 34 | fi ; 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] Starting ComfyUI..." 39 | echo "########################################" 40 | 41 | # Let .pyc files be stored in one place 42 | export PYTHONPYCACHEPREFIX="/root/.cache/pycache" 43 | # Let PIP install packages to /root/.local 44 | export PIP_USER=true 45 | # Add above to PATH 46 | export PATH="${PATH}:/root/.local/bin" 47 | # Suppress [WARNING: Running pip as the 'root' user] 48 | export PIP_ROOT_USER_ACTION=ignore 49 | 50 | cd /root 51 | 52 | python3 ./ComfyUI/main.py --listen --port 8188 ${CLI_ARGS} 53 | -------------------------------------------------------------------------------- /cu126-slim/runner-scripts/pre-start.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo "[INFO] Continue without pre-start script." 5 | -------------------------------------------------------------------------------- /cu126-slim/runner-scripts/set-proxy.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | # Tip: Within containers, you cannot access your host machine via 127.0.0.1. 5 | # You can use "host.docker.internal"(for Docker) or "host.containers.internal"(for Podman) 6 | 7 | # Example of setting proxy 8 | #export HTTP_PROXY=http://host.docker.internal:1081 9 | #export HTTPS_PROXY=$HTTP_PROXY 10 | #export http_proxy=$HTTP_PROXY 11 | #export https_proxy=$HTTP_PROXY 12 | #export NO_PROXY="localhost,*.local,*.internal,[::1],fd00::/7, 13 | #10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16, 14 | #10.*,127.*,169.254.*,172.16.*,172.17.*,172.18.*,172.19.*,172.20.*, 15 | #172.21.*,172.22.*,172.23.*,172.24.*,172.25.*,172.26.*,172.27.*, 16 | #172.28.*,172.29.*,172.30.*,172.31.*,172.32.*,192.168.*" 17 | #export no_proxy=$NO_PROXY 18 | #echo "[INFO] Proxy set to $HTTP_PROXY" 19 | 20 | echo "[INFO] Continue without proxy." 21 | -------------------------------------------------------------------------------- /cu128-test/README.txt: -------------------------------------------------------------------------------- 1 | This Docker image pre-installed PyTorch 2.7 with libs for CUDA 12.8. 2 | 3 | Note that xFormers is not installed, as it doesn't provide official support for test-version of PyTorch. 4 | 5 | Usage 6 | 7 | ---- 8 | mkdir -p storage 9 | 10 | docker run -it --rm \ 11 | --name comfyui-cu128 \ 12 | --gpus all \ 13 | -p 8188:8188 \ 14 | -v "$(pwd)"/storage:/root \ 15 | -e CLI_ARGS="--fast" \ 16 | yanwk/comfyui-boot:cu128-test 17 | ---- 18 | -------------------------------------------------------------------------------- /cu128-test/builder-scripts/generate-pak5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo '#' > pak5.txt 5 | 6 | array=( 7 | https://github.com/comfyanonymous/ComfyUI/raw/refs/heads/master/requirements.txt 8 | https://github.com/crystian/ComfyUI-Crystools/raw/refs/heads/main/requirements.txt 9 | https://github.com/cubiq/ComfyUI_essentials/raw/refs/heads/main/requirements.txt 10 | https://github.com/cubiq/ComfyUI_FaceAnalysis/raw/refs/heads/main/requirements.txt 11 | https://github.com/cubiq/ComfyUI_InstantID/raw/refs/heads/main/requirements.txt 12 | https://github.com/cubiq/PuLID_ComfyUI/raw/refs/heads/main/requirements.txt 13 | https://github.com/Fannovel16/comfyui_controlnet_aux/raw/refs/heads/main/requirements.txt 14 | https://github.com/Fannovel16/ComfyUI-Frame-Interpolation/raw/refs/heads/main/requirements-no-cupy.txt 15 | https://github.com/FizzleDorf/ComfyUI_FizzNodes/raw/refs/heads/main/requirements.txt 16 | https://github.com/Gourieff/ComfyUI-ReActor/raw/refs/heads/main/requirements.txt 17 | https://github.com/huchenlei/ComfyUI-layerdiffuse/raw/refs/heads/main/requirements.txt 18 | https://github.com/jags111/efficiency-nodes-comfyui/raw/refs/heads/main/requirements.txt 19 | https://github.com/kijai/ComfyUI-KJNodes/raw/refs/heads/main/requirements.txt 20 | https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite/raw/refs/heads/main/requirements.txt 21 | https://github.com/ltdrdata/ComfyUI-Impact-Pack/raw/refs/heads/Main/requirements.txt 22 | https://github.com/ltdrdata/ComfyUI-Impact-Subpack/raw/refs/heads/main/requirements.txt 23 | https://github.com/ltdrdata/ComfyUI-Inspire-Pack/raw/refs/heads/main/requirements.txt 24 | https://github.com/ltdrdata/ComfyUI-Manager/raw/refs/heads/main/requirements.txt 25 | https://github.com/melMass/comfy_mtb/raw/refs/heads/main/requirements.txt 26 | https://github.com/WASasquatch/was-node-suite-comfyui/raw/refs/heads/main/requirements.txt 27 | https://github.com/akatz-ai/ComfyUI-AKatz-Nodes/raw/refs/heads/main/requirements.txt 28 | https://github.com/akatz-ai/ComfyUI-DepthCrafter-Nodes/raw/refs/heads/main/requirements.txt 29 | https://github.com/Amorano/Jovimetrix/raw/refs/heads/main/requirements.txt 30 | https://github.com/chflame163/ComfyUI_LayerStyle/raw/refs/heads/main/repair_dependency_list.txt 31 | https://github.com/chflame163/ComfyUI_LayerStyle/raw/refs/heads/main/requirements.txt 32 | https://github.com/city96/ComfyUI-GGUF/raw/refs/heads/main/requirements.txt 33 | https://github.com/digitaljohn/comfyui-propost/raw/refs/heads/master/requirements.txt 34 | https://github.com/Jonseed/ComfyUI-Detail-Daemon/raw/refs/heads/main/requirements.txt 35 | https://github.com/kijai/ComfyUI-DepthAnythingV2/raw/refs/heads/main/requirements.txt 36 | https://github.com/kijai/ComfyUI-Florence2/raw/refs/heads/main/requirements.txt 37 | https://github.com/neverbiasu/ComfyUI-SAM2/raw/refs/heads/main/requirements.txt 38 | https://github.com/pydn/ComfyUI-to-Python-Extension/raw/refs/heads/main/requirements.txt 39 | https://github.com/yolain/ComfyUI-Easy-Use/raw/refs/heads/main/requirements.txt 40 | ) 41 | 42 | for line in "${array[@]}"; 43 | do curl -w "\n" -sSL "${line}" >> pak5.txt 44 | done 45 | 46 | sed -i '/^#/d' pak5.txt 47 | sed -i 's/[[:space:]]*$//' pak5.txt 48 | sed -i 's/>=.*$//' pak5.txt 49 | sed -i 's/_/-/g' pak5.txt 50 | 51 | # Don't "sort foo.txt >foo.txt". See: https://stackoverflow.com/a/29244408 52 | sort -ufo pak5.txt pak5.txt 53 | 54 | # Remove duplicate items, compare to pak3.txt 55 | grep -Fixv -f pak3.txt pak5.txt > temp.txt && mv temp.txt pak5.txt 56 | 57 | echo " generated. Check before use." 58 | -------------------------------------------------------------------------------- /cu128-test/builder-scripts/pak3.txt: -------------------------------------------------------------------------------- 1 | # Essentials 2 | accelerate 3 | diffusers 4 | ftfy 5 | huggingface-hub[hf-transfer] 6 | imageio[ffmpeg] 7 | joblib 8 | kornia 9 | matplotlib 10 | omegaconf 11 | #onnx 12 | onnxruntime-gpu 13 | opencv-contrib-python-headless 14 | pandas 15 | pilgram 16 | pillow 17 | pygit2 18 | python-ffmpeg 19 | regex 20 | scikit-build-core 21 | scikit-image 22 | scikit-learn 23 | scipy 24 | timm 25 | torchmetrics 26 | transformers 27 | 28 | # Hand-picks 29 | compel # For smZNodes 30 | cupy-cuda12x # For Frame Interpolation 31 | fairscale # For APISR 32 | lark # For smZNodes 33 | torchdiffeq # For DepthFM 34 | triton 35 | 36 | # Temp fix for mediapipe 37 | onnx==1.16.2 38 | -------------------------------------------------------------------------------- /cu128-test/builder-scripts/pak5.txt: -------------------------------------------------------------------------------- 1 | addict 2 | aenum 3 | aiohttp 4 | albumentations 5 | black 6 | blendmodes 7 | blend-modes 8 | cachetools 9 | clip-interrogator 10 | color-matcher 11 | colour-science 12 | daltonlens 13 | deepdiff 14 | dill 15 | einops 16 | filelock 17 | fvcore 18 | gguf 19 | GitPython 20 | glfw 21 | hydra-core 22 | imageio-ffmpeg 23 | importlib-metadata 24 | iopath 25 | loguru 26 | markdownify 27 | mediapipe 28 | mido[ports-rtmidi] 29 | mss 30 | numba 31 | numexpr 32 | peft 33 | piexif 34 | pixeloe 35 | psutil 36 | py-cpuinfo 37 | pydub 38 | PyGithub 39 | pymatting 40 | pynvml 41 | PyOpenGL 42 | python-dateutil 43 | pyyaml 44 | qrcode[pil] 45 | rembg 46 | requests 47 | requirements-parser 48 | rich 49 | rich-argparse 50 | safetensors 51 | segment-anything 52 | sentencepiece 53 | simpleeval 54 | soundfile 55 | spandrel 56 | stereoscopy[auto-align] 57 | svglib 58 | tokenizers 59 | toml 60 | torchsde 61 | tqdm 62 | transparent-background 63 | trimesh[easy] 64 | typer 65 | typing-extensions 66 | ultralytics 67 | uv 68 | vnoise 69 | webcolors 70 | yacs 71 | yapf 72 | -------------------------------------------------------------------------------- /cu128-test/builder-scripts/pak7.txt: -------------------------------------------------------------------------------- 1 | dlib 2 | facexlib 3 | insightface 4 | git+https://github.com/openai/CLIP.git 5 | git+https://github.com/WASasquatch/cstr 6 | git+https://github.com/WASasquatch/ffmpy.git 7 | git+https://github.com/WASasquatch/img2texture.git 8 | -------------------------------------------------------------------------------- /cu128-test/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | comfyui: 4 | init: true 5 | container_name: comfyui 6 | build: 7 | context: . 8 | dockerfile: Dockerfile 9 | image: "yanwk/comfyui-boot:cu128-test" 10 | ports: 11 | - "8188:8188" 12 | volumes: 13 | - "./storage:/root" 14 | environment: 15 | - CLI_ARGS= 16 | security_opt: 17 | - "label=type:nvidia_container_t" 18 | deploy: 19 | resources: 20 | reservations: 21 | devices: 22 | - driver: nvidia 23 | device_ids: ['0'] 24 | capabilities: [gpu] 25 | -------------------------------------------------------------------------------- /cu128-test/runner-scripts/download-models.txt: -------------------------------------------------------------------------------- 1 | # TAESD models for high-quality on-the-fly previews 2 | 3 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesd_decoder.pth 4 | dir=vae_approx 5 | out=taesd_decoder.pth 6 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesdxl_decoder.pth 7 | dir=vae_approx 8 | out=taesdxl_decoder.pth 9 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesd3_decoder.pth 10 | dir=vae_approx 11 | out=taesd3_decoder.pth 12 | https://raw.githubusercontent.com/madebyollin/taesd/main/taef1_decoder.pth 13 | dir=vae_approx 14 | out=taef1_decoder.pth 15 | -------------------------------------------------------------------------------- /cu128-test/runner-scripts/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | # Note: the "${BASH_REMATCH[2]}" here is REPO_NAME 6 | # from [https://example.com/somebody/REPO_NAME.git] or [git@example.com:somebody/REPO_NAME.git] 7 | function clone_or_pull () { 8 | if [[ $1 =~ ^(.*[/:])(.*)(\.git)$ ]] || [[ $1 =~ ^(http.*\/)(.*)$ ]]; then 9 | echo "${BASH_REMATCH[2]}" ; 10 | set +e ; 11 | git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules "$1" \ 12 | || git -C "${BASH_REMATCH[2]}" pull --ff-only ; 13 | set -e ; 14 | else 15 | echo "[ERROR] Invalid URL: $1" ; 16 | return 1 ; 17 | fi ; 18 | } 19 | 20 | 21 | echo "########################################" 22 | echo "[INFO] Downloading ComfyUI & Manager..." 23 | echo "########################################" 24 | 25 | set +e 26 | cd /root 27 | git clone https://github.com/comfyanonymous/ComfyUI.git || git -C "ComfyUI" pull --ff-only 28 | cd /root/ComfyUI 29 | # Using stable version (has a release tag) 30 | git reset --hard "$(git tag | grep -e '^v' | sort -V | tail -1)" 31 | set -e 32 | 33 | cd /root/ComfyUI/custom_nodes 34 | clone_or_pull https://github.com/ltdrdata/ComfyUI-Manager.git 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] Downloading Models..." 39 | echo "########################################" 40 | 41 | # Models 42 | cd /root/ComfyUI/models 43 | aria2c \ 44 | --input-file=/runner-scripts/download-models.txt \ 45 | --allow-overwrite=false \ 46 | --auto-file-renaming=false \ 47 | --continue=true \ 48 | --max-connection-per-server=5 49 | 50 | # Finish 51 | touch /root/.download-complete 52 | -------------------------------------------------------------------------------- /cu128-test/runner-scripts/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Run user's set-proxy script 6 | cd /root 7 | if [ ! -f "/root/user-scripts/set-proxy.sh" ] ; then 8 | mkdir -p /root/user-scripts 9 | cp /runner-scripts/set-proxy.sh.example /root/user-scripts/set-proxy.sh 10 | else 11 | echo "[INFO] Running set-proxy script..." 12 | 13 | chmod +x /root/user-scripts/set-proxy.sh 14 | source /root/user-scripts/set-proxy.sh 15 | fi ; 16 | 17 | # Install ComfyUI 18 | cd /root 19 | if [ ! -f "/root/.download-complete" ] ; then 20 | chmod +x /runner-scripts/download.sh 21 | bash /runner-scripts/download.sh 22 | fi ; 23 | 24 | # Run user's pre-start script 25 | cd /root 26 | if [ ! -f "/root/user-scripts/pre-start.sh" ] ; then 27 | mkdir -p /root/user-scripts 28 | cp /runner-scripts/pre-start.sh.example /root/user-scripts/pre-start.sh 29 | else 30 | echo "[INFO] Running pre-start script..." 31 | 32 | chmod +x /root/user-scripts/pre-start.sh 33 | source /root/user-scripts/pre-start.sh 34 | fi ; 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] Starting ComfyUI..." 39 | echo "########################################" 40 | 41 | # Let .pyc files be stored in one place 42 | export PYTHONPYCACHEPREFIX="/root/.cache/pycache" 43 | # Let PIP install packages to /root/.local 44 | export PIP_USER=true 45 | # Add above to PATH 46 | export PATH="${PATH}:/root/.local/bin" 47 | # Suppress [WARNING: Running pip as the 'root' user] 48 | export PIP_ROOT_USER_ACTION=ignore 49 | 50 | cd /root 51 | 52 | python3 ./ComfyUI/main.py --listen --port 8188 ${CLI_ARGS} 53 | -------------------------------------------------------------------------------- /cu128-test/runner-scripts/pre-start.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo "[INFO] Continue without pre-start script." 5 | -------------------------------------------------------------------------------- /cu128-test/runner-scripts/set-proxy.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | # Tip: Within containers, you cannot access your host machine via 127.0.0.1. 5 | # You can use "host.docker.internal"(for Docker) or "host.containers.internal"(for Podman) 6 | 7 | # Example of setting proxy 8 | #export HTTP_PROXY=http://host.docker.internal:1081 9 | #export HTTPS_PROXY=$HTTP_PROXY 10 | #export http_proxy=$HTTP_PROXY 11 | #export https_proxy=$HTTP_PROXY 12 | #export NO_PROXY="localhost,*.local,*.internal,[::1],fd00::/7, 13 | #10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16, 14 | #10.*,127.*,169.254.*,172.16.*,172.17.*,172.18.*,172.19.*,172.20.*, 15 | #172.21.*,172.22.*,172.23.*,172.24.*,172.25.*,172.26.*,172.27.*, 16 | #172.28.*,172.29.*,172.30.*,172.31.*,172.32.*,192.168.*" 17 | #export no_proxy=$NO_PROXY 18 | #echo "[INFO] Proxy set to $HTTP_PROXY" 19 | 20 | echo "[INFO] Continue without proxy." 21 | -------------------------------------------------------------------------------- /direct3ds2/Dockerfile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Dockerfile that builds 'yanwk/direct3ds2' 3 | # An environment for running https://github.com/DreamTechAI/Direct3D-S2 4 | ################################################################################ 5 | 6 | FROM yanwk/comfyui-boot:base-cu128-pt27 7 | 8 | LABEL maintainer="YAN Wenkun " 9 | 10 | RUN set -eu 11 | 12 | ################################################################################ 13 | # Python Dependencies 14 | 15 | COPY builder-scripts/. /builder-scripts/ 16 | 17 | RUN --mount=type=cache,target=/root/.cache/pip \ 18 | pip install \ 19 | -r /builder-scripts/pak3.txt 20 | 21 | RUN --mount=type=cache,target=/root/.cache/pip \ 22 | pip install \ 23 | -r /builder-scripts/pak5.txt 24 | 25 | RUN --mount=type=cache,target=/root/.cache/pip \ 26 | pip install \ 27 | -r /builder-scripts/pak7.txt 28 | 29 | # utils3d has version conflicts 30 | RUN --mount=type=cache,target=/root/.cache/pip \ 31 | pip install \ 32 | --no-deps utils3d \ 33 | && pip list 34 | 35 | ################################################################################ 36 | 37 | RUN du -ah /root \ 38 | && rm -rf /root/* \ 39 | && rm -rf /root/.[^.]* /root/.??* 40 | 41 | COPY runner-scripts/. /runner-scripts/ 42 | 43 | USER root 44 | VOLUME /root 45 | WORKDIR /root 46 | EXPOSE 7860 47 | ENV CLI_ARGS="" 48 | CMD ["bash","/runner-scripts/entrypoint.sh"] 49 | -------------------------------------------------------------------------------- /direct3ds2/README.txt: -------------------------------------------------------------------------------- 1 | Docker image for running Direct3D-S2 2 | https://github.com/DreamTechAI/Direct3D-S2 3 | 4 | Need GPU ≥ Turing (RTX 20 series / GTX 16 series). 5 | Need at least 12GB VRM (recommend 16GB). 6 | 7 | USAGE 8 | 9 | A. For RTX 20 series / GTX 16 series: 10 | 11 | ---- 12 | mkdir -p storage 13 | 14 | podman run -it \ 15 | --name direct3ds2-demo \ 16 | --device nvidia.com/gpu=all \ 17 | --security-opt label=disable \ 18 | -p 7860:7860 \ 19 | -v "$(pwd)"/storage:/root \ 20 | -e TORCH_CUDA_ARCH_LIST="7.5+PTX" \ 21 | -e ATTN_BACKEND="xformers" \ 22 | -e SPARSE_ATTN_BACKEND="xformers" \ 23 | -e SPARSE_BACKEND="torchsparse" \ 24 | -e GRADIO_SERVER_NAME="0.0.0.0" \ 25 | docker.io/yanwk/comfyui-boot:direct3ds2 26 | ---- 27 | 28 | B. For 30 series (Ampere) and later: 29 | 30 | ---- 31 | mkdir -p storage 32 | 33 | podman run -it \ 34 | --name direct3ds2-demo \ 35 | --device nvidia.com/gpu=all \ 36 | --security-opt label=disable \ 37 | -p 7860:7860 \ 38 | -v "$(pwd)"/storage:/root \ 39 | -e TORCH_CUDA_ARCH_LIST="8.6+PTX" \ 40 | -e ATTN_BACKEND="flash_attn" \ 41 | -e SPARSE_ATTN_BACKEND="flash_attn" \ 42 | -e SPARSE_BACKEND="torchsparse" \ 43 | -e GRADIO_SERVER_NAME="0.0.0.0" \ 44 | docker.io/yanwk/comfyui-boot:direct3ds2 45 | ---- 46 | -------------------------------------------------------------------------------- /direct3ds2/builder-scripts/generate-pak5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo '#' > pak5.txt 5 | 6 | array=( 7 | https://github.com/DreamTechAI/Direct3D-S2/raw/refs/heads/main/requirements.txt 8 | ) 9 | 10 | for line in "${array[@]}"; 11 | do curl -w "\n" -sSL "${line}" >> pak5.txt 12 | done 13 | 14 | sed -i '/^#/d' pak5.txt 15 | sed -i 's/[[:space:]]*$//' pak5.txt 16 | sed -i 's/>=.*$//' pak5.txt 17 | sed -i 's/_/-/g' pak5.txt 18 | 19 | # Don't "sort foo.txt >foo.txt". See: https://stackoverflow.com/a/29244408 20 | sort -ufo pak5.txt pak5.txt 21 | 22 | # Remove duplicate items, compare to pak3.txt 23 | grep -Fixv -f pak3.txt pak5.txt > temp.txt && mv temp.txt pak5.txt 24 | 25 | echo " generated. Check before use." 26 | -------------------------------------------------------------------------------- /direct3ds2/builder-scripts/pak3.txt: -------------------------------------------------------------------------------- 1 | accelerate 2 | aiohttp 3 | diffusers 4 | ftfy 5 | huggingface-hub[hf-transfer] 6 | imageio[ffmpeg] 7 | joblib 8 | kornia 9 | matplotlib 10 | omegaconf 11 | onnxruntime-gpu 12 | opencv-contrib-python-headless 13 | pandas 14 | pilgram 15 | pillow 16 | pygit2 17 | python-ffmpeg 18 | regex 19 | scikit-build-core 20 | scikit-image 21 | scikit-learn 22 | scipy 23 | timm 24 | torchmetrics 25 | -------------------------------------------------------------------------------- /direct3ds2/builder-scripts/pak5.txt: -------------------------------------------------------------------------------- 1 | transformers==4.40.2 2 | 3 | cmake 4 | Cython 5 | einops 6 | gradio 7 | igraph 8 | open3d 9 | pymeshfix 10 | pyvista 11 | sentencepiece 12 | tqdm 13 | trimesh[easy] 14 | -------------------------------------------------------------------------------- /direct3ds2/builder-scripts/pak7.txt: -------------------------------------------------------------------------------- 1 | triton 2 | spconv 3 | -------------------------------------------------------------------------------- /direct3ds2/runner-scripts/build-deps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eo pipefail 4 | 5 | echo "########################################" 6 | echo "[INFO] Building Dependencies for D3DS2..." 7 | echo "########################################" 8 | 9 | cd /root 10 | 11 | if [ -z "${CMAKE_ARGS}" ]; then 12 | export CMAKE_ARGS='-DBUILD_opencv_world=ON -DWITH_CUDA=ON -DCUDA_FAST_MATH=ON -DWITH_CUBLAS=ON -DWITH_NVCUVID=ON' 13 | echo "[INFO] CMAKE_ARGS not set, setting to ${CMAKE_ARGS}" 14 | fi ; 15 | 16 | cd /root/Direct3D-S2/third_party/voxelize 17 | pip install . 18 | 19 | cd /root 20 | pip install "git+https://github.com/mit-han-lab/torchsparse.git" 21 | 22 | cd /root/Direct3D-S2 23 | pip install -e . 24 | 25 | # (Optional) Compile Flash Attention for Ampere and later GPUs. 26 | # "MAX_JOBS" limits Ninja jobs to avoid OOM. 27 | # If have >96GB RAM, just remove MAX_JOBS line. 28 | cd /root 29 | if [ "$ATTN_BACKEND" == "flash_attn" ] || [ "$SPARSE_ATTN_BACKEND" == "flash_attn" ]; then 30 | echo "########################################" 31 | echo "[INFO] Compile-Installing Flash Attention..." 32 | echo "########################################" 33 | 34 | export MAX_JOBS=4 35 | pip install flash-attn --no-build-isolation 36 | 37 | echo "########################################" 38 | echo "[INFO] Successfully Installed Flash Attention." 39 | echo "########################################" 40 | fi 41 | 42 | # Finish 43 | touch /root/.build-complete 44 | 45 | echo "########################################" 46 | echo "[INFO] Build Complete." 47 | echo "########################################" 48 | -------------------------------------------------------------------------------- /direct3ds2/runner-scripts/download-models.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | echo "########################################" 6 | echo "[INFO] Downloading Models..." 7 | echo "########################################" 8 | 9 | cd /root 10 | 11 | set +e 12 | 13 | huggingface-cli download "wushuang98/Direct3D-S2" --include "direct3d-s2-v-1-1/*" 14 | huggingface-cli download "ZhengPeng7/BiRefNet" 15 | python3 -c "import torch; torch.hub.load('facebookresearch/dinov2', 'dinov2_vitl14_reg');" 16 | 17 | set -e 18 | -------------------------------------------------------------------------------- /direct3ds2/runner-scripts/download-repo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | # Note: the "${BASH_REMATCH[2]}" here is REPO_NAME 6 | # from [https://example.com/somebody/REPO_NAME.git] or [git@example.com:somebody/REPO_NAME.git] 7 | function clone_or_pull () { 8 | if [[ $1 =~ ^(.*[/:])(.*)(\.git)$ ]] || [[ $1 =~ ^(http.*\/)(.*)$ ]]; then 9 | echo "${BASH_REMATCH[2]}" ; 10 | set +e ; 11 | git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules "$1" \ 12 | || git -C "${BASH_REMATCH[2]}" pull --ff-only ; 13 | set -e ; 14 | else 15 | echo "[ERROR] Invalid URL: $1" ; 16 | return 1 ; 17 | fi ; 18 | } 19 | 20 | 21 | echo "########################################" 22 | echo "[INFO] Downloading Direct3D-S2..." 23 | echo "########################################" 24 | 25 | set +e 26 | cd /root 27 | git clone https://github.com/DreamTechAI/Direct3D-S2.git || git -C "Direct3D-S2" pull --ff-only 28 | set -e 29 | -------------------------------------------------------------------------------- /direct3ds2/runner-scripts/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Let .pyc files be stored in one place 6 | export PYTHONPYCACHEPREFIX="/root/.cache/pycache" 7 | # Let PIP install packages to /root/.local 8 | export PIP_USER=true 9 | # Add above to PATH 10 | export PATH="${PATH}:/root/.local/bin" 11 | # Suppress [WARNING: Running pip as the 'root' user] 12 | export PIP_ROOT_USER_ACTION=ignore 13 | 14 | # Run user's set-proxy script 15 | cd /root 16 | if [ ! -f "/root/user-scripts/set-proxy.sh" ] ; then 17 | mkdir -p /root/user-scripts 18 | cp /runner-scripts/set-proxy.sh.example /root/user-scripts/set-proxy.sh 19 | else 20 | echo "[INFO] Running set-proxy script..." 21 | 22 | chmod +x /root/user-scripts/set-proxy.sh 23 | source /root/user-scripts/set-proxy.sh 24 | fi ; 25 | 26 | # Download/Update D3DS2 27 | cd /root 28 | chmod +x /runner-scripts/download-repo.sh 29 | bash /runner-scripts/download-repo.sh 30 | 31 | # Run user's pre-start script 32 | cd /root 33 | if [ ! -f "/root/user-scripts/pre-start.sh" ] ; then 34 | mkdir -p /root/user-scripts 35 | cp /runner-scripts/pre-start.sh.example /root/user-scripts/pre-start.sh 36 | else 37 | echo "[INFO] Running pre-start script..." 38 | 39 | chmod +x /root/user-scripts/pre-start.sh 40 | source /root/user-scripts/pre-start.sh 41 | fi ; 42 | 43 | # Build Dependencies 44 | cd /root 45 | if [ ! -f "/root/.build-complete" ] ; then 46 | chmod +x /runner-scripts/build-deps.sh 47 | bash /runner-scripts/build-deps.sh 48 | fi ; 49 | 50 | # Download Models 51 | # Try only once. If first download failed, the Gradio app will download on demand. 52 | cd /root 53 | if [ ! -f "/root/.download-complete" ] ; then 54 | chmod +x /runner-scripts/download-models.sh 55 | bash /runner-scripts/download-models.sh 56 | touch /root/.download-complete 57 | fi ; 58 | 59 | echo "########################################" 60 | echo "[INFO] Starting Direct3D-S2..." 61 | echo "########################################" 62 | 63 | cd /root 64 | python3 ./Direct3D-S2/app.py 65 | -------------------------------------------------------------------------------- /direct3ds2/runner-scripts/pre-start.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo "[INFO] Continue without pre-start script." 5 | -------------------------------------------------------------------------------- /direct3ds2/runner-scripts/set-proxy.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | # Tip: Within containers, you cannot access your host machine via 127.0.0.1. 5 | # You can use "host.docker.internal"(for Docker) or "host.containers.internal"(for Podman) 6 | 7 | # Example of setting proxy 8 | #export HTTP_PROXY=http://host.docker.internal:1081 9 | #export HTTPS_PROXY=$HTTP_PROXY 10 | #export http_proxy=$HTTP_PROXY 11 | #export https_proxy=$HTTP_PROXY 12 | #export NO_PROXY="localhost,*.local,*.internal,[::1],fd00::/7, 13 | #10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16, 14 | #10.*,127.*,169.254.*,172.16.*,172.17.*,172.18.*,172.19.*,172.20.*, 15 | #172.21.*,172.22.*,172.23.*,172.24.*,172.25.*,172.26.*,172.27.*, 16 | #172.28.*,172.29.*,172.30.*,172.31.*,172.32.*,192.168.*" 17 | #export no_proxy=$NO_PROXY 18 | #echo "[INFO] Proxy set to $HTTP_PROXY" 19 | 20 | echo "[INFO] Continue without proxy." 21 | -------------------------------------------------------------------------------- /docs/README-DockerHub.md: -------------------------------------------------------------------------------- 1 | # ComfyUI 2 | 3 | **[CHECK THE GITHUB REPO](https://github.com/YanWenKun/ComfyUI-Docker)** 4 | 5 | **[中文文档在 GITHUB 上](https://github.com/YanWenKun/ComfyUI-Docker/blob/main/README.zh.adoc)** 6 | | 7 | **[国内适配镜像点我](https://gitee.com/yanwenkun/ComfyUI-Docker/tree/main/cu124-cn)** 8 | 9 | Docker images for [ComfyUI](https://github.com/comfyanonymous/ComfyUI) - a Stable Diffusion GUI powering node-based workflow. 10 | 11 | ## Quick Start - NVIDIA GPU 12 | 13 | ```sh 14 | mkdir -p storage 15 | 16 | docker run -it --rm \ 17 | --name comfyui-cu124 \ 18 | --gpus all \ 19 | -p 8188:8188 \ 20 | -v "$(pwd)"/storage:/root \ 21 | -e CLI_ARGS="" \ 22 | yanwk/comfyui-boot:cu124-slim 23 | ``` 24 | 25 | Once the app is loaded, visit http://localhost:8188/ 26 | 27 | ## Image Tags 28 | 29 | - `cu121` [\[doc\]](https://github.com/YanWenKun/ComfyUI-Docker/tree/main/cu121) 30 | 31 | - Easy for ComfyUI beginners. 32 | - Starts with ComfyUI, ComfyUI-Manager and the Photon (SD1.5) model. 33 | - Using a low-privilege user within the container (easy for WSL2 deploy). 34 | - Using CUDA 12.1 + Python 3.11. 35 | 36 | - `cu124-slim` [\[doc\]](https://github.com/YanWenKun/ComfyUI-Docker/tree/main/cu124-slim) 37 | 38 | - Similar to `cu121`, equipped with many dependencies, starts with ComfyUI and ComfyUI-Manager only. 39 | - Downloads less. No SD model included. 40 | - Using 'root' user within the container (easy for rootless deploy). 41 | - Using CUDA 12.4 + Python 3.12. 42 | 43 | - `cu121-megapak` [\[doc\]](https://github.com/YanWenKun/ComfyUI-Docker/tree/main/cu121-megapak) 44 | 45 | - All-in-one bundle, including dev kits. 46 | - Using 'root' user within the container (easy for rootless deploy). 47 | - Using CUDA 12.1 + Python 3.11. 48 | 49 | - `cu124-megapak` [\[doc\]](https://github.com/YanWenKun/ComfyUI-Docker/tree/main/cu124-megapak) 50 | 51 | - All-in-one bundle, including dev kits. 52 | - Using 'root' user within the container (easy for rootless deploy). 53 | - Using CUDA 12.4 + Python 3.12. May perform better on newer GPUs. 54 | 55 | - `cu124-cn` [\[doc\]](https://github.com/YanWenKun/ComfyUI-Docker/tree/main/cu124-cn) 56 | 57 | - For users in mainland China. Using mirror sites for all download links. 58 | 59 | - `rocm` [\[doc\]](https://github.com/YanWenKun/ComfyUI-Docker/tree/main/rocm) 60 | 61 | - For AMD GPU with ROCm. 62 | 63 | - `nightly` [\[doc\]](https://github.com/YanWenKun/ComfyUI-Docker/tree/main/nightly) 64 | 65 | - Using preview version of PyTorch. 66 | 67 | - `comfy3d-pt25` [\[doc\]](https://github.com/YanWenKun/ComfyUI-Docker/tree/main/comfy3d-pt25) 68 | 69 | - Image dedicated for [ComfyUI-3D-Pack](https://github.com/MrForExample/ComfyUI-3D-Pack). 70 | 71 | 72 | For more detailed docs, check [GitHub Page](https://github.com/YanWenKun/ComfyUI-Docker). 73 | -------------------------------------------------------------------------------- /docs/wsl-directml.adoc: -------------------------------------------------------------------------------- 1 | # Run ComfyUI on WSL2 with DirectML 2 | 3 | * Works with AMD/Intel GPU 4 | 5 | * Recommend using Windows 11 6 | 7 | * Recommend updating WSL2 kernel first: https://apps.microsoft.com/detail/9P9TQF7MRM4R 8 | ** Or run powershell: `wsl --update` 9 | 10 | * Using WSL2 openSUSE Tumbleweed: https://apps.microsoft.com/detail/9MSSK2ZXXN11 11 | ** After install, find openSUSE Tumbleweed in Start Menu, follow the guide to configure the Linux user. 12 | ** Or just run powershell: `wsl --install openSUSE-Tumbleweed` 13 | 14 | ## 1. Install base packages 15 | 16 | NOTE: Using Python 3.10 because of DirectML support 17 | 18 | ```sh 19 | sudo zypper install --no-confirm \ 20 | python310 python310-pip \ 21 | python310-wheel python310-setuptools python310-numpy \ 22 | git aria2 \ 23 | Mesa-libGL1 libgthread-2_0-0 24 | ``` 25 | 26 | ### (optional) Install packages for ComfyUI InstantID 27 | ```sh 28 | sudo zypper install --no-confirm \ 29 | python310-devel python310-Cython \ 30 | gcc-c++ cmake 31 | ``` 32 | 33 | ### (optional) Set proxy if needed 34 | .PIP proxy 35 | ```sh 36 | sudo pip3.10 config set global.proxy http://host.docker.internal:1081 37 | 38 | sudo pip3.10 install --upgrade pip 39 | ``` 40 | 41 | .Temporary system proxy 42 | ```sh 43 | export HTTP_PROXY=http://host.docker.internal:1081 44 | export HTTPS_PROXY=$HTTP_PROXY 45 | export http_proxy=$HTTP_PROXY 46 | export https_proxy=$HTTP_PROXY 47 | export NO_PROXY="localhost,*.local,*.internal,[::1],fd00::/7, 48 | 10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16" 49 | export no_proxy=$NO_PROXY 50 | ``` 51 | 52 | ## 2. Install Torch-DirectML (with PyTorch) 53 | ```sh 54 | sudo pip3.10 install --break-system-packages \ 55 | torch-directml torchvision torchaudio \ 56 | --index-url https://download.pytorch.org/whl/cpu \ 57 | --extra-index-url https://pypi.org/simple 58 | ``` 59 | 60 | ## 3. Install dependencies for ComfyUI 61 | ```sh 62 | sudo pip3.10 install --break-system-packages \ 63 | -r https://raw.githubusercontent.com/comfyanonymous/ComfyUI/master/requirements.txt \ 64 | -r https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/requirements.txt 65 | ``` 66 | 67 | ### (optional) Install deps for ControlNet Auxiliary Preprocessors 68 | ```sh 69 | sudo pip3.10 install --break-system-packages \ 70 | -r https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/main/requirements.txt \ 71 | --extra-index-url https://download.pytorch.org/whl/cpu 72 | ``` 73 | 74 | ### (optional) Install deps for ComfyUI InstantID 75 | ```sh 76 | sudo pip3.10 install --break-system-packages \ 77 | -r https://raw.githubusercontent.com/ZHO-ZHO-ZHO/ComfyUI-InstantID/main/requirements.txt 78 | ``` 79 | 80 | ## 4. Download ComfyUI 81 | ```sh 82 | git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules \ 83 | https://github.com/comfyanonymous/ComfyUI.git 84 | cd ComfyUI 85 | ``` 86 | 87 | ## 5. Download ComfyUI Manager 88 | ```sh 89 | cd custom_nodes 90 | git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules \ 91 | https://github.com/ltdrdata/ComfyUI-Manager.git 92 | cd .. 93 | ``` 94 | 95 | ### (optional) Download Models 96 | ```sh 97 | cd models 98 | aria2c https://raw.githubusercontent.com/YanWenKun/ComfyUI-Docker/main/cu121/scripts/download-models.txt 99 | aria2c --allow-overwrite=false --auto-file-renaming=false --continue=true \ 100 | --max-connection-per-server=5 --input-file=download-models.txt 101 | cd .. 102 | ``` 103 | 104 | ## 6. Run ComfyUI 105 | ```sh 106 | python3.10 main.py --listen --port 8188 --directml 107 | ``` 108 | 109 | TIP: For <4G VRAM, add arg: --lowvram 110 | 111 | NOTE: More CLI args: https://github.com/comfyanonymous/ComfyUI/blob/master/comfy/cli_args.py 112 | -------------------------------------------------------------------------------- /docs/wsl-directml.zh.adoc: -------------------------------------------------------------------------------- 1 | # 在 WSL2 环境下通过 DirectML 运行 ComfyUI 2 | 3 | * AMD/Intel GPU 均可 4 | ** 经测试在 4800H 的核显上能跑(比纯 CPU 快,比 Linux 下 ROCm 慢) 5 | 6 | * 建议使用 Windows 11 7 | 8 | * 建议先更新 WSL2 内核: https://apps.microsoft.com/detail/9P9TQF7MRM4R 9 | ** 或运行 powershell: `wsl --update` 10 | 11 | * 本文使用 WSL2 openSUSE Tumbleweed: https://apps.microsoft.com/detail/9MSSK2ZXXN11 12 | ** 在微软商店安装后,在开始菜单中找到 openSUSE Tumbleweed 并打开,按提示完成初始配置即可 13 | ** 也可以运行 powershell 命令安装: `wsl --install openSUSE-Tumbleweed` 14 | 15 | ## 1. 安装基础包 16 | 17 | NOTE: 因为 DirectML 支持版本所限,使用 Python 3.10 18 | 19 | ```sh 20 | sudo zypper install --no-confirm \ 21 | python310 python310-pip \ 22 | python310-wheel python310-setuptools python310-numpy \ 23 | git aria2 \ 24 | Mesa-libGL1 libgthread-2_0-0 25 | ``` 26 | 27 | ### (可选) 安装 ComfyUI InstantID 所需包 28 | ```sh 29 | sudo zypper install --no-confirm \ 30 | python310-devel python310-Cython \ 31 | gcc-c++ cmake 32 | ``` 33 | 34 | ### (可选) 设置代理 35 | .PIP 代理 36 | ```sh 37 | sudo pip3.10 config set global.proxy http://host.docker.internal:1081 38 | 39 | sudo pip3.10 install --upgrade pip 40 | ``` 41 | 42 | .临时系统代理 43 | ```sh 44 | export HTTP_PROXY=http://host.docker.internal:1081 45 | export HTTPS_PROXY=$HTTP_PROXY 46 | export http_proxy=$HTTP_PROXY 47 | export https_proxy=$HTTP_PROXY 48 | export NO_PROXY="localhost,*.local,*.internal,[::1],fd00::/7, 49 | 10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16" 50 | export no_proxy=$NO_PROXY 51 | ``` 52 | 53 | ## 2. 安装 Torch-DirectML (及其所需版本的 PyTorch) 54 | ```sh 55 | sudo pip3.10 install --break-system-packages \ 56 | torch-directml torchvision torchaudio \ 57 | --index-url https://download.pytorch.org/whl/cpu \ 58 | --extra-index-url https://pypi.org/simple 59 | ``` 60 | 61 | ## 3. 安装 ComfyUI 所需依赖 62 | ```sh 63 | sudo pip3.10 install --break-system-packages \ 64 | -r https://raw.githubusercontent.com/comfyanonymous/ComfyUI/master/requirements.txt \ 65 | -r https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/requirements.txt 66 | ``` 67 | 68 | ### (可选) 安装 ControlNet Auxiliary Preprocessors 所需依赖 69 | ```sh 70 | sudo pip3.10 install --break-system-packages \ 71 | -r https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/main/requirements.txt \ 72 | --extra-index-url https://download.pytorch.org/whl/cpu 73 | ``` 74 | 75 | ### (可选) 安装 ComfyUI InstantID 所需依赖 76 | ```sh 77 | sudo pip3.10 install --break-system-packages \ 78 | -r https://raw.githubusercontent.com/ZHO-ZHO-ZHO/ComfyUI-InstantID/main/requirements.txt 79 | ``` 80 | 81 | ## 4. 下载 ComfyUI 82 | ```sh 83 | git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules \ 84 | https://github.com/comfyanonymous/ComfyUI.git 85 | cd ComfyUI 86 | ``` 87 | 88 | ## 5. 下载 ComfyUI Manager 89 | ```sh 90 | cd custom_nodes 91 | git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules \ 92 | https://github.com/ltdrdata/ComfyUI-Manager.git 93 | cd .. 94 | ``` 95 | 96 | ### (可选) 下载一些模型文件 97 | ```sh 98 | cd models 99 | aria2c https://raw.githubusercontent.com/YanWenKun/ComfyUI-Docker/main/cu121/scripts/download-models.txt 100 | aria2c --allow-overwrite=false --auto-file-renaming=false --continue=true \ 101 | --max-connection-per-server=5 --input-file=download-models.txt 102 | cd .. 103 | ``` 104 | 105 | ## 6. 运行 ComfyUI 106 | ```sh 107 | python3.10 main.py --listen --port 8188 --directml 108 | ``` 109 | 110 | TIP: 如果显存小于 4G,添加参数: --lowvram 111 | 112 | NOTE: 更多 ComfyUI 参数: https://github.com/comfyanonymous/ComfyUI/blob/master/comfy/cli_args.py 113 | -------------------------------------------------------------------------------- /nightly/README.adoc: -------------------------------------------------------------------------------- 1 | # Docker Image with Preview (Nightly) Dependencies for ComfyUI 2 | 3 | image:https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-nightly.yml/badge.svg["GitHub Workflow Status",link="https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-nightly.yml"] 4 | 5 | https://hub.docker.com/r/yanwk/comfyui-boot/tags?name=nightly[View on ] 6 | 7 | ## Note 8 | 9 | * This image won't download ComfyUI or any models. Please prepare your ComfyUI suite before running the container. 10 | 11 | * Part of the `Dockerfile` is commented out due to CI limitation: 12 | 13 | ** Only basic dependencies for running ComfyUI is installed. Otherwise the image would be too big that GitHub Actions would throw IOException. 14 | 15 | ** `xFormers` is not installed in this image. 16 | It requires building from source in order to use it with PyTorch nightly. And building xFormers (with comprehensive build targets) on GitHub Actions would often result in halt (maybe just unpaid version). 17 | 18 | ** If you build the image by yourself, you can uncomment the lines in `Dockerfile`, for a bigger, yet more comprehensive image. 19 | 20 | ## Running 21 | 22 | * Don't forget to put ComfyUI in the `storage` folder. 23 | 24 | .Using Docker 25 | [source,sh] 26 | ---- 27 | docker pull yanwk/comfyui-boot:nightly 28 | 29 | docker run -it --rm \ 30 | --name comfyui-nightly \ 31 | --gpus all \ 32 | -p 8188:8188 \ 33 | -v "$(pwd)"/storage:/root \ 34 | -e CLI_ARGS="--fast --preview-method taesd --front-end-version Comfy-Org/ComfyUI_frontend@latest" \ 35 | -e PIP_INDEX_URL="https://pypi.org/simple" \ 36 | -e HF_ENDPOINT="https://huggingface.co" \ 37 | yanwk/comfyui-boot:nightly 38 | ---- 39 | 40 | .Using Podman 41 | [source,sh] 42 | ---- 43 | podman pull docker.io/yanwk/comfyui-boot:nightly 44 | 45 | podman run -it --rm \ 46 | --name comfyui-nightly \ 47 | --device nvidia.com/gpu=all \ 48 | --security-opt label=disable \ 49 | --security-opt seccomp=unconfined \ 50 | -p 8188:8188 \ 51 | -v "$(pwd)"/storage:/root \ 52 | -e CLI_ARGS="--fast --preview-method taesd --front-end-version Comfy-Org/ComfyUI_frontend@latest" \ 53 | -e PIP_INDEX_URL="https://pypi.org/simple" \ 54 | -e HF_ENDPOINT="https://huggingface.co" \ 55 | yanwk/comfyui-boot:nightly 56 | ---- 57 | -------------------------------------------------------------------------------- /rocm/builder-scripts/generate-pak5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo '#' > pak5.txt 5 | 6 | array=( 7 | https://github.com/comfyanonymous/ComfyUI/raw/refs/heads/master/requirements.txt 8 | https://github.com/ltdrdata/ComfyUI-Manager/raw/refs/heads/main/requirements.txt 9 | https://github.com/cubiq/ComfyUI_essentials/raw/refs/heads/main/requirements.txt 10 | https://github.com/cubiq/ComfyUI_FaceAnalysis/raw/refs/heads/main/requirements.txt 11 | https://github.com/cubiq/ComfyUI_InstantID/raw/refs/heads/main/requirements.txt 12 | https://github.com/cubiq/PuLID_ComfyUI/raw/refs/heads/main/requirements.txt 13 | https://github.com/Fannovel16/comfyui_controlnet_aux/raw/refs/heads/main/requirements.txt 14 | https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite/raw/refs/heads/main/requirements.txt 15 | https://github.com/ltdrdata/ComfyUI-Impact-Pack/raw/refs/heads/Main/requirements.txt 16 | https://github.com/ltdrdata/ComfyUI-Impact-Subpack/raw/refs/heads/main/requirements.txt 17 | https://github.com/ltdrdata/ComfyUI-Inspire-Pack/raw/refs/heads/main/requirements.txt 18 | https://github.com/WASasquatch/was-node-suite-comfyui/raw/refs/heads/main/requirements.txt 19 | ) 20 | 21 | for line in "${array[@]}"; 22 | do curl -w "\n" -sSL "${line}" >> pak5.txt 23 | done 24 | 25 | sed -i '/^#/d' pak5.txt 26 | sed -i 's/[[:space:]]*$//' pak5.txt 27 | sed -i 's/>=.*$//' pak5.txt 28 | sed -i 's/_/-/g' pak5.txt 29 | 30 | # Don't "sort foo.txt >foo.txt". See: https://stackoverflow.com/a/29244408 31 | sort -ufo pak5.txt pak5.txt 32 | 33 | # Remove duplicate items, compare to pak3.txt 34 | grep -Fixv -f pak3.txt pak5.txt > temp.txt && mv temp.txt pak5.txt 35 | 36 | echo " generated. Check before use." 37 | -------------------------------------------------------------------------------- /rocm/builder-scripts/pak3.txt: -------------------------------------------------------------------------------- 1 | # 'compel lark' for smZNodes 2 | # 'torchdiffeq' for DepthFM 3 | # 'fairscale' for APISR 4 | accelerate 5 | compel 6 | diffusers 7 | fairscale 8 | ftfy 9 | huggingface-hub[hf-transfer] 10 | imageio 11 | joblib 12 | kornia 13 | lark 14 | matplotlib 15 | # Temp fix for mediapipe 16 | onnx==1.16.2 17 | opencv-contrib-python-headless 18 | pandas 19 | pilgram 20 | pillow 21 | pygit2 22 | python-ffmpeg 23 | regex 24 | scikit-build-core 25 | scikit-image 26 | scikit-learn 27 | scipy 28 | timm 29 | torchdiffeq 30 | torchmetrics 31 | transformers 32 | -------------------------------------------------------------------------------- /rocm/builder-scripts/pak5.txt: -------------------------------------------------------------------------------- 1 | addict 2 | aiohttp 3 | albumentations 4 | av 5 | cachetools 6 | chardet 7 | color-matcher 8 | colour-science 9 | dill 10 | einops 11 | filelock 12 | fvcore 13 | GitPython 14 | imageio-ffmpeg 15 | importlib-metadata 16 | matrix-client==0.4.0 17 | mediapipe 18 | numba 19 | omegaconf 20 | piexif 21 | pixeloe 22 | psutil 23 | PyGithub 24 | python-dateutil 25 | pyyaml 26 | rembg 27 | rich 28 | safetensors 29 | segment-anything 30 | sentencepiece 31 | soundfile 32 | spandrel 33 | svglib 34 | tokenizers 35 | toml 36 | torchsde 37 | tqdm 38 | transparent-background 39 | trimesh[easy] 40 | typer 41 | typing-extensions 42 | ultralytics 43 | uv 44 | webcolors 45 | yacs 46 | yapf 47 | yarl 48 | -------------------------------------------------------------------------------- /rocm/builder-scripts/pak7.txt: -------------------------------------------------------------------------------- 1 | dlib 2 | facexlib 3 | insightface 4 | git+https://github.com/openai/CLIP.git 5 | git+https://github.com/WASasquatch/cstr.git 6 | git+https://github.com/WASasquatch/ffmpy.git 7 | git+https://github.com/WASasquatch/img2texture.git 8 | -------------------------------------------------------------------------------- /rocm/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Compose file for AMD GPU 2 | 3 | # If not working, try DirectML instead: 4 | # https://github.com/YanWenKun/ComfyUI-Docker/blob/main/docs/wsl-directml.adoc 5 | 6 | services: 7 | 8 | # Ref: https://hub.docker.com/r/rocm/pytorch 9 | # Ref: https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/docker.html 10 | 11 | comfyui: 12 | init: true 13 | container_name: comfyui-rocm 14 | build: 15 | context: . 16 | dockerfile: Dockerfile 17 | image: "yanwk/comfyui-boot:rocm" 18 | ports: 19 | - "8188:8188" 20 | volumes: 21 | - "./storage:/root" 22 | environment: 23 | - CLI_ARGS=--use-pytorch-cross-attention 24 | devices: 25 | - /dev/kfd 26 | - /dev/dri 27 | group_add: 28 | - video 29 | ipc: host 30 | cap_add: 31 | - SYS_PTRACE 32 | security_opt: 33 | - seccomp:unconfined 34 | - label:disable 35 | -------------------------------------------------------------------------------- /rocm/runner-scripts/download-models.txt: -------------------------------------------------------------------------------- 1 | # Since SD models are so diverse now (SD 1.5, SDXL, FLUX.1, etc.), 2 | # I have commented out most download links to give the choice to users. 3 | 4 | # TAESD 5 | 6 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesd_decoder.pth 7 | dir=vae_approx 8 | out=taesd_decoder.pth 9 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesdxl_decoder.pth 10 | dir=vae_approx 11 | out=taesdxl_decoder.pth 12 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesd3_decoder.pth 13 | dir=vae_approx 14 | out=taesd3_decoder.pth 15 | https://raw.githubusercontent.com/madebyollin/taesd/main/taef1_decoder.pth 16 | dir=vae_approx 17 | out=taef1_decoder.pth 18 | 19 | # Checkpoints 20 | 21 | #https://huggingface.co/playgroundai/playground-v2.5-1024px-aesthetic/resolve/main/playground-v2.5-1024px-aesthetic.fp16.safetensors 22 | # dir=checkpoints 23 | # out=playground-v2.5-1024px-aesthetic.fp16.safetensors 24 | 25 | # VAE 26 | 27 | #https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors 28 | # dir=vae 29 | # out=vae-ft-mse-840000-ema-pruned.safetensors 30 | 31 | # Upscale 32 | 33 | #https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth 34 | # dir=upscale_models 35 | # out=RealESRGAN_x4plus.pth 36 | #https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth 37 | # dir=upscale_models 38 | # out=RealESRGAN_x4plus_anime_6B.pth 39 | #https://huggingface.co/Kim2091/AnimeSharp/resolve/main/4x-AnimeSharp.pth 40 | # dir=upscale_models 41 | # out=4x-AnimeSharp.pth 42 | #https://huggingface.co/Kim2091/UltraSharp/resolve/main/4x-UltraSharp.pth 43 | # dir=upscale_models 44 | # out=4x-UltraSharp.pth 45 | #https://huggingface.co/gemasai/4x_NMKD-Siax_200k/resolve/main/4x_NMKD-Siax_200k.pth 46 | # dir=upscale_models 47 | # out=4x_NMKD-Siax_200k.pth 48 | #https://huggingface.co/uwg/upscaler/resolve/main/ESRGAN/8x_NMKD-Superscale_150000_G.pth 49 | # dir=upscale_models 50 | # out=8x_NMKD-Superscale_150000_G.pth 51 | 52 | # Embeddings 53 | 54 | #https://huggingface.co/datasets/gsdf/EasyNegative/resolve/main/EasyNegative.safetensors 55 | # dir=embeddings 56 | # out=easynegative.safetensors 57 | #https://huggingface.co/lenML/DeepNegative/resolve/main/NG_DeepNegative_V1_75T.pt 58 | # dir=embeddings 59 | # out=ng_deepnegative_v1_75t.pt 60 | 61 | # CLIP Vision 62 | 63 | #https://huggingface.co/openai/clip-vit-large-patch14/resolve/main/model.safetensors 64 | # dir=clip_vision 65 | # out=clip_vit14.safetensors 66 | 67 | # ControlNet v1.1 68 | # More models: https://huggingface.co/lllyasviel/sd_control_collection 69 | 70 | #https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11f1p_sd15_depth.pth 71 | # dir=controlnet 72 | # out=control_v11f1p_sd15_depth.pth 73 | #https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15_canny.pth 74 | # dir=controlnet 75 | # out=control_v11p_sd15_canny.pth 76 | #https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15_openpose.pth 77 | # dir=controlnet 78 | # out=control_v11p_sd15_openpose.pth 79 | -------------------------------------------------------------------------------- /rocm/runner-scripts/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | # Note: the "${BASH_REMATCH[2]}" here is REPO_NAME from 6 | # [https://example.com/somebody/REPO_NAME.git] or [git@example.com:somebody/REPO_NAME.git] 7 | function clone_or_pull () { 8 | if [[ $1 =~ ^(.*[/:])(.*)(\.git)$ ]] || [[ $1 =~ ^(http.*\/)(.*)$ ]]; then 9 | echo "${BASH_REMATCH[2]}" ; 10 | set +e ; 11 | git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules "$1" \ 12 | || git -C "${BASH_REMATCH[2]}" pull --ff-only ; 13 | set -e ; 14 | else 15 | echo "[ERROR] Invalid URL: $1" ; 16 | return 1 ; 17 | fi ; 18 | } 19 | 20 | 21 | echo "########################################" 22 | echo "[INFO] Downloading ComfyUI & Manager..." 23 | echo "########################################" 24 | 25 | set +e 26 | cd /root 27 | git clone https://github.com/comfyanonymous/ComfyUI.git || git -C "ComfyUI" pull --ff-only 28 | cd /root/ComfyUI 29 | # Using stable version (has a release tag) 30 | git reset --hard "$(git tag | grep -e '^v' | sort -V | tail -1)" 31 | set -e 32 | 33 | cd /root/ComfyUI/custom_nodes 34 | clone_or_pull https://github.com/ltdrdata/ComfyUI-Manager.git 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] Downloading Custom Nodes..." 39 | echo "########################################" 40 | 41 | cd /root/ComfyUI/custom_nodes 42 | 43 | # General 44 | clone_or_pull https://github.com/chrisgoringe/cg-use-everywhere.git 45 | clone_or_pull https://github.com/cubiq/ComfyUI_essentials.git 46 | clone_or_pull https://github.com/pythongosssss/ComfyUI-Custom-Scripts.git 47 | clone_or_pull https://github.com/WASasquatch/was-node-suite-comfyui.git 48 | 49 | # Control 50 | clone_or_pull https://github.com/cubiq/ComfyUI_InstantID.git 51 | clone_or_pull https://github.com/cubiq/ComfyUI_IPAdapter_plus.git 52 | clone_or_pull https://github.com/cubiq/PuLID_ComfyUI.git 53 | clone_or_pull https://github.com/Fannovel16/comfyui_controlnet_aux.git 54 | clone_or_pull https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet.git 55 | clone_or_pull https://github.com/ltdrdata/ComfyUI-Impact-Pack.git 56 | clone_or_pull https://github.com/ltdrdata/ComfyUI-Impact-Subpack.git 57 | clone_or_pull https://github.com/ltdrdata/ComfyUI-Inspire-Pack.git 58 | 59 | # Video 60 | clone_or_pull https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved.git 61 | clone_or_pull https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git 62 | 63 | # Other 64 | clone_or_pull https://github.com/cubiq/ComfyUI_FaceAnalysis.git 65 | 66 | echo "########################################" 67 | echo "[INFO] Downloading Models..." 68 | echo "########################################" 69 | 70 | # Models 71 | cd /root/ComfyUI/models 72 | aria2c \ 73 | --input-file=/runner-scripts/download-models.txt \ 74 | --allow-overwrite=false \ 75 | --auto-file-renaming=false \ 76 | --continue=true \ 77 | --max-connection-per-server=5 78 | 79 | # Finish 80 | touch /root/.download-complete 81 | -------------------------------------------------------------------------------- /rocm/runner-scripts/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Run user's set-proxy script 6 | cd /root 7 | if [ ! -f "/root/user-scripts/set-proxy.sh" ] ; then 8 | mkdir -p /root/user-scripts 9 | cp /runner-scripts/set-proxy.sh.example /root/user-scripts/set-proxy.sh 10 | else 11 | echo "[INFO] Running set-proxy script..." 12 | 13 | chmod +x /root/user-scripts/set-proxy.sh 14 | source /root/user-scripts/set-proxy.sh 15 | fi ; 16 | 17 | # Install ComfyUI 18 | cd /root 19 | if [ ! -f "/root/.download-complete" ] ; then 20 | chmod +x /runner-scripts/download.sh 21 | bash /runner-scripts/download.sh 22 | fi ; 23 | 24 | # Run user's pre-start script 25 | cd /root 26 | if [ ! -f "/root/user-scripts/pre-start.sh" ] ; then 27 | mkdir -p /root/user-scripts 28 | cp /runner-scripts/pre-start.sh.example /root/user-scripts/pre-start.sh 29 | else 30 | echo "[INFO] Running pre-start script..." 31 | 32 | chmod +x /root/user-scripts/pre-start.sh 33 | source /root/user-scripts/pre-start.sh 34 | fi ; 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] Starting ComfyUI..." 39 | echo "########################################" 40 | 41 | # Let .pyc files be stored in one place 42 | export PYTHONPYCACHEPREFIX="/root/.cache/pycache" 43 | # Let PIP install packages to /root/.local 44 | export PIP_USER=true 45 | # Add above to PATH 46 | export PATH="${PATH}:/root/.local/bin" 47 | # Suppress [WARNING: Running pip as the 'root' user] 48 | export PIP_ROOT_USER_ACTION=ignore 49 | 50 | cd /root 51 | 52 | python3 ./ComfyUI/main.py --listen --port 8188 ${CLI_ARGS} 53 | -------------------------------------------------------------------------------- /rocm/runner-scripts/pre-start.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo "[INFO] Continue without pre-start script." 5 | -------------------------------------------------------------------------------- /rocm/runner-scripts/set-proxy.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | # Tip: Within containers, you cannot access your host machine via 127.0.0.1. 5 | # You will need "host.docker.internal"(for Docker) or "host.containers.internal"(for Podman) 6 | 7 | # Example of setting proxy 8 | #export HTTP_PROXY=http://host.docker.internal:1081 9 | #export HTTPS_PROXY=$HTTP_PROXY 10 | #export http_proxy=$HTTP_PROXY 11 | #export https_proxy=$HTTP_PROXY 12 | #export NO_PROXY="localhost,*.local,*.internal,[::1],fd00::/7, 13 | #10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16, 14 | #10.*,127.*,169.254.*,172.16.*,172.17.*,172.18.*,172.19.*,172.20.*, 15 | #172.21.*,172.22.*,172.23.*,172.24.*,172.25.*,172.26.*,172.27.*, 16 | #172.28.*,172.29.*,172.30.*,172.31.*,172.32.*,192.168.*, 17 | #*.cn,ghproxy.com,*.ghproxy.com,ghproxy.org,*.ghproxy.org, 18 | #gh-proxy.com,*.gh-proxy.com,ghproxy.net,*.ghproxy.net" 19 | #export no_proxy=$NO_PROXY 20 | #echo "[INFO] Proxy set to $HTTP_PROXY" 21 | 22 | echo "[INFO] Continue without proxy." 23 | -------------------------------------------------------------------------------- /xpu/Dockerfile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Dockerfile that builds 'yanwk/comfyui-boot:xpu' 3 | # A runtime environment for https://github.com/comfyanonymous/ComfyUI 4 | # Running on XPU (Intel GPU). 5 | # Using PyTorch built by Intel. 6 | ################################################################################ 7 | 8 | FROM intel/intel-extension-for-pytorch:2.7.10-xpu 9 | 10 | LABEL maintainer="code@yanwk.fun" 11 | 12 | RUN set -eu 13 | 14 | # Cache left by upstream 15 | RUN rm -rf /root/.cache/pip 16 | 17 | # Python and tools 18 | RUN --mount=type=cache,target=/var/cache/apt \ 19 | apt-get update \ 20 | && apt-get install -y \ 21 | fish \ 22 | fd-find \ 23 | vim \ 24 | less \ 25 | aria2 \ 26 | git \ 27 | ninja-build \ 28 | make \ 29 | cmake \ 30 | python3-dev \ 31 | python3-pybind11 \ 32 | libgl1-mesa-glx \ 33 | && apt-get clean \ 34 | && rm -rf /var/lib/apt/lists/* 35 | 36 | # Python Packages 37 | ARG PIP_ROOT_USER_ACTION='ignore' 38 | 39 | RUN --mount=type=cache,target=/root/.cache/pip \ 40 | pip list \ 41 | && pip install \ 42 | --upgrade pip wheel setuptools 43 | 44 | # Deps for ComfyUI & custom nodes 45 | COPY builder-scripts/. /builder-scripts/ 46 | 47 | RUN --mount=type=cache,target=/root/.cache/pip \ 48 | pip install \ 49 | -r /builder-scripts/pak3.txt 50 | 51 | RUN --mount=type=cache,target=/root/.cache/pip \ 52 | pip install \ 53 | -r /builder-scripts/pak5.txt 54 | 55 | RUN --mount=type=cache,target=/root/.cache/pip \ 56 | pip install \ 57 | -r /builder-scripts/pak7.txt 58 | 59 | # Make sure the deps fit the needs for ComfyUI & Manager 60 | RUN --mount=type=cache,target=/root/.cache/pip \ 61 | pip install \ 62 | -r https://github.com/comfyanonymous/ComfyUI/raw/refs/heads/master/requirements.txt \ 63 | -r https://github.com/ltdrdata/ComfyUI-Manager/raw/refs/heads/main/requirements.txt 64 | 65 | # Make sure using the right version of Intel packages 66 | RUN --mount=type=cache,target=/root/.cache/pip \ 67 | pip install \ 68 | intel-extension-for-pytorch==2.7.10+xpu \ 69 | --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ 70 | 71 | RUN --mount=type=cache,target=/root/.cache/pip \ 72 | pip install \ 73 | oneccl_bind_pt==2.7.0+xpu \ 74 | --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ 75 | 76 | ################################################################################ 77 | 78 | RUN df -h \ 79 | && du -ah /root \ 80 | && find /root/ -mindepth 1 -delete 81 | 82 | COPY runner-scripts/. /runner-scripts/ 83 | 84 | USER root 85 | VOLUME /root 86 | WORKDIR /root 87 | EXPOSE 8188 88 | ENV CLI_ARGS="" 89 | CMD ["bash","/runner-scripts/entrypoint.sh"] 90 | -------------------------------------------------------------------------------- /xpu/Dockerfile-cn: -------------------------------------------------------------------------------- 1 | # 替换为国内源的 Dockerfile,不再适合 GitHub CI 2 | 3 | # 该基础镜像声明不含仓库前缀,因而会先尝试使用本地镜像 4 | # 该镜像基于 Ubuntu 5 | FROM intel/intel-extension-for-pytorch:2.7.10-xpu 6 | 7 | LABEL maintainer="code@yanwk.fun" 8 | 9 | RUN set -eu 10 | 11 | # 清理上游遗留的缓存 12 | RUN rm -rf /root/.cache/pip 13 | 14 | # 配置使用国内源,安装 Python 及工具 15 | RUN --mount=type=cache,target=/var/cache/apt \ 16 | printf "\ 17 | deb https://mirrors.cernet.edu.cn/ubuntu/ jammy main restricted universe multiverse\n\ 18 | deb https://mirrors.cernet.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse\n\ 19 | deb https://mirrors.cernet.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse\n\ 20 | deb https://mirrors.cernet.edu.cn/ubuntu/ jammy-security main restricted universe multiverse\n" \ 21 | > /etc/apt/sources.list \ 22 | && apt-get update \ 23 | && apt-get install -y \ 24 | fish \ 25 | fd-find \ 26 | vim \ 27 | less \ 28 | aria2 \ 29 | git \ 30 | ninja-build \ 31 | make \ 32 | cmake \ 33 | python3-dev \ 34 | python3-pybind11 \ 35 | libgl1-mesa-glx \ 36 | && apt-get clean \ 37 | && rm -rf /var/lib/apt/lists/* 38 | 39 | # 配置使用国内源,安装 Python 包 40 | ENV PIP_INDEX_URL="https://mirrors.cernet.edu.cn/pypi/web/simple" 41 | ENV PIP_EXTRA_INDEX_URL="https://mirrors.cernet.edu.cn/pypi/web/simple" 42 | 43 | ARG PIP_ROOT_USER_ACTION='ignore' 44 | 45 | RUN --mount=type=cache,target=/root/.cache/pip \ 46 | pip list \ 47 | && pip install \ 48 | --upgrade pip wheel setuptools 49 | 50 | # 安装 ComfyUI 及扩展所需依赖项 51 | COPY builder-scripts/. /builder-scripts/ 52 | 53 | RUN --mount=type=cache,target=/root/.cache/pip \ 54 | pip install \ 55 | -r /builder-scripts/pak3.txt 56 | 57 | RUN --mount=type=cache,target=/root/.cache/pip \ 58 | pip install \ 59 | -r /builder-scripts/pak5.txt 60 | 61 | RUN --mount=type=cache,target=/root/.cache/pip \ 62 | pip install \ 63 | -r /builder-scripts/pak7.txt 64 | 65 | # 确保依赖项匹配 ComfyUI & Manager 66 | RUN --mount=type=cache,target=/root/.cache/pip \ 67 | pip install \ 68 | -r https://gh-proxy.com/https://github.com/comfyanonymous/ComfyUI/raw/refs/heads/master/requirements.txt \ 69 | -r https://gh-proxy.com/https://github.com/ltdrdata/ComfyUI-Manager/raw/refs/heads/main/requirements.txt 70 | 71 | RUN --mount=type=cache,target=/root/.cache/pip \ 72 | pip install \ 73 | intel-extension-for-pytorch==2.7.10+xpu \ 74 | --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/ 75 | 76 | RUN --mount=type=cache,target=/root/.cache/pip \ 77 | pip install \ 78 | oneccl_bind_pt==2.7.0+xpu \ 79 | --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/ 80 | 81 | # HuggingFace 使用国内源 82 | ENV HF_ENDPOINT=https://hf-mirror.com 83 | 84 | RUN df -h \ 85 | && du -ah /root \ 86 | && find /root/ -mindepth 1 -delete 87 | 88 | COPY runner-scripts-cn/. /runner-scripts/ 89 | 90 | USER root 91 | VOLUME /root 92 | WORKDIR /root 93 | EXPOSE 8188 94 | ENV CLI_ARGS="" 95 | CMD ["bash","/runner-scripts/entrypoint.sh"] 96 | -------------------------------------------------------------------------------- /xpu/README.txt: -------------------------------------------------------------------------------- 1 | Under Construction... 2 | 3 | Tested on an Intel Arc B580 GPU: 4 | 5 | * SD 1.5: OK 6 | * SDXL: GOOD 7 | * Stable Cascade: FAST 8 | * Flux1: FAILED 9 | * SD 3.5: FAILED 10 | 11 | Usage: 12 | 13 | You need to install Intel GPU drivers on your host OS. 14 | 15 | You may also need to install `intel-compute-runtime` (or equivalent) on your host OS. 16 | If not found, just ignore it and run directly. 17 | 18 | ---- 19 | mkdir -p storage 20 | 21 | podman run -it --rm \ 22 | --name comfyui-xpu \ 23 | --device=/dev/dri \ 24 | --ipc=host \ 25 | --security-opt label=disable \ 26 | -p 8188:8188 \ 27 | -v "$(pwd)"/storage:/root \ 28 | -e CLI_ARGS="" \ 29 | yanwk/comfyui-boot:xpu 30 | ---- 31 | -------------------------------------------------------------------------------- /xpu/builder-scripts/generate-pak5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo '#' > pak5.txt 5 | 6 | array=( 7 | https://github.com/comfyanonymous/ComfyUI/raw/refs/heads/master/requirements.txt 8 | https://github.com/ltdrdata/ComfyUI-Manager/raw/refs/heads/main/requirements.txt 9 | https://github.com/cubiq/ComfyUI_essentials/raw/refs/heads/main/requirements.txt 10 | https://github.com/cubiq/ComfyUI_FaceAnalysis/raw/refs/heads/main/requirements.txt 11 | https://github.com/cubiq/ComfyUI_InstantID/raw/refs/heads/main/requirements.txt 12 | https://github.com/cubiq/PuLID_ComfyUI/raw/refs/heads/main/requirements.txt 13 | https://github.com/Fannovel16/comfyui_controlnet_aux/raw/refs/heads/main/requirements.txt 14 | https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite/raw/refs/heads/main/requirements.txt 15 | https://github.com/ltdrdata/ComfyUI-Impact-Pack/raw/refs/heads/Main/requirements.txt 16 | https://github.com/ltdrdata/ComfyUI-Impact-Subpack/raw/refs/heads/main/requirements.txt 17 | https://github.com/ltdrdata/ComfyUI-Inspire-Pack/raw/refs/heads/main/requirements.txt 18 | https://github.com/WASasquatch/was-node-suite-comfyui/raw/refs/heads/main/requirements.txt 19 | ) 20 | 21 | for line in "${array[@]}"; 22 | do curl -w "\n" -sSL "${line}" >> pak5.txt 23 | done 24 | 25 | sed -i '/^#/d' pak5.txt 26 | sed -i 's/[[:space:]]*$//' pak5.txt 27 | sed -i 's/>=.*$//' pak5.txt 28 | sed -i 's/_/-/g' pak5.txt 29 | 30 | # Don't "sort foo.txt >foo.txt". See: https://stackoverflow.com/a/29244408 31 | sort -ufo pak5.txt pak5.txt 32 | 33 | # Remove duplicate items, compare to pak3.txt 34 | grep -Fixv -f pak3.txt pak5.txt > temp.txt && mv temp.txt pak5.txt 35 | 36 | echo " generated. Check before use." 37 | -------------------------------------------------------------------------------- /xpu/builder-scripts/pak3.txt: -------------------------------------------------------------------------------- 1 | accelerate 2 | compel 3 | diffusers 4 | fairscale 5 | ftfy 6 | huggingface-hub[hf-transfer] 7 | imageio 8 | joblib 9 | kornia 10 | lark 11 | matplotlib 12 | onnx 13 | opencv-contrib-python-headless 14 | pandas 15 | pilgram 16 | pillow 17 | pygit2 18 | python-ffmpeg 19 | regex 20 | scikit-build-core 21 | scikit-image 22 | scikit-learn 23 | scipy 24 | timm 25 | torchdiffeq 26 | torchmetrics 27 | transformers 28 | -------------------------------------------------------------------------------- /xpu/builder-scripts/pak5.txt: -------------------------------------------------------------------------------- 1 | addict 2 | aiohttp 3 | albumentations 4 | av 5 | cachetools 6 | chardet 7 | color-matcher 8 | colour-science 9 | dill 10 | einops 11 | filelock 12 | fvcore 13 | GitPython 14 | imageio-ffmpeg 15 | importlib-metadata 16 | numba 17 | omegaconf 18 | piexif 19 | pixeloe 20 | psutil 21 | PyGithub 22 | python-dateutil 23 | pyyaml 24 | rembg 25 | rich 26 | safetensors 27 | segment-anything 28 | sentencepiece 29 | soundfile 30 | spandrel 31 | svglib 32 | tokenizers 33 | toml 34 | torchsde 35 | tqdm 36 | transparent-background 37 | trimesh[easy] 38 | typer 39 | typing-extensions 40 | ultralytics 41 | uv 42 | webcolors 43 | yacs 44 | yapf 45 | yarl 46 | -------------------------------------------------------------------------------- /xpu/builder-scripts/pak7.txt: -------------------------------------------------------------------------------- 1 | dlib 2 | facexlib 3 | insightface 4 | -------------------------------------------------------------------------------- /xpu/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Compose file for Intel GPU 2 | 3 | services: 4 | 5 | comfyui: 6 | init: true 7 | container_name: comfyui-xpu 8 | build: 9 | context: . 10 | dockerfile: Dockerfile 11 | image: "yanwk/comfyui-boot:xpu" 12 | ports: 13 | - "8188:8188" 14 | volumes: 15 | - "./storage:/root" 16 | environment: 17 | - CLI_ARGS= 18 | devices: 19 | - /dev/dri 20 | ipc: host 21 | security_opt: 22 | - label:disable 23 | -------------------------------------------------------------------------------- /xpu/runner-scripts-cn/download-models.txt: -------------------------------------------------------------------------------- 1 | # TAESD(用于高质量预览) 2 | https://gh-proxy.com/https://raw.githubusercontent.com/madebyollin/taesd/main/taesd_decoder.pth 3 | dir=vae_approx 4 | out=taesd_decoder.pth 5 | https://gh-proxy.com/https://raw.githubusercontent.com/madebyollin/taesd/main/taesdxl_decoder.pth 6 | dir=vae_approx 7 | out=taesdxl_decoder.pth 8 | https://gh-proxy.com/https://raw.githubusercontent.com/madebyollin/taesd/main/taesd3_decoder.pth 9 | dir=vae_approx 10 | out=taesd3_decoder.pth 11 | https://gh-proxy.com/https://raw.githubusercontent.com/madebyollin/taesd/main/taef1_decoder.pth 12 | dir=vae_approx 13 | out=taef1_decoder.pth 14 | -------------------------------------------------------------------------------- /xpu/runner-scripts-cn/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | # 下载(clone)自定义节点,如已存在,则更新(pull),额外处理含有子模块的节点 6 | # 其中,正则表达式内容为:从链接中查找仓库名称 REPO_NAME 7 | # 先匹配 [https://example.com/xyz/REPO_NAME.git] 或 [git@example.com:xyz/REPO_NAME.git] 8 | # 再匹配 [http(s)://example.com/xyz/REPO_NAME] 9 | # 查找结果存放在 BASH_REMATCH[2] 10 | function clone_or_pull () { 11 | if [[ $1 =~ ^(.*[/:])(.*)(\.git)$ ]] || [[ $1 =~ ^(http.*\/)(.*)$ ]]; then 12 | echo "正在下载: ${BASH_REMATCH[2]}" ; 13 | set +e ; 14 | git clone --depth=1 --no-tags "$1" || git -C "${BASH_REMATCH[2]}" pull --ff-only ; 15 | 16 | if [ -f "${BASH_REMATCH[2]}/.gitmodules" ] ; then 17 | echo "正在下载 ${BASH_REMATCH[2]} 的子模块..." ; 18 | sed -i.bak 's|url = https://github.com/|url = https://gh-proxy.com/https://github.com/|' "${BASH_REMATCH[2]}/.gitmodules" ; 19 | git -C "${BASH_REMATCH[2]}" submodule update --init --recursive ; 20 | fi ; 21 | set -e ; 22 | else 23 | echo "[ERROR] 无效的 URL: $1" ; 24 | return 1 ; 25 | fi ; 26 | } 27 | 28 | 29 | echo "########################################" 30 | echo "[INFO] 下载 ComfyUI & Manager..." 31 | echo "########################################" 32 | 33 | # 使用稳定版 ComfyUI(GitHub 上有发布标签) 34 | set +e 35 | cd /root 36 | git clone https://gh-proxy.com/https://github.com/comfyanonymous/ComfyUI.git || git -C ComfyUI pull --ff-only 37 | cd /root/ComfyUI 38 | git reset --hard "$(git tag | grep -e '^v' | sort -V | tail -1)" 39 | set -e 40 | 41 | cd /root/ComfyUI/custom_nodes 42 | clone_or_pull https://gh-proxy.com/https://github.com/ltdrdata/ComfyUI-Manager.git 43 | 44 | # 使用镜像站点替换 ComfyUI-Manager 默认仓库地址,避免卡 UI 45 | # 治标不治本,使用 Manager 全部功能仍需挂代理或魔改 46 | mkdir -p /root/ComfyUI/user/default/ComfyUI-Manager 47 | 48 | cat < /root/ComfyUI/user/default/ComfyUI-Manager/config.ini 49 | [default] 50 | channel_url = https://gh-proxy.com/https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main 51 | EOF 52 | 53 | cat < /root/ComfyUI/user/default/ComfyUI-Manager/channels.list 54 | default::https://gh-proxy.com/https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main 55 | recent::https://gh-proxy.com/https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/node_db/new 56 | legacy::https://gh-proxy.com/https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/node_db/legacy 57 | forked::https://gh-proxy.com/https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/node_db/forked 58 | dev::https://gh-proxy.com/https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/node_db/dev 59 | tutorial::https://gh-proxy.com/https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/node_db/tutorial 60 | EOF 61 | 62 | echo "########################################" 63 | echo "[INFO] 下载扩展组件(自定义节点)……" 64 | echo "########################################" 65 | 66 | cd /root/ComfyUI/custom_nodes 67 | 68 | # 综合 69 | clone_or_pull https://gh-proxy.com/https://github.com/chrisgoringe/cg-use-everywhere.git 70 | clone_or_pull https://gh-proxy.com/https://github.com/cubiq/ComfyUI_essentials.git 71 | clone_or_pull https://gh-proxy.com/https://github.com/pythongosssss/ComfyUI-Custom-Scripts.git 72 | 73 | echo "########################################" 74 | echo "[INFO] 下载模型……" 75 | echo "########################################" 76 | 77 | cd /root/ComfyUI/models 78 | aria2c \ 79 | --input-file=/runner-scripts/download-models.txt \ 80 | --allow-overwrite=false \ 81 | --auto-file-renaming=false \ 82 | --continue=true \ 83 | --max-connection-per-server=3 84 | 85 | # 标记为下载完成,下次启动不再尝试下载 86 | touch /root/.download-complete 87 | -------------------------------------------------------------------------------- /xpu/runner-scripts-cn/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # 运行用户的配置代理脚本 6 | cd /root 7 | if [ ! -f "/root/user-scripts/set-proxy.sh" ] ; then 8 | mkdir -p /root/user-scripts 9 | cp /runner-scripts/set-proxy.sh.example /root/user-scripts/set-proxy.sh 10 | else 11 | echo "[INFO] 执行配置代理脚本……" 12 | 13 | chmod +x /root/user-scripts/set-proxy.sh 14 | source /root/user-scripts/set-proxy.sh 15 | fi ; 16 | 17 | # 安装 ComfyUI 18 | cd /root 19 | if [ ! -f "/root/.download-complete" ] ; then 20 | chmod +x /runner-scripts/download.sh 21 | bash /runner-scripts/download.sh 22 | fi ; 23 | 24 | # 运行用户的预启动脚本 25 | cd /root 26 | if [ ! -f "/root/user-scripts/pre-start.sh" ] ; then 27 | mkdir -p /root/user-scripts 28 | cp /runner-scripts/pre-start.sh.example /root/user-scripts/pre-start.sh 29 | else 30 | echo "[INFO] 执行预启动脚本……" 31 | 32 | chmod +x /root/user-scripts/pre-start.sh 33 | source /root/user-scripts/pre-start.sh 34 | fi ; 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] 启动 ComfyUI..." 39 | echo "########################################" 40 | 41 | # 使得 .pyc 缓存文件集中保存 42 | export PYTHONPYCACHEPREFIX="/root/.cache/pycache" 43 | # 使得 PIP 安装新包到 /root/.local 44 | export PIP_USER=true 45 | # 添加上述路径到 PATH 46 | export PATH="${PATH}:/root/.local/bin" 47 | # 不再显示警报 [WARNING: Running pip as the 'root' user] 48 | export PIP_ROOT_USER_ACTION=ignore 49 | 50 | cd /root 51 | 52 | python3 ./ComfyUI/main.py --listen --port 8188 ${CLI_ARGS} 53 | -------------------------------------------------------------------------------- /xpu/runner-scripts-cn/pre-start.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo "[INFO] Continue without pre-start script." 5 | -------------------------------------------------------------------------------- /xpu/runner-scripts-cn/set-proxy.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | # 提示:容器中无法直接通过 127.0.0.1 或 localhost 访问宿主机 5 | # 需要使用 "host.docker.internal"(Docker) 或 "host.containers.internal"(Podman) 6 | 7 | # 代理配置样例 8 | #export HTTP_PROXY=http://host.docker.internal:1081 9 | #export HTTPS_PROXY=$HTTP_PROXY 10 | #export http_proxy=$HTTP_PROXY 11 | #export https_proxy=$HTTP_PROXY 12 | #export NO_PROXY="localhost,*.local,*.internal,[::1],fd00::/7, 13 | #10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16, 14 | #10.*,127.*,169.254.*,172.16.*,172.17.*,172.18.*,172.19.*,172.20.*, 15 | #172.21.*,172.22.*,172.23.*,172.24.*,172.25.*,172.26.*,172.27.*, 16 | #172.28.*,172.29.*,172.30.*,172.31.*,172.32.*,192.168.*, 17 | #*.cn,ghproxy.com,*.ghproxy.com,ghproxy.org,*.ghproxy.org, 18 | #gh-proxy.com,*.gh-proxy.com,ghproxy.net,*.ghproxy.net" 19 | #export no_proxy=$NO_PROXY 20 | #echo "[INFO] 代理设置为 $HTTP_PROXY" 21 | 22 | echo "[INFO] 无代理脚本,跳过。" 23 | -------------------------------------------------------------------------------- /xpu/runner-scripts/download-models.txt: -------------------------------------------------------------------------------- 1 | # Since SD models are so diverse now (SD 1.5, SDXL, FLUX.1, etc.), 2 | # I have commented out most download links to give the choice to users. 3 | 4 | # TAESD 5 | 6 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesd_decoder.pth 7 | dir=vae_approx 8 | out=taesd_decoder.pth 9 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesdxl_decoder.pth 10 | dir=vae_approx 11 | out=taesdxl_decoder.pth 12 | https://raw.githubusercontent.com/madebyollin/taesd/main/taesd3_decoder.pth 13 | dir=vae_approx 14 | out=taesd3_decoder.pth 15 | https://raw.githubusercontent.com/madebyollin/taesd/main/taef1_decoder.pth 16 | dir=vae_approx 17 | out=taef1_decoder.pth 18 | -------------------------------------------------------------------------------- /xpu/runner-scripts/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | # Note: the "${BASH_REMATCH[2]}" here is REPO_NAME from 6 | # [https://example.com/somebody/REPO_NAME.git] or [git@example.com:somebody/REPO_NAME.git] 7 | function clone_or_pull () { 8 | if [[ $1 =~ ^(.*[/:])(.*)(\.git)$ ]] || [[ $1 =~ ^(http.*\/)(.*)$ ]]; then 9 | echo "${BASH_REMATCH[2]}" ; 10 | set +e ; 11 | git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules "$1" \ 12 | || git -C "${BASH_REMATCH[2]}" pull --ff-only ; 13 | set -e ; 14 | else 15 | echo "[ERROR] Invalid URL: $1" ; 16 | return 1 ; 17 | fi ; 18 | } 19 | 20 | 21 | echo "########################################" 22 | echo "[INFO] Downloading ComfyUI & Manager..." 23 | echo "########################################" 24 | 25 | set +e 26 | cd /root 27 | git clone https://github.com/comfyanonymous/ComfyUI.git || git -C "ComfyUI" pull --ff-only 28 | cd /root/ComfyUI 29 | # Using stable version (has a release tag) 30 | git reset --hard "$(git tag | grep -e '^v' | sort -V | tail -1)" 31 | set -e 32 | 33 | cd /root/ComfyUI/custom_nodes 34 | clone_or_pull https://github.com/ltdrdata/ComfyUI-Manager.git 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] Downloading Custom Nodes..." 39 | echo "########################################" 40 | 41 | cd /root/ComfyUI/custom_nodes 42 | 43 | # General 44 | clone_or_pull https://github.com/chrisgoringe/cg-use-everywhere.git 45 | clone_or_pull https://github.com/cubiq/ComfyUI_essentials.git 46 | clone_or_pull https://github.com/pythongosssss/ComfyUI-Custom-Scripts.git 47 | 48 | echo "########################################" 49 | echo "[INFO] Downloading Models..." 50 | echo "########################################" 51 | 52 | # Models 53 | cd /root/ComfyUI/models 54 | aria2c \ 55 | --input-file=/runner-scripts/download-models.txt \ 56 | --allow-overwrite=false \ 57 | --auto-file-renaming=false \ 58 | --continue=true \ 59 | --max-connection-per-server=5 60 | 61 | # Finish 62 | touch /root/.download-complete 63 | -------------------------------------------------------------------------------- /xpu/runner-scripts/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Run user's set-proxy script 6 | cd /root 7 | if [ ! -f "/root/user-scripts/set-proxy.sh" ] ; then 8 | mkdir -p /root/user-scripts 9 | cp /runner-scripts/set-proxy.sh.example /root/user-scripts/set-proxy.sh 10 | else 11 | echo "[INFO] Running set-proxy script..." 12 | 13 | chmod +x /root/user-scripts/set-proxy.sh 14 | source /root/user-scripts/set-proxy.sh 15 | fi ; 16 | 17 | # Install ComfyUI 18 | cd /root 19 | if [ ! -f "/root/.download-complete" ] ; then 20 | chmod +x /runner-scripts/download.sh 21 | bash /runner-scripts/download.sh 22 | fi ; 23 | 24 | # Run user's pre-start script 25 | cd /root 26 | if [ ! -f "/root/user-scripts/pre-start.sh" ] ; then 27 | mkdir -p /root/user-scripts 28 | cp /runner-scripts/pre-start.sh.example /root/user-scripts/pre-start.sh 29 | else 30 | echo "[INFO] Running pre-start script..." 31 | 32 | chmod +x /root/user-scripts/pre-start.sh 33 | source /root/user-scripts/pre-start.sh 34 | fi ; 35 | 36 | 37 | echo "########################################" 38 | echo "[INFO] Starting ComfyUI..." 39 | echo "########################################" 40 | 41 | # Let .pyc files be stored in one place 42 | export PYTHONPYCACHEPREFIX="/root/.cache/pycache" 43 | # Let PIP install packages to /root/.local 44 | export PIP_USER=true 45 | # Add above to PATH 46 | export PATH="${PATH}:/root/.local/bin" 47 | # Suppress [WARNING: Running pip as the 'root' user] 48 | export PIP_ROOT_USER_ACTION=ignore 49 | 50 | cd /root 51 | 52 | python3 ./ComfyUI/main.py --listen --port 8188 ${CLI_ARGS} 53 | -------------------------------------------------------------------------------- /xpu/runner-scripts/pre-start.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | echo "[INFO] Continue without pre-start script." 5 | -------------------------------------------------------------------------------- /xpu/runner-scripts/set-proxy.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | # Tip: Within containers, you cannot access your host machine via 127.0.0.1. 5 | # You will need "host.docker.internal"(for Docker) or "host.containers.internal"(for Podman) 6 | 7 | # Example of setting proxy 8 | #export HTTP_PROXY=http://host.docker.internal:1081 9 | #export HTTPS_PROXY=$HTTP_PROXY 10 | #export http_proxy=$HTTP_PROXY 11 | #export https_proxy=$HTTP_PROXY 12 | #export NO_PROXY="localhost,*.local,*.internal,[::1],fd00::/7, 13 | #10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16, 14 | #10.*,127.*,169.254.*,172.16.*,172.17.*,172.18.*,172.19.*,172.20.*, 15 | #172.21.*,172.22.*,172.23.*,172.24.*,172.25.*,172.26.*,172.27.*, 16 | #172.28.*,172.29.*,172.30.*,172.31.*,172.32.*,192.168.*, 17 | #*.cn,ghproxy.com,*.ghproxy.com,ghproxy.org,*.ghproxy.org, 18 | #gh-proxy.com,*.gh-proxy.com,ghproxy.net,*.ghproxy.net" 19 | #export no_proxy=$NO_PROXY 20 | #echo "[INFO] Proxy set to $HTTP_PROXY" 21 | 22 | echo "[INFO] Continue without proxy." 23 | --------------------------------------------------------------------------------