Skip to content

ComfyUI Production Pipeline

A repeatable ComfyUI process for creating, reviewing, cleaning and exporting media used across my game prototypes, mods and tabletop tools.

AI-assisted images are labelled as such. My claim is the engineering around generation: workflow metadata, job routing, review points, cleanup and getting assets into a project.

The Dahaka cleanup graph: two background-removal passes, mask combination, eraser repair and an alpha join before the final sheet export.
My role
Workflow designer, prompt author and asset-cleanup owner
Used in
Character concepts, material tests, mod assets and presentation media
Focus
Repeatable workflows, queued jobs, review points, metadata and export steps
House rule
Large models, private prompts and generated output stay out of public Git repositories

Pipeline shape

  • Prompt + Workflow Registry

    Each job records its workflow, prompt template, output category, and visibility before it enters the generation queue.
  • Local Job Routing

    A router prepares each request, validates its workflow metadata, and stores outputs outside the public repository.
  • Asset Preparation

    Game and mod assets move through mask extraction, layer cleanup, contact sheets, scale checks, UI bakes, and source labeling.

One cleanup, start to finish

A Prince source sheet goes through mask extraction and cleanup before it's used in the mod and its presentation.

Raw Source Sheet. Source sheet: generated/source material is treated as raw production input, not a finished game asset.
Mask Extraction. BiRefNet pass: background removal isolates the character and component pieces for downstream cleanup.
Final Clean Sheet. Final clean sheet: the output is organized enough to become reference, matte source, or presentation material.

Local workflow router

Projects submit media requests through a small router. It picks a saved workflow, validates the prompt metadata, sends the job to ComfyUI and stores the result outside the public repository. In Black Dice Engine it works like this:

GM or AI proposes media
→ workflow and prompt template selected
→ GM approves or edits
→ router prepares the job
→ ComfyUI renders locally
→ output stored outside Git
  • Scene Reveal

    Player-visible fantasy scene illustration for campaign moments, routed as a background image job.
  • Portrait Variant

    GM-only character portrait exploration for NPCs, player-facing reveals, and visual canon review.
  • Location Study

    Environment stills focused on layout, landmarks, atmosphere, and table handouts.
  • Item Or Clue

    Close-up prop and clue imagery used when an object needs more attention than a text description can carry.
Shogun examples
Shogun Character Reference. A cleaner Shogun production asset used as the kind of source/reference material that can move through local ComfyUI cleanup and variant workflows.
Shogun Environment Source. Environment art from the Shogun folder shows how the workflow extends beyond character-only examples.
Shogun Sprite Cleanup Target. Sprite/action material is where the pipeline becomes practical: alpha, consistency, scale, and downstream implementation matter more than one flashy render.

What I learned

  • Make AI output auditable

    Each generated asset should record its workflow, storage location, visibility, and publication status.
  • Do not block live play on rendering

    ComfyUI belongs behind queues, approvals, and fallback states. A stalled image job should not freeze a game session or derail a prototype demo.
  • Separate lookdev from implementation

    Generated source material still needs clean layers, readable UI treatment, usable sprites, or a consistent visual direction.

The pipeline's output feeds the Prince of Persia mod, Shogun and Black Dice Engine.