Files
EwaldandClaude Sonnet 5 019a5c9172 Load through comfy_entrypoint and adopt current ComfyUI APIs
Defining NODE_CLASS_MAPPINGS made ComfyUI skip comfy_entrypoint, so
/imageops/viewmedia and node replacements were never registered. Load
as a V3 extension only, move server.py to routes.py so it stops
shadowing ComfyUI's server module, and transcode animated previews
with PyAV instead of an external ffmpeg.

- Require ComfyUI 0.19.0 (has_intermediate_output); CI floor updated.
- Process 11 nodes on ComfyUI's torch device when the frames fit in
  free memory (IMAGEOPS_COMPUTE_DEVICE=cpu disables it).
- Add core CURVE input to Color Correct, BOUNDING_BOX output/input to
  Crop and Crop Stitch, LAYERS output to Comp (ComfyUI 0.31+),
  essentials_category, and Merge blend modes with golden parity.
- Report progress through the public set_progress API and drop the
  hidden unique_id input.
- Add ImageOps settings and a refresh-previews command.
- Fix ImageOpsComp rotation and preview saving (undefined
  to_display_range) and masked Transform edge colors.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-28 14:53:14 +02:00

190 lines
4.5 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_call:
jobs:
frontend:
name: TypeScript & Frontend tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run check
- run: npm run build
- name: Verify js/ is up to date
run: |
git diff --exit-code js/
- run: npm run test:js
python-unit:
name: Python unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.11"
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install \
torch torchvision \
--index-url https://download.pytorch.org/whl/cpu
pip install numpy pytest pillow
- name: Verify unit tests exist
run: |
find tests/unit -name 'test_*.py' -print
test "$(find tests/unit -name 'test_*.py' | wc -l)" -gt 0
- name: Verify unit suite isolation
run: |
test ! -f tests/__init__.py
test ! -f tests/unit/__init__.py
python - <<'PY'
import importlib.util
assert importlib.util.find_spec("comfy_api") is None, (
"comfy_api must NOT be installed in the unit-test job"
)
print("Unit environment isolation OK")
PY
- name: Verify pytest unit root
run: |
python -m pytest \
-c tests/pytest.ini \
tests/unit \
--collect-only \
-q
- name: Run unit tests
run: |
python -m pytest \
-c tests/pytest.ini \
tests/unit \
-vv \
--maxfail=1
comfy-integration:
name: ComfyUI integration tests (${{ matrix.comfyui-ref }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# comfyui-ref pins the compatibility floor declared as requires-comfyui
# in pyproject.toml, plus the current stable release. Bump the floor
# entry only after confirming this job passes against it.
comfyui-ref: ["v0.19.0", "v0.37.4"]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.11"
cache: pip
- name: Install CPU dependencies
run: |
python -m pip install --upgrade pip
pip install \
torch torchvision torchaudio \
--index-url https://download.pytorch.org/whl/cpu
pip install pytest numpy pillow
- name: Clone ComfyUI
run: |
git clone \
--depth 1 \
--branch ${{ matrix.comfyui-ref }} \
https://github.com/Comfy-Org/ComfyUI.git \
/tmp/ComfyUI
pip install \
-r /tmp/ComfyUI/requirements.txt
- name: Install ImageOps
run: |
mkdir -p \
/tmp/ComfyUI/custom_nodes/ComfyUI-Majoor-ImageOps
cp -a ./. \
/tmp/ComfyUI/custom_nodes/ComfyUI-Majoor-ImageOps/
- name: Verify environment
env:
COMFYUI_ROOT: /tmp/ComfyUI
PYTHONPATH: /tmp/ComfyUI
run: |
set -euxo pipefail
test -d "$COMFYUI_ROOT"
test -d "$COMFYUI_ROOT/comfy_api"
test -f \
"$COMFYUI_ROOT/comfy_api/latest/__init__.py"
python - <<'PY'
from comfy_api.latest import io, ComfyExtension
print("ComfyUI V3 API OK")
PY
test -f \
"$COMFYUI_ROOT/custom_nodes/ComfyUI-Majoor-ImageOps/__init__.py"
echo "=== Integration test files ==="
find \
tests/integration \
-name 'test_*.py' \
-print
test "$(
find tests/integration \
-name 'test_*.py' \
| wc -l
)" -gt 0
- name: Run integration tests
env:
COMFYUI_ROOT: /tmp/ComfyUI
PYTHONPATH: /tmp/ComfyUI
run: |
python -m pytest \
-c tests/pytest.ini \
tests/integration \
-vv \
--maxfail=1
quality-gate:
name: Quality Gate
needs: [frontend, python-unit, comfy-integration]
runs-on: ubuntu-latest
steps:
- run: echo "All quality checks passed!"