Nodes/IAMCCS-nodes/Flux Klein Refine (Local NO PAID)
ComfyUI Node

Flux Klein Refine (Local NO PAID)

Batch-refine a photo against a whole list of prompts in one run

By IAMCCS·Created 11 months ago·Updated 8 days ago· 113
Flux Klein Refine (Local NO PAID)
  • model
  • clip
  • vae
  • image
  • images
  • count
  • report
multi_prompt
seed0
steps28
denoise0.58
cfg4.00
sampler_name
edit_modekontext_reference_edit
separator\n
reference_latents_methodworkflow_default
use_reference_latenttrue
upscale_methodlanczos
negative_promptlow resolution, pixelated, blurry, jpeg artifacts, distorted face, extra characters, front-facing portrait, camera stare
output_prefixflux_klein_refine
save_imagesfalse
output_width1280
output_height720
debug_enabledfalse
debug_prefixflux_klein_refine_debug
defer_cpu_transferfalse

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.
CategoryIAMCCS/Flux

Inputs (23)

NameTypeDefaultDescription
modelMODEL
clipCLIP
vaeVAE
imageIMAGE
multi_promptSTRING
seedINT00–18446744073709550000
stepsINT281–100
denoiseFLOAT0.580–1
cfgFLOAT4.000–100
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
edit_modeoptCOMBOkontext_reference_edit2 options: img2img_refine, kontext_reference_edit
separatoroptSTRING\n
reference_latents_methodoptCOMBOworkflow_default5 options: workflow_default, index_timestep_zero, offset, index, uxo/uno
use_reference_latentoptBOOLEANtrue
upscale_methodoptCOMBOlanczos5 options: nearest-exact, bilinear, area, bicubic, lanczos
negative_promptoptSTRINGlow resolution, pixelated, blurry, jpeg artifacts, distorted face, extra characters, front-facing portrait, camera stare
output_prefixoptSTRINGflux_klein_refine
save_imagesoptBOOLEANfalse
output_widthoptINT128016–8192
output_heightoptINT72016–8192
debug_enabledoptBOOLEANfalse
debug_prefixoptSTRINGflux_klein_refine_debug
defer_cpu_transferoptBOOLEANfalse

Outputs (3)

NameTypeDescription
imagesIMAGE
countINT
reportSTRING