41 lines
1.4 KiB
YAML
41 lines
1.4 KiB
YAML
name: Run tests requiring ComfyUI
|
|
on:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
push:
|
|
paths:
|
|
- prompt_control/adv_encode.py
|
|
- prompt_control/attention_couple_ppm.py
|
|
- prompt_control/nodes_lazy.py
|
|
- prompt_control/prompts.py
|
|
- prompt_control/parser.py
|
|
- prompt_control/utils.py
|
|
|
|
|
|
jobs:
|
|
run-graph-tests:
|
|
name: Run tests requiring ComfyUI
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
- name: Check out ComfyUI
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: comfyanonymous/ComfyUI
|
|
path: ComfyUI
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
cache: pip
|
|
- name: install-torch
|
|
run: pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
|
|
- name: install ComfyUI
|
|
run: pip install pytest typing-extensions -r ComfyUI/requirements.txt
|
|
- name: Download clip_l.safetensors
|
|
run: curl -LO https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/clip_l.safetensors
|
|
- name: Force Comfy to use the CPU
|
|
run: sed -i "s/^cpu_state = CPUState.GPU/cpu_state = CPUState.CPU/g" ComfyUI/comfy/model_management.py
|
|
- name: Run graph tests
|
|
run: PYTHONPATH=ComfyUI pytest tests/test_graph.py tests/test_encode.py
|