From bf9c17a975234f03b3c6d23afa17037cba438942 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Sun, 19 Mar 2023 17:41:27 -0400 Subject: [PATCH 1/5] No longer needed. --- .github/workflows/windows_release.yml | 64 --------- .github/workflows/windows_release_cu118.yml | 142 -------------------- 2 files changed, 206 deletions(-) delete mode 100644 .github/workflows/windows_release.yml delete mode 100644 .github/workflows/windows_release_cu118.yml diff --git a/.github/workflows/windows_release.yml b/.github/workflows/windows_release.yml deleted file mode 100644 index 3f7d4d739..000000000 --- a/.github/workflows/windows_release.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: "Windows Release" - -on: - workflow_dispatch: -# push: -# branches: -# - master - -jobs: - build: - permissions: - contents: "write" - packages: "write" - pull-requests: "read" - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - shell: bash - run: | - cd .. - cp -r ComfyUI ComfyUI_copy - curl https://www.python.org/ftp/python/3.10.9/python-3.10.9-embed-amd64.zip -o python_embeded.zip - unzip python_embeded.zip -d python_embeded - cd python_embeded - echo 'import site' >> ./python310._pth - curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py - ./python.exe get-pip.py - ./python.exe -s -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117 xformers -r ../ComfyUI/requirements.txt pygit2 - sed -i '1i../ComfyUI' ./python310._pth - cd .. - - - 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/* ./ - - cd .. - - "C:\Program Files\7-Zip\7z.exe" a -t7z -m0=lzma -mx=8 -mfb=64 -md=32m -ms=on ComfyUI_windows_portable.7z ComfyUI_windows_portable - mv ComfyUI_windows_portable.7z ComfyUI/ComfyUI_windows_portable_nvidia_or_cpu.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_or_cpu.7z - tag: "latest" - overwrite: true - diff --git a/.github/workflows/windows_release_cu118.yml b/.github/workflows/windows_release_cu118.yml deleted file mode 100644 index 49a39e29b..000000000 --- a/.github/workflows/windows_release_cu118.yml +++ /dev/null @@ -1,142 +0,0 @@ -name: "Windows Release cu118" - -on: - workflow_dispatch: -# push: -# branches: -# - master - -jobs: - build_dependencies: - env: - # you need at least cuda 5.0 for some of the stuff compiled here. - TORCH_CUDA_ARCH_LIST: "5.0+PTX 6.0 6.1 7.0 7.5 8.0 8.6 8.9" - FORCE_CUDA: 1 - MAX_JOBS: 1 # will crash otherwise - DISTUTILS_USE_SDK: 1 # otherwise distutils will complain on windows about multiple versions of msvc - XFORMERS_BUILD_TYPE: "Release" - runs-on: windows-latest - steps: - - name: Cache Built Dependencies - uses: actions/cache@v3 - id: cache-cu118_python_stuff - with: - path: cu118_python_deps.tar - key: ${{ runner.os }}-build-cu118 - - - if: steps.cache-cu118_python_stuff.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - - - if: steps.cache-cu118_python_stuff.outputs.cache-hit != 'true' - uses: actions/setup-python@v4 - with: - python-version: '3.10.9' - - - if: steps.cache-cu118_python_stuff.outputs.cache-hit != 'true' - uses: comfyanonymous/cuda-toolkit@test - id: cuda-toolkit - with: - cuda: '11.8.0' - # copied from xformers github - - name: Setup MSVC - uses: ilammy/msvc-dev-cmd@v1 - - name: Configure Pagefile - # windows runners will OOM with many CUDA architectures - # we cheat here with a page file - uses: al-cheb/configure-pagefile-action@v1.3 - with: - minimum-size: 2GB - # really unfortunate: https://github.com/ilammy/msvc-dev-cmd#name-conflicts-with-shell-bash - - name: Remove link.exe - shell: bash - run: rm /usr/bin/link - - - if: steps.cache-cu118_python_stuff.outputs.cache-hit != 'true' - shell: bash - run: | - python -m pip wheel --no-cache-dir torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118 -r requirements.txt pygit2 -w ./temp_wheel_dir - python -m pip install --no-cache-dir ./temp_wheel_dir/* - echo installed basic - git clone --recurse-submodules https://github.com/facebookresearch/xformers.git - cd xformers - python -m pip install --no-cache-dir wheel setuptools twine - echo building xformers - python setup.py bdist_wheel -d ../temp_wheel_dir/ - cd .. - rm -rf xformers - ls -lah temp_wheel_dir - mv temp_wheel_dir cu118_python_deps - tar cf cu118_python_deps.tar cu118_python_deps - - uses: actions/upload-artifact@v3 - with: - name: cu118_python_deps - path: cu118_python_deps.tar - retention-days: 1 - - - package_comfyui: - needs: build_dependencies - permissions: - contents: "write" - packages: "write" - pull-requests: "read" - runs-on: windows-latest - steps: - - uses: actions/download-artifact@v3 - with: - name: cu118_python_deps - - shell: bash - run: | - mv cu118_python_deps.tar ../ - cd .. - tar xf cu118_python_deps.tar - pwd - ls - - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - shell: bash - run: | - cd .. - cp -r ComfyUI ComfyUI_copy - curl https://www.python.org/ftp/python/3.10.9/python-3.10.9-embed-amd64.zip -o python_embeded.zip - unzip python_embeded.zip -d python_embeded - cd python_embeded - echo 'import site' >> ./python310._pth - curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py - ./python.exe get-pip.py - ./python.exe -s -m pip install ../cu118_python_deps/* - sed -i '1i../ComfyUI' ./python310._pth - cd .. - - - 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/update_windows_cu118/* ./update/ - cp -r ComfyUI/.ci/windows_base_files/* ./ - - cd .. - - "C:\Program Files\7-Zip\7z.exe" a -t7z -m0=lzma -mx=8 -mfb=64 -md=32m -ms=on ComfyUI_windows_portable.7z ComfyUI_windows_portable - mv ComfyUI_windows_portable.7z ComfyUI/new_ComfyUI_windows_portable_nvidia_cu118_or_cpu.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: new_ComfyUI_windows_portable_nvidia_cu118_or_cpu.7z - tag: "latest" - overwrite: true - From 1261a70034506a8220c584fcbbb833ab6ff87531 Mon Sep 17 00:00:00 2001 From: Joe Colburn Date: Mon, 20 Mar 2023 00:04:20 -0400 Subject: [PATCH 2/5] add extra_model_paths.yaml to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6da32900f..41d517048 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ models/checkpoints models/vae models/embeddings models/loras +extra_model_paths.yaml From db34645f53d57bd19b9e2edffa498fb1c03b1f39 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Mon, 20 Mar 2023 00:31:17 -0400 Subject: [PATCH 3/5] .gitignore some folders. --- .gitignore | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 41d517048..71c3b45ae 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ __pycache__/ *.py[cod] output/ -models/checkpoints -models/vae -models/embeddings -models/loras +input/ +models/ +temp/ +custom_nodes/ extra_model_paths.yaml From 840464af93bae2ad2a2deba697a71e58c19fa8e9 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Mon, 20 Mar 2023 00:37:32 -0400 Subject: [PATCH 4/5] Don't .gitignore the examples. --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 71c3b45ae..d311a2a09 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,9 @@ __pycache__/ *.py[cod] output/ input/ +!input/example.png models/ temp/ custom_nodes/ +!custom_nodes/example_node.py.example extra_model_paths.yaml From 46b674c9c29e2844887d340fdf505d18ce59be15 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Mon, 20 Mar 2023 02:23:47 -0400 Subject: [PATCH 5/5] Make saved json more pretty. --- web/scripts/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/scripts/ui.js b/web/scripts/ui.js index 51f9b52c7..58012fe6c 100644 --- a/web/scripts/ui.js +++ b/web/scripts/ui.js @@ -310,7 +310,7 @@ export class ComfyUI { $el("button", { textContent: "Save", onclick: () => { - const json = JSON.stringify(app.graph.serialize()); // convert the data to a JSON string + const json = JSON.stringify(app.graph.serialize(), null, 2); // convert the data to a JSON string const blob = new Blob([json], { type: "application/json" }); const url = URL.createObjectURL(blob); const a = $el("a", {