brunvelop/ComfyUI
2
1name: "Windows Release Nightly pytorch"2 3on:4 workflow_dispatch:5# push:6# branches:7# - master8 9jobs:10 build:11 permissions:12 contents: "write"13 packages: "write"14 pull-requests: "read"15 runs-on: windows-latest16 steps:17 - uses: actions/checkout@v318 with:19 fetch-depth: 020 persist-credentials: false21 - uses: actions/setup-python@v422 with:23 python-version: '3.11.6'24 - shell: bash25 run: |26 cd ..27 cp -r ComfyUI ComfyUI_copy28 curl https://www.python.org/ftp/python/3.11.6/python-3.11.6-embed-amd64.zip -o python_embeded.zip29 unzip python_embeded.zip -d python_embeded30 cd python_embeded31 echo 'import site' >> ./python311._pth32 curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py33 ./python.exe get-pip.py34 python -m pip wheel torch torchvision torchaudio aiohttp==3.8.5 --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu121 -r ../ComfyUI/requirements.txt pygit2 -w ../temp_wheel_dir35 ls ../temp_wheel_dir36 ./python.exe -s -m pip install --pre ../temp_wheel_dir/*37 sed -i '1i../ComfyUI' ./python311._pth38 cd ..39 40 git clone https://github.com/comfyanonymous/taesd41 cp taesd/*.pth ./ComfyUI_copy/models/vae_approx/42 43 mkdir ComfyUI_windows_portable_nightly_pytorch44 mv python_embeded ComfyUI_windows_portable_nightly_pytorch45 mv ComfyUI_copy ComfyUI_windows_portable_nightly_pytorch/ComfyUI46 47 cd ComfyUI_windows_portable_nightly_pytorch48 49 mkdir update50 cp -r ComfyUI/.ci/update_windows/* ./update/51 cp -r ComfyUI/.ci/windows_base_files/* ./52 cp -r ComfyUI/.ci/nightly/update_windows/* ./update/53 cp -r ComfyUI/.ci/nightly/windows_base_files/* ./54 55 cd ..56 57 "C:\Program Files\7-Zip\7z.exe" a -t7z -m0=lzma -mx=8 -mfb=64 -md=32m -ms=on -mf=BCJ2 ComfyUI_windows_portable_nightly_pytorch.7z ComfyUI_windows_portable_nightly_pytorch58 mv ComfyUI_windows_portable_nightly_pytorch.7z ComfyUI/ComfyUI_windows_portable_nvidia_or_cpu_nightly_pytorch.7z59 60 cd ComfyUI_windows_portable_nightly_pytorch61 python_embeded/python.exe -s ComfyUI/main.py --quick-test-for-ci --cpu62 63 ls64 65 - name: Upload binaries to release66 uses: svenstaro/upload-release-action@v267 with:68 repo_token: ${{ secrets.GITHUB_TOKEN }}69 file: ComfyUI_windows_portable_nvidia_or_cpu_nightly_pytorch.7z70 tag: "latest"71 overwrite: true72 