Skip to content

Intel Mac Release Dependencies with Nightly PyTorch #1

Intel Mac Release Dependencies with Nightly PyTorch

Intel Mac Release Dependencies with Nightly PyTorch #1

name: "Intel Mac Release Dependencies with Nightly PyTorch"
on:
workflow_dispatch:
inputs:
spec_file:
description: 'spec file'
required: true
type: string
default: "ComfyUI.spec"
python_minor:
description: 'python minor version'
required: true
type: string
default: "12"
extra_dependencies:
description: 'extra dependencies'
required: false
type: string
default: "\"numpy<2\""
jobs:
build_and_release_dependencies:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.${{ inputs.python_minor }}'
- name: Create virtual environment
run: |
python -m venv packaged_env
source packaged_env/bin/activate
python -m pip install --upgrade pip
- name: Install PyTorch nightly
run: |
source packaged_env/bin/activate
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
- name: Fetch and install ComfyUI requirements
run: |
source packaged_env/bin/activate
curl -o requirements.txt https://raw.githubusercontent.com/comfyanonymous/ComfyUI/master/requirements.txt
pip install ${{ inputs.extra_dependencies }} -r requirements.txt
- name: Verify PyTorch installation
run: |
source packaged_env/bin/activate
python -c "import torch; print(f'PyTorch version: {torch.__version__}')"
python -c "import torch; print(f'PyTorch installation directory: {torch.__file__}')"
python -c "import torchvision; print(f'torchvision version: {torchvision.__version__}')"
python -c "import torchaudio; print(f'torchaudio version: {torchaudio.__version__}')"
- name: Package environment
run: |
source packaged_env/bin/activate
pip install pyinstaller
git clone https://github.com/comfyanonymous/ComfyUI --depth 1
cp ${{ inputs.spec_file }} ComfyUI/
cd ComfyUI
pyinstaller ${{ inputs.spec_file }}
tar -czf mac_intel_python_env.tar.gz dist
- name: Get current date
id: date
run: echo "datetime=$(date +'%Y-%m-%d-%H%M%S')" >> $GITHUB_OUTPUT
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: intel-mac-deps-py3.${{ inputs.python_minor }}-${{ steps.date.outputs.datetime }}
name: Mac Intel Dependencies Python 3.${{ inputs.python_minor }} (${{ steps.date.outputs.datetime }})
body: |
Intel Mac dependencies with Nightly PyTorch
Build Date: ${{ steps.date.outputs.datetime }}
Includes:
- Python 3.${{ inputs.python_minor }} virtual environment
- PyTorch (Nightly build)
- ComfyUI requirements
draft: false
prerelease: true
artifacts: "ComfyUI/mac_intel_python_env.tar.gz"
token: ${{ secrets.GITHUB_TOKEN }}