Nodes/ComfyUI-Multi-Prompt-Generator/Multi Prompt Generator
ComfyUI Node

Multi Prompt Generator

Prompt-list batch generation in ComfyUI

By mrm987·Created 8 months ago·Updated 8 months ago· 0
Multi Prompt Generator
  • model
  • clip
  • vae
  • latent
  • upscale_model
  • images
base_prompt1girl, solo,
negative_promptlowres, bad quality,
prompt_list# Blank line = new prompt # 빈 줄 = 새 프롬프트 # Use skip_indices to skip (e.g. 3,4,7) smile, happy, bright eyes angry, furrowed brow sad, crying, tears
seed0
random_seed_per_imagefalse
steps30
cfg5.0
sampler_name
scheduler
enable_upscaletrue
save_prefixMultiPrompt
skip_indices
downscale_ratio0.70
upscale_steps15
upscale_cfg5.0
upscale_denoise0.50
size_alignmentnone
lut_name
lut_strength0.30
enable_previewtrue

You've got twenty expression/pose/outfit variations you want on the same base character, and the idea of chaining twenty KSampler workflows - or babysitting the queue and re-running ComfyUI each time - makes you want to close the tab. That's the gap this node fills. It's a single output node that takes a plain-text list of prompts, runs each one through the normal local pipeline (model, CLIP, VAE, sampler), and saves every result to its own folder with a readable filename. One queue, done.

It's a small pack with a specific job and no ceremony. The README's framing is batch generation plus a two-pass upscale plus optional LUT color grading, and all of that is real.

How it works

The prompt_list field is where the magic lives. Separate prompts with blank lines - each block becomes one image. Lines starting with # are comments, and if a block's first line starts with - the whole block is skipped, which is handy when you want a variation kept in the list but not rendered this run. Each block gets merged into a single prompt, base_prompt is prepended, and off it goes.

For every prompt the node runs what a good ComfyUI upscale workflow does anyway: a first KSampler pass at the resolution of your Empty Latent, then the upscale model (applied in tiles so it doesn't OOM), a resize, then a second KSampler pass at low denoise to add detail. That's the classic hires-fix shape the community has been running for years - upscale model plus img2img refinement - just automated across the whole list. The optional size_alignment snaps dimensions to multiples of 8 or 64 before that second pass; set it to 64 if you're seeing white or artifact edges after upscaling, which is the exact tiling problem it exists to prevent.

Beyond that, .cube LUT files are auto-detected from models/luts/ and applied at lut_strength, and preview shows the first-pass result before the upscale runs - so you can cancel early if a prompt is heading somewhere bad instead of waiting out the whole batch. Every PNG gets workflow metadata embedded, so you can drag it back into ComfyUI later and rebuild everything.

The inputs that matter

You wire it like a normal txt2img graph - model, clip, vae, latent, upscale_model - then ignore most of the extra fields. A beginner actually touches these:

  • prompt_list - blank-line-separated prompts; the whole point of the node.
  • base_prompt / negative_prompt - prepended to every line / applied to everything. Keep the shared tags ("1girl, solo,") in base_prompt so each list line only carries what actually changes.
  • random_seed_per_image - one seed for the whole batch, or a fresh random seed per image. For a variation sweep you usually want it on; for reproducible batches leave it off and hold the seed.
  • enable_upscale - the two-pass pipeline on/off. Small gotcha: upscale_model is a required input even when you disable upscaling, so you still have to wire one in.

Output is an IMAGE list, and each result is auto-saved to output/MultiPrompt/ (or your save_prefix) as [index]_[first_tag]_[counter].png - the filename is built from the first comma-separated tag of that prompt. Hunting down results later is genuinely pleasant.

Install

Through ComfyUI Manager (search "Multi Prompt Generator"), or the manual way:

cd ComfyUI/custom_nodes
git clone https://github.com/mrm987/ComfyUI_Multi_Prompt_Generator.git

Then restart ComfyUI. Dependencies are just requests and python-dotenv - nothing heavy, and no model files to download beyond the checkpoint and upscale model you'd use anyway.

Common issues

  • White or artifact edges after upscale → set size_alignment to 64.
  • Blocks you wanted skipped still render → the - skip must be the block's first line; or use skip_indices (1-based, comma-separated, e.g. 3,4,7).
  • "Everything saved to the wrong folder" → that's save_prefix; the counter auto-increments from whatever's already in the folder, so re-runs append instead of overwriting.

The biggest real trap is treating prompt_list as one long string with line breaks instead of a list of blocks - leave a blank line between entries or your variations quietly merge into a single prompt.

Categoryimage/generation

Inputs (25)

NameTypeDefaultDescription
modelMODEL
clipCLIP
vaeVAE
latentLATENT
upscale_modelUPSCALE_MODEL
base_promptSTRING1girl, solo,
negative_promptSTRINGlowres, bad quality,
prompt_listSTRING# Blank line = new prompt # 빈 줄 = 새 프롬프트 # Use skip_indices to skip (e.g. 3,4,7) smile, happy, bright eyes angry, furrowed brow sad, crying, tears
seedINT00–18446744073709550000
random_seed_per_imageBOOLEANfalseUse different random seed for each image
stepsINT301–200
cfgFLOAT5.00–30
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
enable_upscaleBOOLEANtrue
save_prefixSTRINGMultiPrompt
skip_indicesoptSTRING
downscale_ratiooptFLOAT0.700.1–1
upscale_stepsoptINT151–200
upscale_cfgoptFLOAT5.00–30
upscale_denoiseoptFLOAT0.500–1
size_alignmentoptCOMBOnone3 options: none, 8, 64
lut_nameoptCOMBO1 options: None
lut_strengthoptFLOAT0.300–1
enable_previewoptBOOLEANtrue

Outputs (1)

NameTypeDescription
imagesIMAGE