Skip to content

Embedded Windows Release Dependencies #2

Embedded Windows Release Dependencies

Embedded Windows Release Dependencies #2

name: "Embedded Windows Release Dependencies"
on:
workflow_dispatch:
inputs:
xformers:
description: 'xformers version'
required: false
type: string
default: ""
extra_dependencies:
description: 'extra dependencies'
required: false
type: string
default: "\"numpy<2\""
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:
build_and_release_dependencies:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Download and extract embedded Python
shell: bash
run: |
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
curl -o requirements.txt https://raw.githubusercontent.com/comfyanonymous/ComfyUI/master/requirements.txt
./python.exe -s -m pip install -r requirements.txt
sed -i '1i../ComfyUI' ./python3${{ inputs.python_minor }}._pth
./python.exe -m pip install torch torchvision torchaudio ${{ inputs.xformers }} ${{ inputs.extra_dependencies }} --extra-index-url https://download.pytorch.org/whl/cu${{ inputs.cu }} -r ../requirements.txt pygit2
cd ../
git clone https://github.com/comfyanonymous/ComfyUI --depth 1
git clone --depth 1 https://github.com/comfyanonymous/taesd
cp taesd/*.pth ./ComfyUI/models/vae_approx/
mkdir ComfyUI_windows_portable
mv ComfyUI ComfyUI_windows_portable
mv python_embedded ComfyUI_windows_portable
"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
cd ComfyUI_windows_portable
python_embeded/python.exe -s ComfyUI/main.py --quick-test-for-ci --cpu
ls
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "./ComfyUI_windows_portable.7z"
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: embedded-windows-deps-cu${{ inputs.cu }}-py${{ inputs.python_minor }}.${{ inputs.python_patch }}-${{ github.run_number }}
name: Embedded Windows Dependencies CUDA ${{ inputs.cu }} Python ${{ inputs.python_minor }}.${{ inputs.python_patch }} (Build ${{ github.run_number }})
body: |
Windows dependencies for CUDA ${{ inputs.cu }} and Python ${{ inputs.python_minor }}.${{ inputs.python_patch }}
Includes:
- Embedded Python ${{ inputs.python_minor }}.${{ inputs.python_patch }}
- PyTorch dependencies for CUDA ${{ inputs.cu }}
- ComfyUI requirements
draft: false
prerelease: true