Flux Klein img2img ⚡
One node for the whole Klein edit — prompt, latent, reference, done
- model
- clip
- vae
- images
- model
- positive
- negative
- latent
Most Klein workflows have the same shape: load the model, type a prompt, pick references, sample. Flux Klein img2img is the node that holds the "type a prompt, pick references" part - one node that takes your text, builds the empty latent (or starts from a photo for img2img), attaches a reference image, and hands you model, positive, negative, latent and a denoise value ready for a stock KSampler. You type your prompt directly into this node. There is no separate CLIPTextEncode and no separate latent node in the default graph.
The inputs that matter
prompt/negative_prompt- typed here, encoded for you. Klein's encoder is a Qwen3, so write sentences, not tag soup.strength- img2img only, default 0.6, how much of the init image to discard. Ignored with no image.width/height- output size, multiples of 16, default 1024.batch_sizefor parallel copies.image- the init image for img2img. Leave unconnected and you get txt2img.reference_image- Klein's real editing mechanism. It's VAE-encoded and attached to both positive and negative conditioning asreference_latents, and the edit starts from a pure-noise latent - not a partial denoise of the photo. This is the "change the pose of the subject in image2 to the pose in image1" workflow, one image in a slot.control_mode-manualattaches the reference raw;auto_depthruns it through Depth Anything V2 first and attaches the depth map instead. That's the example workflow's structural-reference trick: structure from one image, identity/content from the prompt or another reference, so two competing photos don't fight.depth_ckpt_name- which Depth Anything V2 checkpointauto_depthuses (downloads on first use).
The outputs are the point of the node: model (unchanged passthrough), positive, negative, latent, and denoise (a float you can wire to a KSampler's denoise input). Feed the first four into KSampler, then VAE Decode.
How the mechanics differ from classic img2img
Worth internalizing, because it changes how you think about results: image and reference_image answer different questions. image is where denoising starts (partial-denoise img2img, strength 0.6 keeps most of it). reference_image never touches the starting latent - it's conditioning only, injected as reference latents. For a pure reference-driven edit - "same photo, different pose, driven entirely by reference images" - leave image unconnected (txt2img latent) and connect only reference_image. The latent shape is Klein's real Flux.2 shape, not the generic placeholder other packs use, so geometry comes out right without hacks.
Installing it
Part of the CCTech pack, which is the fork of city96/ComfyUI-GGUF that everyone runs GGUF quants through:
cd ComfyUI/custom_nodes
git clone https://github.com/ChrisColeTech/ComfyUI-GGUF-Loader
cd ComfyUI-GGUF-Loader
pip install --upgrade gguf
Restart; it's under 🤖 CCTech/Flux Klein. You still need the Klein checkpoint (GGUF or safetensors), its Qwen3 text encoder, and the Flux.2 VAE loaded by Flux Klein Model Loader - this node just orchestrates them.
Gotchas
Don't connect both image and reference_image expecting an edit from image; if the result looks like a weird img2img reroll, you've mixed the two mechanisms. And remember Klein's license split: the 9B is under the non-commercial FLUX license, the 4B is Apache-2.0 - pick your base accordingly if the output's going anywhere commercial. Otherwise this is the friendliest node in the Klein set: load, prompt, reference, sample.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| vae | VAE | — | |
| prompt | STRING | — | |
| negative_prompt | STRING | — | |
| batch_size | INT | 11–4096 | — |
| width | INT | 102416–16384 | Output canvas width, honored as typed (snapped to Flux.2's /16 latent grid). References are encoded at their own aspect and never change the canvas. |
| height | INT | 102416–16384 | — |
| imagesopt | IMAGE | One or more RAW reference photos (batch-aware - combine multiple with a stock Batch Images node upstream). Each is independently encoded and attached to positive+negative conditioning as reference_latents - Klein's real edit mechanism. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |