d2abcdf5142ac0a24c7d96fb41b1479a772f3e46
Code review flagged that R1's early-exit (chosen in 1793f8d to satisfy
a len(errs)==1 assertion) would diverge from Tasks 3-6 which use
accumulate-all. Retrofit R1 + relax the test to use any()/next() so a
user fixes all continuity gaps in one validate pass. Also deepcopy the
page template in the fixture helper to avoid shared-ref leaks in later
rule tests.
tk_comfyui_batch_image
ComfyUI custom node set for batch comic-page generation from a JSON script.
Status: M1 — Rectangle vertical-stack. See docs/superpowers/specs/2026-04-23-comfyui-comic-batch-node-design.md for the full design; docs/superpowers/plans/ for milestones.
Install
Clone this repo into ComfyUI/custom_nodes/, then:
pip install -e .[dev]
Restart ComfyUI.
Nodes
| Node | Purpose |
|---|---|
Comic Script Loader |
Load + validate JSON; emits COMIC_SCRIPT. Modes: file / path / inline. |
Comic Batch Generator |
Inner for-loop over panels. Connect MODEL / CLIP / VAE; no KSampler needed. Supports resume via panel-hash cache. |
Comic Page Composer |
Assemble panels into full pages. Outputs composed IMAGE batch + bbox metadata + pass-through panels. |
Example workflow
Drop examples/workflows/m1_basic_vertical_stack.json into ComfyUI.
Place basic.json (see tests/fixtures/scripts/) at ComfyUI/input/comics/basic.json.
Running tests
pytest tk_comfyui_batch_image/tests/ -v
ruff check tk_comfyui_batch_image
Current limitations (M1)
- Shapes: rectangle only (no
split/polygonyet → M3/M4) - Layout modes:
vertical_stackonly (nocustom_gridyet → M3) - No debug overlay (→ M5)
- No standalone JSON-validation CLI (→ M2)
- No SKILL.md skill package for AI script generation (→ M2)
Languages
Python
100%