Comic Batch Generator
No KSampler in sight — this node renders your entire comic in one queue
- comic_script
- model
- clip
- vae
- generated_panels
- comic_script
- generation_log
If you've ever made a comic in ComfyUI the manual way, you know the grind: wire up a KSampler, re-run it, swap the prompt, position the panel in an editor, repeat forty times. This pack exists to kill that loop. Comic Batch Generator is the engine - it takes a validated JSON comic script and renders every single panel through your model in one queue, then hands the finished panels to the composer. No external KSampler, no per-panel wiring.
What it actually does
It's an inner for-loop wearing a node costume. For each page, for each panel, it builds the prompt (the script's four layers - style, character, page, scene - joined with commas, plus any suffix), runs CLIPTextEncode → EmptyLatentImage → KSampler → VAEDecode using ComfyUI's own built-in nodes, saves the PNG, and moves on. It even handles the resolution math you'd normally trip over: SD/SDXL latents work in multiples of 8, so it samples at the next multiple of 8 up and crops back to the exact panel size.
The cache is the killer feature
Every panel gets a SHA256 hash over everything that affects its pixels - prompt, size, seed, sampler settings, shape. The PNG and a matching manifest land in output/comics/<job_id>/panels/. Re-queue an unchanged script and every panel is a cache hit - you get the whole comic back in seconds. Change one panel's prompt and only that panel re-runs. Iterate on one bad panel without burning the GPU on the other fifty.
The inputs that matter
- comic_script - the
COMIC_SCRIPToutput from ComicScriptLoader. Non-negotiable. - model / clip / vae - your checkpoint, exactly like a KSampler node.
- on_failure -
retry_then_skip(default) retries, then writes a red-X placeholder and records it as skipped so re-runs stay skipped;haltstops the whole batch at the first failed panel. For unattended runs, keep the default. - max_attempts - 1 to 11 tries per panel, default 3. Bump it if your VRAM is marginal and you get random OOMs.
The two optional fields are quieter but useful: positive_suffix and negative_suffix get appended to every panel's prompt. "manga, screentone, black and white, 1girl" once, instead of in every scene prompt.
Here's the trap: there are no steps/cfg/sampler widgets on this node. Sampler settings come exclusively from the script's default_sampler and per-panel sampler_override - the author's design, so the JSON stays the single source of truth. If you want to experiment without editing JSON, slot the ComicSamplerOverride node in upstream. People arriving from KSampler habits hunt for the widgets and don't find them; that's not a bug.
Outputs
- generated_panels (IMAGE) - the stack of every panel, padded to a uniform size, in script order. Feed it to ComicPageComposer.
- comic_script - the same script passed through, so the composer gets it without a separate wire from the loader.
- generation_log (STRING) - one line per panel:
cached,generated(with time and attempt),failed, orskipped. Read this when something looks wrong.
Install
Same steps for all four nodes in this pack - clone, install the tiny deps, restart:
cd ComfyUI/custom_nodes
git clone https://github.com/tackcrypto1031/tk_comfyui_comic_tool.git
cd tk_comfyui_comic_tool
pip install Pillow jsonschema numpy
Restart and you'll find it under comic/core. ComfyUI Manager works too - search the pack title "tk_comfyui_batch_image". No model files to download; the deps are just Pillow, jsonschema, and numpy, almost certainly already in your environment.
The honest take
This node removes the mechanical grind of batch-generating and re-running panels, which is a real chunk of the work. It does not solve character consistency - the part the community consistently names as the actual bottleneck for AI comics (the r/StableDiffusion experience everyone cites: 72 pages over three months, prompting only 35% of it). You'll still want a character or style LoRA and some manual curation. But as a first pass from screenplay to rough pages, it's surprisingly close to one-click.
Troubleshooting
- Red-X placeholders everywhere - a panel genuinely failed all its attempts. It's not a sizing issue; the 8-multiple rounding is handled internally. Check
generation_log, fix the prompt or model, then change any hash-relevant field on that panel (or clear the cache folder) to force a real re-run - the skipped placeholder is persisted on purpose. - Changed the JSON, nothing re-renders - the cache matched. If you edited something that doesn't affect the panel hash (a page border, the layout), that's expected: the pixels didn't change, so no re-run.
- Batch died on one panel - you were on
halt. Switch toretry_then_skipfor unattended runs, fix the offender, re-queue.
That cache-plus-skip policy is what makes this node worth using. Learn the failure modes and a long comic becomes a queue-and-walk-away operation instead of a supervision job.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| comic_script | COMIC_SCRIPT | — | |
| model | MODEL | — | |
| clip | CLIP | — | |
| vae | VAE | — | |
| on_failure | COMBO | retry_then_skip | 2 options: retry_then_skip, halt |
| max_attempts | INT | 31–11 | — |
| positive_suffixopt | STRING | — | |
| negative_suffixopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| generated_panels | IMAGE | — |
| comic_script | COMIC_SCRIPT | — |
| generation_log | STRING | — |