Local AI Local AI Intermediate

Build Reusable ComfyUI Workflows

Save, parameterize, and automate image pipelines

65 of 66

Save a workflow

In ComfyUI, click Save to export the current node graph as JSON. Load it later with Load.

Parameterize prompts

Replace hard-coded prompt text with widgets or exposed inputs. Save the workflow as a template and change only the prompt each time.

Batch size and seeds

  • Batch size generates multiple images in one run
  • Seed controls randomness; reuse a seed to refine an image
  • ControlNet adds pose, depth, or edge guidance

Upscale workflow

Chain an upscaler after the VAE Decode:

KSampler → VAE Decode → Upscale Model → Save Image

Good upscalers include 4x-UltraSharp and ESRGAN.

Automate from a script

Enable server mode:

python main.py --listen

Then queue workflows via the API. See the "Generate Images from Code" tutorial for a full example.

Working out which model to run this on? See The Codex. Packaging it as a reusable skill? See The Armory.