Nodes/ComfyUI-GGUF-Loader/Flux Klein ControlNet img2img ⚡
ComfyUI Node

Flux Klein ControlNet img2img ⚡

Klein doesn't do ControlNet — this is the structural-reference workaround

By ChrisColeTech·Created 18 days ago·Updated about 23 hours ago· 7
Flux Klein ControlNet img2img ⚡
  • model
  • clip
  • vae
  • images
  • control_source_image
  • model
  • positive
  • negative
  • latent
prompt
negative_prompt
batch_size1
width1024
height1024
control_modemanual
depth_ckpt_namedepth_anything_v2_vitb.pth

Let's get the honest version out first: FLUX.2 Klein has no real ControlNet, and no Control-LoRA either. If you want to condition a Klein edit on structure - depth, pose, edges - there's no checkpoint out there that does it the way SDXL ControlNet did. So what this node gives you is the next best thing that actually works: a reference-photo slot, plus a control-image slot that runs your photo through a preprocessor and feeds the map through Klein's real edit mechanism (reference_latents) instead. It's a workaround, but it's the one the official example workflows use.

Why it matters: Klein is the default local photo editor of 2026 - the distilled small model from Black Forest Labs that unified text-to-image, single-reference and multi-reference editing in one checkpoint, and the reason people stopped maintaining separate gen and edit models. Its edit mechanism is distinctive: it never partially denoises your photo. Every edit starts from pure noise and is driven entirely by reference images VAE-encoded and attached to the conditioning as reference_latents, plus a text instruction. This node packages exactly that.

What it does

Everything Flux Klein img2img does - prompt encoding, building the empty Flux.2 latent (the 128-channel one at /16 downscale), wiring images into reference_latents on both positive and negative - plus the control slot. images takes one or more raw reference photos (batch-aware; stack several with a stock Batch Images node for multi-reference). control_source_image is the structural one: a photo to turn into a map before attaching, chosen by control_mode:

  • manual (default) - attach the source raw; use it if you already computed a map elsewhere.
  • auto_depth - run it through Depth Anything V2 first. This reproduces the shipped example workflow's own trick (AIO_Preprocessor → MiDaS depth → reference_latents), and it's the one mode confirmed meaningful to Klein's training. The tooltip says it plainly: this is the mode to trust.
  • auto_canny - plain cv2 edge detection. Mechanically valid, unverified for Klein specifically.
  • none - skip the control slot entirely, even if connected.

depth_ckpt_name picks the Depth Anything V2 model size (downloads on first use). And a genuinely useful Klein quirk: width/height are honored as typed (snapped to the /16 grid) - references and control maps are encoded at their own aspect ratio and never change the canvas. Outputs are model, positive, negative, latent, straight into a stock KSampler. There's no denoise output because there's no partial denoise - it would always be 1.0.

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/ChrisColeTech/ComfyUI-GGUF-Loader
pip install --upgrade gguf

Restart, drop your Klein checkpoint (the pack's Flux Klein Model Loader handles GGUF or safetensors; the 4B is Apache-2.0, the 9B carries the FLUX non-commercial license), the Qwen3 text encoder and the Flux.2 VAE into the usual folders. Node lives under 🤖 CCTech/Flux Klein.

Gotchas

Two things. First, don't mix LoRAs across Klein sizes - 4B and 9B LoRAs aren't interchangeable, and the wrong one just silently degrades. Second, this node's split from the plain img2img node exists because of a real bug: an earlier revision let control_mode="none" skip the entire reference attachment, so edits silently fell back to prompt-only generation. That's fixed by construction here - control_mode only ever touches control_source_image, never images. If your "edit" looks like a txt2img, check that your reference is actually in images.

Category🤖 CCTech/Flux Klein

Inputs (12)

NameTypeDefaultDescription
modelMODEL
clipCLIP
vaeVAE
promptSTRING
negative_promptSTRING
batch_sizeINT11–4096
widthINT102416–16384Output canvas width, honored as typed (snapped to Flux.2's /16 latent grid). References and control maps are encoded at their own aspect and never change the canvas.
heightINT102416–16384
imagesoptIMAGEOne 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.
control_source_imageoptIMAGEA photo to turn into a controlnet-style map (via control_mode) before attaching it the same way as `images`, appended after them.
control_modeoptCOMBOmanualmanual: attach control_source_image raw. auto_depth: run it through Depth Anything V2 first - reproduces the real example workflow's structural-reference trick (AIO_Preprocessor -> MiDaS depth -> reference_latents), the one mode confirmed meaningful to Klein's own training. auto_canny: plain cv2 edge detection first - mechanically valid, unverified for Klein specifically. none: skip control_source_image attachment entirely even if it's connected. For normal/soft-edge/lineart/pose maps, install ComfyUI-ControlNet-Nodes and wire its output in with control_mode=manual instead.
depth_ckpt_nameoptCOMBOdepth_anything_v2_vitb.pthauto_depth mode only. Model size for the automatic depth estimation. Downloads on first use if not already in models/depth_anything_v2.

Outputs (4)

NameTypeDescription
modelMODEL
positiveCONDITIONING
negativeCONDITIONING
latentLATENT