From 0134d7ab49702b71af37451c647fedb8814704ac Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Fri, 6 Oct 2023 12:49:40 -0400 Subject: [PATCH] Generate update script with right settings. --- .../workflows/windows_release_dependencies.yml | 16 +++++++++++++++- .github/workflows/windows_release_package.yml | 7 +++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows_release_dependencies.yml b/.github/workflows/windows_release_dependencies.yml index 104639a0..f2ac9407 100644 --- a/.github/workflows/windows_release_dependencies.yml +++ b/.github/workflows/windows_release_dependencies.yml @@ -40,6 +40,18 @@ jobs: - shell: bash run: | + echo "@echo off + ..\python_embeded\python.exe .\update.py ..\ComfyUI\ + echo + echo This will try to update pytorch and all python dependencies, if you get an error wait for pytorch/xformers to fix their stuff + echo You should not be running this anyways unless you really have to + echo + echo If you just want to update normally, close this and run update_comfyui.bat instead. + echo + pause + ..\python_embeded\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 }} --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 @@ -49,5 +61,7 @@ jobs: - uses: actions/cache/save@v3 with: - path: cu${{ inputs.cu }}_python_deps.tar + 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_package.yml b/.github/workflows/windows_release_package.yml index a4f36a70..87d37c24 100644 --- a/.github/workflows/windows_release_package.yml +++ b/.github/workflows/windows_release_package.yml @@ -35,11 +35,14 @@ jobs: - uses: actions/cache/restore@v3 id: cache with: - path: cu${{ inputs.cu }}_python_deps.tar + 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 @@ -74,8 +77,8 @@ jobs: mkdir update cp -r ComfyUI/.ci/update_windows/* ./update/ - cp -r ComfyUI/.ci/update_windows_cu${{ inputs.cu }}/* ./update/ cp -r ComfyUI/.ci/windows_base_files/* ./ + cp ../update_comfyui_and_python_dependencies.bat ./update/ cd ..