From 447ce2d37f2206550d31d574d99b89edecb735b3 Mon Sep 17 00:00:00 2001 From: Comfy-Org Mirror Autopull Bot Date: Fri, 20 Dec 2024 09:45:04 +0000 Subject: [PATCH] [Rebase Mirror Onto] Support new LTXV VAE. --- .github/workflows/release.yml | 104 +++++++++++++++++ .github/workflows/stable-release.yml | 4 +- .../test-workflows-windows-custom.yaml | 24 ++++ .../test-workflows-with-manual-input.yaml | 91 +++++++++++++++ .github/workflows/windows_release_package.yml | 2 +- .github/workflows/workflows-matrix-test.yaml | 105 ++++++++++++++++++ .vscode/settings.json | 10 ++ 7 files changed, 337 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/test-workflows-windows-custom.yaml create mode 100644 .github/workflows/test-workflows-with-manual-input.yaml create mode 100644 .github/workflows/workflows-matrix-test.yaml create mode 100644 .vscode/settings.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..7d093d5b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,104 @@ + +name: "Release Stable Version" + +on: + workflow_dispatch: + inputs: + git_tag: + description: 'Git tag' + required: true + type: string + cu: + description: 'CUDA version' + required: true + type: string + default: "124" + python_minor: + description: 'Python minor version' + required: true + type: string + default: "11" + python_patch: + description: 'Python patch version' + required: true + type: string + default: "9" + + +jobs: + package_comfy_windows: + permissions: + contents: "write" + packages: "write" + pull-requests: "read" + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.git_tag }} + fetch-depth: 0 + persist-credentials: false + - uses: actions/cache/restore@v4 + id: cache + with: + path: | + cu${{ inputs.cu }}_python_deps.tar + update_comfyui_and_python_dependencies.bat + key: ${{ runner.os }}-build-cu${{ inputs.cu }}-${{ inputs.python_minor }} + - shell: bash + run: | + mv cu${{ inputs.cu }}_python_deps.tar ../ + mv update_comfyui_and_python_dependencies.bat ../ + cd .. + tar xf cu${{ inputs.cu }}_python_deps.tar + pwd + ls + + - shell: bash + run: | + cd .. + cp -r ComfyUI ComfyUI_copy + curl https://www.python.org/ftp/python/3.${{ inputs.python_minor }}.${{ inputs.python_patch }}/python-3.${{ inputs.python_minor }}.${{ inputs.python_patch }}-embed-amd64.zip -o python_embeded.zip + unzip python_embeded.zip -d python_embeded + cd python_embeded + echo ${{ env.MINOR_VERSION }} + echo 'import site' >> ./python3${{ inputs.python_minor }}._pth + curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py + ./python.exe get-pip.py + ./python.exe -s -m pip install ../cu${{ inputs.cu }}_python_deps/* + sed -i '1i../ComfyUI' ./python3${{ inputs.python_minor }}._pth + cd .. + + git clone https://github.com/comfyanonymous/taesd + cp taesd/*.pth ./ComfyUI_copy/models/vae_approx/ + + mkdir ComfyUI_windows_portable + mv python_embeded ComfyUI_windows_portable + mv ComfyUI_copy ComfyUI_windows_portable/ComfyUI + + cd ComfyUI_windows_portable + + mkdir update + cp -r ComfyUI/.ci/update_windows/* ./update/ + cp -r ComfyUI/.ci/windows_base_files/* ./ + cp ../update_comfyui_and_python_dependencies.bat ./update/ + + cd .. + + "C:\Program Files\7-Zip\7z.exe" a -t7z -m0=lzma2 -mx=8 -mfb=64 -md=32m -ms=on -mf=BCJ2 ComfyUI_windows_portable.7z ComfyUI_windows_portable + mv ComfyUI_windows_portable.7z ComfyUI/ComfyUI_windows_portable_nvidia.7z + + cd ComfyUI_windows_portable + python_embeded/python.exe -s ComfyUI/main.py --quick-test-for-ci --cpu + + ls + + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ComfyUI_windows_portable_nvidia.7z + tag: ${{ inputs.git_tag }} + overwrite: true + prerelease: true + make_latest: false diff --git a/.github/workflows/stable-release.yml b/.github/workflows/stable-release.yml index 0bdd5a3b..9558e6e7 100644 --- a/.github/workflows/stable-release.yml +++ b/.github/workflows/stable-release.yml @@ -57,7 +57,7 @@ jobs: - shell: bash run: | cd .. - cp -r ComfyUI ComfyUI_copy + cp -r ${{ github.event.repository.name }} ComfyUI_copy curl https://www.python.org/ftp/python/3.${{ inputs.python_minor }}.${{ inputs.python_patch }}/python-3.${{ inputs.python_minor }}.${{ inputs.python_patch }}-embed-amd64.zip -o python_embeded.zip unzip python_embeded.zip -d python_embeded cd python_embeded @@ -86,7 +86,7 @@ jobs: cd .. "C:\Program Files\7-Zip\7z.exe" a -t7z -m0=lzma2 -mx=8 -mfb=64 -md=32m -ms=on -mf=BCJ2 ComfyUI_windows_portable.7z ComfyUI_windows_portable - mv ComfyUI_windows_portable.7z ComfyUI/ComfyUI_windows_portable_nvidia.7z + mv ComfyUI_windows_portable.7z ${{ github.event.repository.name }}/ComfyUI_windows_portable_nvidia.7z cd ComfyUI_windows_portable python_embeded/python.exe -s ComfyUI/main.py --quick-test-for-ci --cpu diff --git a/.github/workflows/test-workflows-windows-custom.yaml b/.github/workflows/test-workflows-windows-custom.yaml new file mode 100644 index 00000000..88bda079 --- /dev/null +++ b/.github/workflows/test-workflows-windows-custom.yaml @@ -0,0 +1,24 @@ +name: Use Custom Runner Target To Test ComfyUI Windows with Default Workflow +on: + workflow_dispatch: + inputs: + runs_on: + description: 'What runners to run this test on' + required: false + default: 'win' + +jobs: + test-action: + runs-on: ${{ inputs.runs_on }} + steps: + - name: Use ComfyUI GitHub Action + uses: comfy-org/comfy-action@monkeytest + with: + os: windows + cuda_version: 12.1 + workflow_filenames: 'default.json' + gcs_bucket_name: 'comfy-ci-results' + google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }} + output_prefix: 'ComfyUI' + timeout: 50 + # api_endpoint: http://localhost:8080/upload-artifact diff --git a/.github/workflows/test-workflows-with-manual-input.yaml b/.github/workflows/test-workflows-with-manual-input.yaml new file mode 100644 index 00000000..3a5bdc81 --- /dev/null +++ b/.github/workflows/test-workflows-with-manual-input.yaml @@ -0,0 +1,91 @@ +name: Test ComfyUI Workflows Manual +on: + workflow_dispatch: + inputs: + os: + description: 'Operating System' + required: true + default: 'macos' + type: choice + options: + - macos + - linux + - win + runner_label: + description: 'Runner Label' + required: false + default: 'self-hosted' + type: string + python_version: + description: 'Python Version' + required: true + default: '3.9' + type: choice + options: + - '3.8' + - '3.9' + - '3.10' + - '3.11' + - '3.12' + - other + python_version_number: + description: 'Specify your own Python Version Number, e.g. 3.9.12' + required: false + default: '3.9' + type: string + cuda_version: + description: 'CUDA Version, currently only 12.1 is supported' + required: true + default: '12.1' + type: choice + options: + - '12.1' + torch_version: + description: 'Torch Version' + required: true + default: 'stable' + type: choice + options: + - stable + - preview + - other + torch_version_number: + description: 'Torch Version Number' + required: false + default: '2.3.1' + type: string + comfyui_flags: + description: 'ComfyUI Flags' + required: false + default: '--force-fp16' + type: string + workflow_filenames: + description: 'Workflow Filenames' + required: false + default: 'default.json,lora.json' + type: string + workflow_raw_json: + description: 'Workflow Raw JSON (Not yet supported)' + required: false + default: '' + type: string + + + + + +jobs: + test-default-workflow: + runs-on: ${{ inputs.runner_label }} + steps: + - name: Test Default Workflow + uses: comfy-org/comfy-action@main + with: + os: ${{ inputs.os }} + python_version: ${{ (contains(inputs.python_version, "other") && inputs.python_version_number != '' ) && inputs.python_version_number || inputs.python_version}} + cuda_version: ${{ inputs.cuda_version }} + torch_version: ${{ (contains(inputs.torch_version, "other") && inputs.torch_version_number != '' ) && inputs.torch_version_number || inputs.torch_version}} + workflow_filenames: "default.json,lora.json" + workflow_raw_json: ${{ inputs.workflow_raw_json }} + google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }} + timeout: 50 \ No newline at end of file diff --git a/.github/workflows/windows_release_package.yml b/.github/workflows/windows_release_package.yml index 11e724ba..5df0aff2 100644 --- a/.github/workflows/windows_release_package.yml +++ b/.github/workflows/windows_release_package.yml @@ -55,7 +55,7 @@ jobs: - shell: bash run: | cd .. - cp -r ComfyUI ComfyUI_copy + cp -r ComfyUI-Mirror ComfyUI_copy curl https://www.python.org/ftp/python/3.${{ inputs.python_minor }}.${{ inputs.python_patch }}/python-3.${{ inputs.python_minor }}.${{ inputs.python_patch }}-embed-amd64.zip -o python_embeded.zip unzip python_embeded.zip -d python_embeded cd python_embeded diff --git a/.github/workflows/workflows-matrix-test.yaml b/.github/workflows/workflows-matrix-test.yaml new file mode 100644 index 00000000..2d77d50f --- /dev/null +++ b/.github/workflows/workflows-matrix-test.yaml @@ -0,0 +1,105 @@ +name: Comfy CI Workflows Run +on: + push: + branches: + - master + paths-ignore: + - 'app/**' + - 'input/**' + - 'output/**' + - 'model/**' + - 'notebook/**' + - 'script_example/**' + - 'tests/**' + - 'tests-ui/**' + - '.github/**' + - '.ci/**' + - 'web/**' + workflow_dispatch: + +jobs: + test-stable: + strategy: + fail-fast: false + matrix: + os: [macos, linux, windows] + python_version: ["3.9", "3.10", "3.11", "3.12"] + cuda_version: ["12.1"] + torch_version: ["stable"] + include: + - os: macos + runner_label: [self-hosted, macOS, m2] + flags: "--use-pytorch-cross-attention" + - os: linux + runner_label: [self-hosted, Linux, t4] + flags: "" + - os: windows + runner_label: [self-hosted, win] + flags: "" + runs-on: ${{ matrix.runner_label }} + steps: + - name: Test Workflows + uses: comfy-org/comfy-action@main + with: + os: ${{ matrix.os }} + python_version: ${{ matrix.python_version }} + torch_version: ${{ matrix.torch_version }} + google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }} + comfyui_flags: ${{ matrix.flags }} + output_prefix: 'ComfyUI' + timeout: 50 + use_prior_commit: 'true' + test-win-nightly: + strategy: + fail-fast: true + matrix: + os: [windows] + python_version: ["3.9", "3.10", "3.11", "3.12"] + cuda_version: ["12.1"] + torch_version: ["nightly"] + include: + - os: windows + runner_label: [self-hosted, win] + flags: "" + runs-on: ${{ matrix.runner_label }} + steps: + - name: Test Workflows + uses: comfy-org/comfy-action@main + with: + os: ${{ matrix.os }} + python_version: ${{ matrix.python_version }} + torch_version: ${{ matrix.torch_version }} + google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }} + comfyui_flags: ${{ matrix.flags }} + output_prefix: 'ComfyUI' + timeout: 50 + use_prior_commit: 'true' + test-unix-nightly: + strategy: + fail-fast: false + matrix: + os: [macos, linux] + python_version: ["3.11"] + cuda_version: ["12.1"] + torch_version: ["nightly"] + include: + - os: macos + runner_label: [self-hosted, macOS, m2] + flags: "--use-pytorch-cross-attention" + - os: linux + runner_label: [self-hosted, Linux, t4] + flags: "" + + runs-on: ${{ matrix.runner_label }} + steps: + - name: Test Workflows + uses: comfy-org/comfy-action@main + with: + os: ${{ matrix.os }} + python_version: ${{ matrix.python_version }} + torch_version: ${{ matrix.torch_version }} + google_credentials: ${{ secrets.GCS_SERVICE_ACCOUNT_JSON }} + comfyui_flags: ${{ matrix.flags }} + output_prefix: 'ComfyUI' + timeout: 50 + use_prior_commit: 'true' diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..61e60736 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,10 @@ +{ + "workbench.colorCustomizations": { + "inlineChat.background": "#FFFFFF", + "inlineChatInput.background": "#FFFFFF", + "inlineChatInput.focusBorder": "#EFEFEF", + "inlineChat.regionHighlight": "#F0F0F0", + "titleBar.activeBackground": "#0D4A23", + "titleBar.activeForeground": "#F2FCF5" + } +} \ No newline at end of file