From e15af7951bade97f9e59aaf761cc497b61cf3d56 Mon Sep 17 00:00:00 2001 From: Margen67 Date: Fri, 14 Feb 2025 21:42:51 -0800 Subject: [PATCH] Indentation --- .github/workflows/pullrequest-ci-run.yml | 4 +- .github/workflows/ruff.yml | 20 ++-- .github/workflows/test-launch.yml | 66 +++++------ .github/workflows/test-unit.yml | 28 ++--- .../windows_release_dependencies.yml | 56 ++++----- .../windows_release_nightly_pytorch.yml | 102 ++++++++-------- .github/workflows/windows_release_package.yml | 110 +++++++++--------- 7 files changed, 193 insertions(+), 193 deletions(-) diff --git a/.github/workflows/pullrequest-ci-run.yml b/.github/workflows/pullrequest-ci-run.yml index a2a4b265..9762c9f1 100644 --- a/.github/workflows/pullrequest-ci-run.yml +++ b/.github/workflows/pullrequest-ci-run.yml @@ -2,8 +2,8 @@ # Results are reported as checkmarks on the commits, as well as onto https://ci.comfy.org/ name: Pull Request CI Workflow Runs on: - pull_request_target: - types: [labeled] + pull_request_target: + types: [labeled] jobs: pr-test-stable: diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 4c1a0259..1aeca368 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -8,16 +8,16 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.x + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.x - - name: Install Ruff - run: pip install ruff + - name: Install Ruff + run: pip install ruff - - name: Run Ruff - run: ruff check . + - name: Run Ruff + run: ruff check . diff --git a/.github/workflows/test-launch.yml b/.github/workflows/test-launch.yml index c56283c2..d33a3e6a 100644 --- a/.github/workflows/test-launch.yml +++ b/.github/workflows/test-launch.yml @@ -10,36 +10,36 @@ jobs: test: runs-on: ubuntu-latest steps: - - name: Checkout ComfyUI - uses: actions/checkout@v4 - with: - repository: "comfyanonymous/ComfyUI" - path: "ComfyUI" - - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - name: Install requirements - run: | - python -m pip install --upgrade pip - pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu - pip install -r requirements.txt - pip install wait-for-it - working-directory: ComfyUI - - name: Start ComfyUI server - run: | - python main.py --cpu 2>&1 | tee console_output.log & - wait-for-it --service 127.0.0.1:8188 -t 30 - working-directory: ComfyUI - - name: Check for unhandled exceptions in server log - run: | - if grep -qE "Exception|Error" console_output.log; then - echo "Unhandled exception/error found in server log." - exit 1 - fi - working-directory: ComfyUI - - uses: actions/upload-artifact@v4 - if: always() - with: - name: console-output - path: ComfyUI/console_output.log - retention-days: 30 + - name: Checkout ComfyUI + uses: actions/checkout@v4 + with: + repository: "comfyanonymous/ComfyUI" + path: "ComfyUI" + - uses: actions/setup-python@v4 + with: + python-version: '3.9' + - name: Install requirements + run: | + python -m pip install --upgrade pip + pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu + pip install -r requirements.txt + pip install wait-for-it + working-directory: ComfyUI + - name: Start ComfyUI server + run: | + python main.py --cpu 2>&1 | tee console_output.log & + wait-for-it --service 127.0.0.1:8188 -t 30 + working-directory: ComfyUI + - name: Check for unhandled exceptions in server log + run: | + if grep -qE "Exception|Error" console_output.log; then + echo "Unhandled exception/error found in server log." + exit 1 + fi + working-directory: ComfyUI + - uses: actions/upload-artifact@v4 + if: always() + with: + name: console-output + path: ComfyUI/console_output.log + retention-days: 30 diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index f01fac03..6f8b38dc 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -14,17 +14,17 @@ jobs: runs-on: ${{ matrix.os }} continue-on-error: true steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.12' - - name: Install requirements - run: | - python -m pip install --upgrade pip - pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu - pip install -r requirements.txt - - name: Run Unit Tests - run: | - pip install -r tests-unit/requirements.txt - python -m pytest tests-unit + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.12' + - name: Install requirements + run: | + python -m pip install --upgrade pip + pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu + pip install -r requirements.txt + - name: Run Unit Tests + run: | + pip install -r tests-unit/requirements.txt + python -m pytest tests-unit diff --git a/.github/workflows/windows_release_dependencies.yml b/.github/workflows/windows_release_dependencies.yml index 56cfd606..a7c2e081 100644 --- a/.github/workflows/windows_release_dependencies.yml +++ b/.github/workflows/windows_release_dependencies.yml @@ -38,34 +38,34 @@ jobs: build_dependencies: runs-on: windows-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: 3.${{ inputs.python_minor }}.${{ inputs.python_patch }} + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.${{ inputs.python_minor }}.${{ inputs.python_patch }} - - shell: bash - run: | - echo "@echo off - call update_comfyui.bat nopause - echo - - echo This will try to update pytorch and all python dependencies. - echo - - echo If you just want to update normally, close this and run update_comfyui.bat instead. - echo - - pause - ..\python_embedded\python.exe -s -m pip install --upgrade torch torchvision torchaudio ${{ inputs.xformers }} --extra-index-url https://download.pytorch.org/whl/cu${{ inputs.cu }} -r ../ComfyUI/requirements.txt pygit2 - pause" > update_comfyui_and_python_dependencies.bat + - shell: bash + run: | + echo "@echo off + call update_comfyui.bat nopause + echo - + echo This will try to update pytorch and all python dependencies. + echo - + echo If you just want to update normally, close this and run update_comfyui.bat instead. + echo - + pause + ..\python_embedded\python.exe -s -m pip install --upgrade torch torchvision torchaudio ${{ inputs.xformers }} --extra-index-url https://download.pytorch.org/whl/cu${{ inputs.cu }} -r ../ComfyUI/requirements.txt pygit2 + pause" > update_comfyui_and_python_dependencies.bat - python -m pip wheel --no-cache-dir torch torchvision torchaudio ${{ inputs.xformers }} ${{ inputs.extra_dependencies }} --extra-index-url https://download.pytorch.org/whl/cu${{ inputs.cu }} -r requirements.txt pygit2 -w ./temp_wheel_dir - python -m pip install --no-cache-dir ./temp_wheel_dir/* - echo installed basic - ls -lah temp_wheel_dir - mv temp_wheel_dir cu${{ inputs.cu }}_python_deps - tar cf cu${{ inputs.cu }}_python_deps.tar cu${{ inputs.cu }}_python_deps + python -m pip wheel --no-cache-dir torch torchvision torchaudio ${{ inputs.xformers }} ${{ inputs.extra_dependencies }} --extra-index-url https://download.pytorch.org/whl/cu${{ inputs.cu }} -r requirements.txt pygit2 -w ./temp_wheel_dir + python -m pip install --no-cache-dir ./temp_wheel_dir/* + echo installed basic + ls -lah temp_wheel_dir + mv temp_wheel_dir cu${{ inputs.cu }}_python_deps + tar cf cu${{ inputs.cu }}_python_deps.tar cu${{ inputs.cu }}_python_deps - - uses: actions/cache/save@v4 - with: - path: | - cu${{ inputs.cu }}_python_deps.tar - update_comfyui_and_python_dependencies.bat - key: ${{ runner.os }}-build-cu${{ inputs.cu }}-${{ inputs.python_minor }} + - uses: actions/cache/save@v4 + with: + path: | + cu${{ inputs.cu }}_python_deps.tar + update_comfyui_and_python_dependencies.bat + key: ${{ runner.os }}-build-cu${{ inputs.cu }}-${{ inputs.python_minor }} diff --git a/.github/workflows/windows_release_nightly_pytorch.yml b/.github/workflows/windows_release_nightly_pytorch.yml index 7d38fcc4..40c3569d 100644 --- a/.github/workflows/windows_release_nightly_pytorch.yml +++ b/.github/workflows/windows_release_nightly_pytorch.yml @@ -27,65 +27,65 @@ on: jobs: build: permissions: - contents: "write" - packages: "write" - pull-requests: "read" + contents: "write" + packages: "write" + pull-requests: "read" runs-on: windows-latest steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - persist-credentials: false - - uses: actions/setup-python@v5 - with: - python-version: 3.${{ inputs.python_minor }}.${{ inputs.python_patch }} - - 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_embedded.zip - unzip python_embedded.zip -d python_embedded - cd python_embedded - 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 -m pip wheel torch torchvision torchaudio --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu${{ inputs.cu }} -r ../ComfyUI/requirements.txt pygit2 -w ../temp_wheel_dir - ls ../temp_wheel_dir - ./python.exe -s -m pip install --pre ../temp_wheel_dir/* - sed -i '1i../ComfyUI' ./python3${{ inputs.python_minor }}._pth - cd .. + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + - uses: actions/setup-python@v5 + with: + python-version: 3.${{ inputs.python_minor }}.${{ inputs.python_patch }} + - 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_embedded.zip + unzip python_embedded.zip -d python_embedded + cd python_embedded + 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 -m pip wheel torch torchvision torchaudio --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu${{ inputs.cu }} -r ../ComfyUI/requirements.txt pygit2 -w ../temp_wheel_dir + ls ../temp_wheel_dir + ./python.exe -s -m pip install --pre ../temp_wheel_dir/* + sed -i '1i../ComfyUI' ./python3${{ inputs.python_minor }}._pth + cd .. - git clone --depth 1 https://github.com/comfyanonymous/taesd - cp taesd/*.pth ./ComfyUI_copy/models/vae_approx/ + git clone --depth 1 https://github.com/comfyanonymous/taesd + cp taesd/*.pth ./ComfyUI_copy/models/vae_approx/ - mkdir ComfyUI_windows_portable_nightly_pytorch - mv python_embedded ComfyUI_windows_portable_nightly_pytorch - mv ComfyUI_copy ComfyUI_windows_portable_nightly_pytorch/ComfyUI + mkdir ComfyUI_windows_portable_nightly_pytorch + mv python_embedded ComfyUI_windows_portable_nightly_pytorch + mv ComfyUI_copy ComfyUI_windows_portable_nightly_pytorch/ComfyUI - cd ComfyUI_windows_portable_nightly_pytorch + cd ComfyUI_windows_portable_nightly_pytorch - mkdir update - cp -r ComfyUI/.ci/update_windows/* ./update/ - cp -r ComfyUI/.ci/windows_base_files/* ./ - cp -r ComfyUI/.ci/windows_nightly_base_files/* ./ + mkdir update + cp -r ComfyUI/.ci/update_windows/* ./update/ + cp -r ComfyUI/.ci/windows_base_files/* ./ + cp -r ComfyUI/.ci/windows_nightly_base_files/* ./ - echo "call update_comfyui.bat nopause - ..\python_embedded\python.exe -s -m pip install --upgrade --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cu${{ inputs.cu }} -r ../ComfyUI/requirements.txt pygit2 - pause" > ./update/update_comfyui_and_python_dependencies.bat - cd .. + echo "call update_comfyui.bat nopause + ..\python_embedded\python.exe -s -m pip install --upgrade --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cu${{ inputs.cu }} -r ../ComfyUI/requirements.txt pygit2 + pause" > ./update/update_comfyui_and_python_dependencies.bat + 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_nightly_pytorch.7z ComfyUI_windows_portable_nightly_pytorch - mv ComfyUI_windows_portable_nightly_pytorch.7z ComfyUI/ComfyUI_windows_portable_nvidia_or_cpu_nightly_pytorch.7z + "C:\Program Files\7-Zip\7z.exe" a -t7z -m0=lzma2 -mx=8 -mfb=64 -md=32m -ms=on -mf=BCJ2 ComfyUI_windows_portable_nightly_pytorch.7z ComfyUI_windows_portable_nightly_pytorch + mv ComfyUI_windows_portable_nightly_pytorch.7z ComfyUI/ComfyUI_windows_portable_nvidia_or_cpu_nightly_pytorch.7z - cd ComfyUI_windows_portable_nightly_pytorch - python_embedded/python.exe -s ComfyUI/main.py --quick-test-for-ci --cpu + cd ComfyUI_windows_portable_nightly_pytorch + python_embedded/python.exe -s ComfyUI/main.py --quick-test-for-ci --cpu - ls + ls - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ComfyUI_windows_portable_nvidia_or_cpu_nightly_pytorch.7z - tag: "latest" - overwrite: true + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ComfyUI_windows_portable_nvidia_or_cpu_nightly_pytorch.7z + tag: "latest" + overwrite: true diff --git a/.github/workflows/windows_release_package.yml b/.github/workflows/windows_release_package.yml index ab61e133..f5bc8b44 100644 --- a/.github/workflows/windows_release_package.yml +++ b/.github/workflows/windows_release_package.yml @@ -32,68 +32,68 @@ jobs: pull-requests: "read" runs-on: windows-latest steps: - - 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 + - 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 - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - persist-credentials: false - - 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_embedded.zip - unzip python_embedded.zip -d python_embedded - cd python_embedded - 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 .. + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + - 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_embedded.zip + unzip python_embedded.zip -d python_embedded + cd python_embedded + 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 --depth 1 https://github.com/comfyanonymous/taesd - cp taesd/*.pth ./ComfyUI_copy/models/vae_approx/ + git clone --depth 1 https://github.com/comfyanonymous/taesd + cp taesd/*.pth ./ComfyUI_copy/models/vae_approx/ - mkdir ComfyUI_windows_portable - mv python_embedded ComfyUI_windows_portable - mv ComfyUI_copy ComfyUI_windows_portable/ComfyUI + mkdir ComfyUI_windows_portable + mv python_embedded ComfyUI_windows_portable + mv ComfyUI_copy ComfyUI_windows_portable/ComfyUI - cd ComfyUI_windows_portable + 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/ + 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 .. + 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/new_ComfyUI_windows_portable_nvidia_cu${{ inputs.cu }}_or_cpu.7z + "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/new_ComfyUI_windows_portable_nvidia_cu${{ inputs.cu }}_or_cpu.7z - cd ComfyUI_windows_portable - python_embedded/python.exe -s ComfyUI/main.py --quick-test-for-ci --cpu + cd ComfyUI_windows_portable + python_embedded/python.exe -s ComfyUI/main.py --quick-test-for-ci --cpu - ls + ls - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: new_ComfyUI_windows_portable_nvidia_cu${{ inputs.cu }}_or_cpu.7z - tag: "latest" - overwrite: true + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: new_ComfyUI_windows_portable_nvidia_cu${{ inputs.cu }}_or_cpu.7z + tag: "latest" + overwrite: true