Flux Klein Refine (Local NO PAID)
Batch-refine a photo against a whole list of prompts in one run
- model
- clip
- vae
- image
- images
- count
- report
The name says it, twice: this is a local Flux Klein refiner with no paid API involved. It takes one image plus a multiline list of prompts, runs a refine/edit pass for every line, and hands you all the results stacked in one IMAGE output. If you've been copy-pasting the same edit workflow and only changing the prompt text, this is the node that deletes the copy-paste.
For context: Flux.2 Klein is Black Forest Labs' distilled small model line - the default local editor of 2026, the thing you reach for when you want to change a photo rather than dream a new one. The 9B distilled is the daily driver for most people (Apache-licensed 4B variant exists too, the 9B is non-commercial). This node wraps it into a batch loop with an edit_mode choice: img2img_refine for a straight denoise-refine, or kontext_reference_edit (the default) which uses Flux Kontext-style reference latents to guide the edit from the source image.
How it works
Feed it a loaded Klein model, CLIP, VAE, your source image, and a multi_prompt with one prompt per line. It splits on the separator (newline by default), then loops: encode each prompt, apply the reference-latent method, sample with seed + index so each line gets a distinct but deterministic run, decode, and stack the results. count tells you how many came out, and save_images writes PNGs to ComfyUI's output folder with a output_prefix plus a slug of the prompt, which is the dataset/iteration workflow this pack is built around.
Inputs and outputs
Required: model, clip, vae, image, multi_prompt, seed, steps, denoise, cfg, sampler_name. Note the defaults are conservative (28 steps, cfg 4, denoise 0.58) - that suits refining and edit work, not the 4-step CFG-1 turbo-style generation Klein's distilled weights are famous for. If you want speed, drop steps and use euler with a low cfg; the nodes don't force a specific profile.
Worth knowing: edit_mode, upscale_method (lanczos default - it resizes to output_width/output_height, 1280×720 default), use_reference_latent + reference_latents_method (the Kontext mechanics), and negative_prompt (has a sensible default). defer_cpu_transfer and the debug flags are for squeezing memory and tracing runs respectively - leave them off until you need them.
Outputs: images (one batch), count, and a report string.
Installing it
Part of the IAMCCS-nodes pack. ComfyUI Manager → search IAMCCS, or:
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
Restart ComfyUI; the node is under IAMCCS/Flux. No pip dependencies - but this node does nothing until you supply a Flux.2 Klein checkpoint plus its Qwen3 text encoder and VAE. Those are model files you download (Klein 4B is ~8 GB, 9B ~18 GB in fp8) and load with normal ComfyUI loaders before this node.
Where people get burned
- No model, no output. This node is a sampler loop, not a loader - if it errors immediately, you're feeding it an empty/wrong model slot.
- Mixing Klein 4B and 9B LoRAs: they are not interchangeable, and CivitAI took weeks to even add a Klein category because of the confusion. Pick a size and stay there.
- Using 28 steps / cfg 4 and wondering why it's slow. That's a fine quality profile for refining; for iteration speed the distilled model is happy at 4 steps, CFG 1, euler.
- Forgetting the "NO PAID" framing means you still need to respect the license: Klein 4B is Apache 2.0, Klein 9B is under the FLUX non-commercial license.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| vae | VAE | — | |
| image | IMAGE | — | |
| multi_prompt | STRING | — | |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 281–100 | — |
| denoise | FLOAT | 0.580–1 | — |
| cfg | FLOAT | 4.000–100 | — |
| sampler_name | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| edit_modeopt | COMBO | kontext_reference_edit | 2 options: img2img_refine, kontext_reference_edit |
| separatoropt | STRING | \n | — |
| reference_latents_methodopt | COMBO | workflow_default | 5 options: workflow_default, index_timestep_zero, offset, index, uxo/uno |
| use_reference_latentopt | BOOLEAN | true | — |
| upscale_methodopt | COMBO | lanczos | 5 options: nearest-exact, bilinear, area, bicubic, lanczos |
| negative_promptopt | STRING | low resolution, pixelated, blurry, jpeg artifacts, distorted face, extra characters, front-facing portrait, camera stare | — |
| output_prefixopt | STRING | flux_klein_refine | — |
| save_imagesopt | BOOLEAN | false | — |
| output_widthopt | INT | 128016–8192 | — |
| output_heightopt | INT | 72016–8192 | — |
| debug_enabledopt | BOOLEAN | false | — |
| debug_prefixopt | STRING | flux_klein_refine_debug | — |
| defer_cpu_transferopt | BOOLEAN | false | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| count | INT | — |
| report | STRING | — |