brunvelop/ComfyUI
2
1name: "Windows Release cu118 dependencies"2 3on:4 workflow_dispatch:5# push:6# branches:7# - master8 9jobs:10 build_dependencies:11 env:12 # you need at least cuda 5.0 for some of the stuff compiled here.13 TORCH_CUDA_ARCH_LIST: "5.0+PTX 6.0 6.1 7.0 7.5 8.0 8.6 8.9"14 FORCE_CUDA: 115 MAX_JOBS: 1 # will crash otherwise16 DISTUTILS_USE_SDK: 1 # otherwise distutils will complain on windows about multiple versions of msvc17 XFORMERS_BUILD_TYPE: "Release"18 runs-on: windows-latest19 steps:20 - name: Cache Built Dependencies21 uses: actions/cache@v322 id: cache-cu118_python_stuff23 with:24 path: cu118_python_deps.tar25 key: ${{ runner.os }}-build-cu11826 27 - if: steps.cache-cu118_python_stuff.outputs.cache-hit != 'true'28 uses: actions/checkout@v329 30 - if: steps.cache-cu118_python_stuff.outputs.cache-hit != 'true'31 uses: actions/setup-python@v432 with:33 python-version: '3.10.9'34 35 - if: steps.cache-cu118_python_stuff.outputs.cache-hit != 'true'36 uses: comfyanonymous/cuda-toolkit@test37 id: cuda-toolkit38 with:39 cuda: '11.8.0'40 # copied from xformers github41 - name: Setup MSVC42 uses: ilammy/msvc-dev-cmd@v143 - name: Configure Pagefile44 # windows runners will OOM with many CUDA architectures45 # we cheat here with a page file46 uses: al-cheb/configure-pagefile-action@v1.347 with:48 minimum-size: 2GB49 # really unfortunate: https://github.com/ilammy/msvc-dev-cmd#name-conflicts-with-shell-bash50 - name: Remove link.exe51 shell: bash52 run: rm /usr/bin/link53 54 - if: steps.cache-cu118_python_stuff.outputs.cache-hit != 'true'55 shell: bash56 run: |57 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_dir58 python -m pip install --no-cache-dir ./temp_wheel_dir/*59 echo installed basic60 git clone --recurse-submodules https://github.com/facebookresearch/xformers.git61 cd xformers62 python -m pip install --no-cache-dir wheel setuptools twine63 echo building xformers64 python setup.py bdist_wheel -d ../temp_wheel_dir/65 cd ..66 rm -rf xformers67 ls -lah temp_wheel_dir68 mv temp_wheel_dir cu118_python_deps69 tar cf cu118_python_deps.tar cu118_python_deps70 71 72 