BonusLockSMith/gritai-comic-pipeline
GritAI Comic Pipeline One person. Local hardware. 13 complete AI-generated comics in a single day. A fully local, reproducible pipeline that transforms story descriptions into complete multi-page comic books with panel layouts, character consistency, and dialogue overlays. Zero cloud APIs. Zero subscriptions. Just SDXL + Qwen + Pillow + PowerShell. Pipeline Architecture Story JSON → Stage 1 (SDXL Base) → Stage 2 (Qwen Edit) → Stage 3 (Pillow Assembly) → Bubble… See the full description on the dataset page: https://huggingface.co/datasets/BonusLockSMith/gritai-comic-pipeline.
GritAI Comic Pipeline
One person. Local hardware. 13 complete AI-generated comics in a single day.
A fully local, reproducible pipeline that transforms story descriptions into complete multi-page comic books with panel layouts, character consistency, and dialogue overlays. Zero cloud APIs. Zero subscriptions. Just SDXL + Qwen + Pillow + PowerShell.
Pipeline Architecture
Story JSON → Stage 1 (SDXL Base) → Stage 2 (Qwen Edit) → Stage 3 (Pillow Assembly) → Bubble Renderer → PDFStage 1: SDXL Single Base Generation
- Checkpoint:
realcartoonXL_v7(RealCartoonXL) - Single base image per page using character-consistent prompt
- Same
base_seedacross all pages for character consistency - 20 steps, CFG 7, 1024x1536 portrait
Stage 2: Qwen Parallel Panel Editing
- Model: Qwen 2.5 VL (image editing mode)
- Takes single base image → branches into N unique panels simultaneously
- Each panel gets a unique
edit_promptdescribing the scene - 4 steps, CFG 1 (fast inference)
- All panels generated in parallel via ComfyUI API
Stage 3: Pillow Panel Assembly
- Custom Python/Pillow assembler (replaced ComfyUI CR Comic Panel Templates)
- 12 layout templates: H2, H3, V2, V3, G22, G33, H12, H21, H13, H31, V12, V21
- Auto-scale and center-crop panels to fill slots exactly
- 8px black borders between panels
- Assembly time: ~1 second per page (down from 6s with CR node)
Stage 4: Bubble Renderer
- Overlays narration boxes, speech bubbles, and thought bubbles
- Reads
textarrays from story JSON - Position-aware: places bubbles within correct panel boundaries
- Three types: narration (rectangular, cream), speech (rounded, white, tail), thought (cloud, dots)
- Comic font rendering with word wrap
Orchestration
run_story.ps1— One-command story generation from JSONrun_comic_pipeline.ps1— Per-page pipeline execution via ComfyUI APIpillow_assembler.py— Panel assembly with layout templatesbubble_renderer.py— Dialogue overlay system- Auto-titling with arched gold text
- Auto-PDF generation
Hardware
Output Stats
Produced in a single session:
Stories
All source material is public domain classic literature.
Story JSON Format
Each story is defined as a single JSON file:
{
"story_id": "frankenstein",
"story_title": "FRANKENSTEIN",
"base_prompt": "character description for consistency across pages",
"base_seed": 8001,
"global_settings": {
"width": 1024, "height": 1536,
"stage1_steps": 20, "stage1_cfg": 7,
"stage2_steps": 4, "stage2_cfg": 1,
"sdxl_checkpoint": "SDXL\\realcartoonXL_v7.safetensors"
},
"pages": [
{
"page_title": "THE CREATION",
"page_template": "H21",
"panels": [
{
"panel_id": 1,
"seed": 8201,
"edit_prompt": "scene description for this panel",
"text": [
{"type": "narration", "position": "top", "content": "The storm answered my ambition."},
{"type": "speech", "position": "bottom-left", "content": "LIVE! In the name of God -- LIVE!"}
]
}
]
}
]
}Layout Templates
H2: [████████] H3: [████████] V2: [████|████] G22: [████|████]
[████████] [████████] [████|████] [████|████]
[████████]
H12: [████████] H21: [████|████] H13: [████████████]
[████|████] [████████████] [████|████|████]Samples
War of the Worlds - Complete Edition (with dialogue)
Frankenstein (with dialogue)
Dracula (with dialogue)
Covers
Key Technical Decisions
- Single base → parallel edit — Generating one base per page and editing it into multiple panels preserves character consistency far better than generating each panel independently.
- Pillow over ComfyUI for assembly — CR Comic Panel Templates couldn't scale panels to fill non-G22 layouts. Custom Pillow assembler handles all 12 templates with center-crop fill. Reduced assembly from 6s to 1s.
- PowerShell orchestration — ComfyUI API called via PowerShell, not Python. Enables Windows-native workflow with direct filesystem access.
- Bubble renderer as post-process — Text overlays happen AFTER page assembly, reading from the same JSON. No re-rendering needed to add/edit dialogue.
License
Pipeline outputs are CC-BY-4.0. Source stories are public domain.
Built by
GritAI — A one-person AI lab focused on reproducible AI generation, local deployment, and proving that meaningful creative output doesn't require cloud subscriptions or enterprise budgets.
- X: @BonusLockSmith
- Gumroad: gritai.gumroad.com
- Reppo: reppo.ai
