Flux Klein Multi-Gen
One image, a dozen prompts, zero duplicated sampling chains
- model
- clip
- vae
- image
- images
- count
There's a workflow pattern that everyone ends up rebuilding by hand: take one reference image, run it through Flux with ten different prompts, and get ten variations. The standard way is to copy-paste the entire sampling chain ten times, which is how graphs turn into spaghetti. Flux Klein Multi-Gen compresses that into a single node - it takes a multi_prompt with one prompt per line and runs them all through one loop, sharing the expensive parts (VAE encode, reference latents) across every variant.
The timing makes sense too. Flux 2 Klein is the size-distilled Apache-2.0 Flux that finally runs on consumer cards - around 13GB of VRAM quantized - so a batch-of-variations node for it is the right tool at the right moment. It's the sibling of IAMCCS_QwenMultiGen in the pack's dataset-creation workflow, built for turning one "edit this image" slot into a structured multi-view batch.
How it works
The node mirrors a reference Flux edit pipeline internally, but shares the setup across prompts:
- Your
imageis scaled totarget_megapixelsand VAE-encoded once - that shared latent is the reference for every variant. - The negative prompt is encoded once and combined with the reference latent.
- For each line in
multi_prompt, it encodes the positive prompt, applies the reference latent method, and runs a sampling step with yourseed(offset per variant),steps,cfg, andsampler_name. - Results batch together into a single
imagesoutput, withcounttelling you how many you got.
The optional reference_latents_method lets you override how the reference is attached - workflow_default keeps the reference behavior, and the others (index_timestep_zero, offset, index, uxo/uno) switch the injection strategy for different editing styles. You can also drive output_width/output_height, enable save_images with an output_prefix, and turn on debug_enabled to get a JSONL trace of every run.
Inputs that matter
model,clip,vae,image- the usual Flux edit wiring.multi_prompt- the whole point. One prompt per line (changeseparatorif your prompts contain newlines).seed- set it once; variants get derived seeds so they're reproducible but distinct.steps(default 8) andcfg(default 1.0) - Klein is a flow model, low step count is normal here.
Install
Part of IAMCCS-nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
Or ComfyUI Manager → "IAMCCS" → install → restart. You still need a Flux 2 Klein model (and a text encoder) in your models folder - this node doesn't download one.
Gotchas
Klein is a vision-language-encoder model, so the quality of your reference latents does most of the work; if every variant drifts, fix the reference method before blaming your prompts. And mind the VRAM: shared encoding helps, but N prompts still means N sampling passes, so resolution_steps and target_megapixels are your levers on runtime. Also worth knowing: the pack is a solo dev's fast-moving project, so if a shared workflow references this node, keep the pack updated.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| vae | VAE | — | |
| image | IMAGE | — | |
| multi_prompt | STRING | — | |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 81–100 | — |
| cfg | FLOAT | 1.000–100 | — |
| sampler_name | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| separatoropt | STRING | \n | — |
| reference_latents_methodopt | COMBO | workflow_default | 5 options: workflow_default, index_timestep_zero, offset, index, uxo/uno |
| target_megapixelsopt | FLOAT | 1.00.1–16 | — |
| upscale_methodopt | COMBO | nearest-exact | 5 options: nearest-exact, bilinear, area, bicubic, lanczos |
| negative_promptopt | STRING | — | |
| output_prefixopt | STRING | flux_klein_multi | — |
| save_imagesopt | BOOLEAN | false | — |
| resolution_stepsopt | INT | 11–256 | — |
| output_widthopt | INT | 72016–8192 | — |
| output_heightopt | INT | 102416–8192 | — |
| debug_enabledopt | BOOLEAN | false | — |
| debug_prefixopt | STRING | flux_klein_debug | — |
| defer_cpu_transferopt | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| count | INT | — |