Files
olivv-cs-ComfyUI-FunPack/tools/test_env.sh
T
Claude 527d368c82 SLA: optional rising sparsity (sla_sparsity_start), GSRS idea; CPU test env script
Skip fewer attention blocks on early steps and more on late ones, in a straight
line up to sla_sparsity. Off at 0, untested on H3. Credit GSRS (arXiv 2610.21129).
tools/test_env.sh and tools/cpuforce.py set up the suite on a GPU-less machine.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0176SHndmQj7T1VtWAWZiNcq
2026-10-25 16:05:33 +00:00

13 lines
879 B
Bash
Executable File

#!/bin/sh
# Test environment for a machine with no GPU (a cloud session): CPU torch, pytest, a ComfyUI checkout.
# Safe to run again; each step is skipped when already there. Prints the command that runs the suite.
set -e
COMFY=${COMFYUI_ROOT:-$HOME/ComfyUI}
# The three together, from the CPU index: ComfyUI's requirements would otherwise pull a CUDA torchvision that no longer matches.
python3 -c "import torch, torchvision" 2>/dev/null || pip install -q --index-url https://download.pytorch.org/whl/cpu torch torchvision torchaudio
python3 -c "import pytest" 2>/dev/null || pip install -q pytest
[ -f "$COMFY/comfy/supported_models.py" ] || git clone -q --depth 1 https://github.com/comfyanonymous/ComfyUI.git "$COMFY"
pip install -q -r "$COMFY/requirements.txt"
HERE=$(cd "$(dirname "$0")" && pwd)
echo "COMFYUI_ROOT=$COMFY PYTHONPATH=$HERE python3 -m pytest -p cpuforce -q"