Flux2 Klein 4B/9B (TJ)
Flux2 Klein, from model load to finished image in one node
- setting
- model_override
- clip_override
- vae_override
- reference_1_image
- reference_2_image
- reference_3_image
- reference_4_image
- reference_5_image
- image
- latent
- positive
- negative
- setting
Flux2 Klein 4B/9B (TJ) is the all-in-one generation node for the Klein line - the size-distilled Flux 2 variants that put a capable Flux 2 in ~13GB of VRAM and brought the consumer fight back to Black Forest Labs. Where a normal workflow chains UNET loader, CLIP loader, VAE loader, text encode, empty latent, and KSampler into six or seven nodes, this node does the whole pipeline in one: pick your model, type a prompt, hit generate, get an image. It also carries five reference-image slots and five LoRA slots, which is where it stops being "convenient" and starts being the centerpiece of a serious Klein workflow.
How it works
The node loads the model, CLIP, and VAE you name, encodes your positive/negative text, sizes the latent, samples, and VAE-decodes to an IMAGE. Model mapping is filename-keyword-based and forgiving: it scans your folders and prefers files containing klein/flux2/qwen etc., falling back to a curated list (klein9bKVCacheFP8_v10.safetensors is the default). The setting in/out is a small shared config object, so you can store resolution/style settings in one place and pipe them in.
The size logic deserves attention. size_mode has four options: from setting (use the incoming setting object), from reference (match a reference image), ratio + megapixels (pick a ratio preset like 2:3 and a megapixel target - default 1.6MP - and it computes dimensions rounded to divisible_by, default 32), and manual (raw width/height). For most people, ratio + megapixels is the one: it's how Klein's training buckets actually work.
kv_cache_mode matters if you're running a KV-cache Klein model (the *KVCacheFP8* files): flip it on and it applies the Flux KV-cache patch that slashes VRAM during sampling. Off means the model is used directly. Get this wrong and you'll either waste VRAM or see odd behavior - match it to the file you loaded.
The five reference_*_image inputs (each also reachable via get_name_reference_N wireless slots) feed the model's reference-image conditioning, and the five lora_*_enable / lora_*_name / lora_*_strength trios stack LoRAs. Defaults lean distilled: steps 4, cfg 1, euler - the right starting point for Klein, which is a few-step model, not an SDXL.
Inputs and outputs that matter
Set: model_name, clip_name, vae_name, positive, size_mode + ratio_preset/megapixels, steps, seed. The rest you can leave alone. Outputs: image, latent, positive/negative (CONDITIONING - so you can branch into a second sampler), and setting.
Install
ComfyUI Manager → Install Custom Nodes → search TJ_NODE, or:
cd ComfyUI/custom_nodes
git clone https://github.com/designloves2/ComfyUI-TJ_NODE
Restart ComfyUI. Models are on you, in these locations:
models/diffusion_models/- a Klein file (e.g.klein9bKVCacheFP8_v10.safetensorsor a 4B fp8 build)models/text_encoders/-qwen_3_8b_fp8mixed.safetensors(or the 4B)models/vae/-flux2-vae.safetensors
The honest verdict
This is the "one big node" pattern taken to its logical end, and for Klein specifically it works because the official reference workflow is short anyway. You gain a single block that just produces images, and the reference-image support makes Klein's editing/reference strengths directly usable. You lose the ability to inject custom nodes between stages - no custom guider, no schedule hacking - and setting chaining adds a small concept you have to learn. For iterating on prompts and references, it's the fastest path from idea to image on Klein. For maximal control, build the stack by hand and keep this node for the quick passes.
Inputs (50)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | klein9bKVCacheFP8_v10.safetensors | 7 options: klein9bKVCacheFP8_v10.safetensors, flux2Klein9bFp8_fp8.safetensors, flux2Klein4bFp8_fp8.safetensors, flux2Klein4bBaseFp8_fp8.safetensors, flux2Klein9bBaseFp8_fp8.safetensors, Klein9B/flux-2-klein-9b-kv-fp8.safetensors, +1 |
| clip_name | COMBO | qwen_3_8b_fp8mixed.safetensors | 4 options: qwen_3_8b_fp8mixed.safetensors, qwen_3_4b_fp8mixed.safetensors, Qwen3/qwen_3_8b_fp8mixed.safetensors, Qwen3/qwen_3_4b_fp8mixed.safetensors |
| vae_name | COMBO | flux2-vae.safetensors | 2 options: flux2-vae.safetensors, flux2/flux2-vae.safetensors |
| kv_cache_mode | BOOLEAN | false | ON: apply FluxKVCache for KV-cache Klein models. OFF: use the selected model directly for normal Klein models. |
| positive | STRING | — | |
| negative | STRING | 拒绝, 限制, 不应答, lowres, error, cropped, worst quality, low quality, jpeg artifacts, heterochromia, out of frame, disfigured, blurry, fat, (ugly:1.3), deformed, mutilated, fingers cut, face cut, head cut, bad anatomy, bad proportions, two heads, two faces, deformed hands, (twisted fingers:1.22), extra fingers, poorly drawn, grainy, poorly drawn face, mutation, poor facial details, cropped head, poorly drawn eyes, unclear eyes, cross-eyes, malformed limbs, poorly drawn hands, fused hands, mutated hands, malformed hands, (mutated fingers:1.4), (fused fingers:1.313), interlocked fingers, extra or missing fingers, (one hand with more than 5 fingers), (one hand with less than 5 fingers), one hand with more than 5 digits, one hand with less than 5 digits, extra digits, fewer digits, bad hair, poorly drawn hair, fused hair, poorly drawn feet, malformed feet, extra or missing feet, fused feet, missing or extra limbs, disfigured, mutilated hands, extra hands, extra arms, extra legs, missing arms, missing hands, missing legs, fingers of different thickness, pointed fingers, thick fingers, (long thumbs:1.35), sharp fingernails, (greyscale:1.3), grain, (monochrome:1.3), Text, Watermark | — |
| auto_set | BOOLEAN | false | — |
| setnode_name | STRING | Klein9B | — |
| size_mode | COMBO | from setting | 4 options: from setting, from reference, ratio + megapixels, manual |
| ratio_preset | COMBO | 2:3 | 9 options: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, +3 |
| megapixels | FLOAT | 1.600.1–4 | — |
| divisible_by | INT | 328–128 | — |
| batch_size | INT | 11–64 | — |
| seed | INT | 10–18446744073709550000 | — |
| steps | INT | 41–100 | — |
| cfg | FLOAT | 1.00–30 | — |
| sampler_name | COMBO | euler | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 |
| denoise | FLOAT | 1.000–1 | — |
| lora_slots | INT | 00–5 | — |
| get_name_reference_1 | COMBO | (none) | 1 options: (none) |
| get_name_reference_2 | COMBO | (none) | 1 options: (none) |
| get_name_reference_3 | COMBO | (none) | 1 options: (none) |
| get_name_reference_4 | COMBO | (none) | 1 options: (none) |
| get_name_reference_5 | COMBO | (none) | 1 options: (none) |
| lora_1_enable | BOOLEAN | false | — |
| lora_1_name | COMBO | None | 2 options: None, None |
| lora_1_strength | FLOAT | 1.00-10–10 | — |
| lora_2_enable | BOOLEAN | false | — |
| lora_2_name | COMBO | None | 2 options: None, None |
| lora_2_strength | FLOAT | 1.00-10–10 | — |
| lora_3_enable | BOOLEAN | false | — |
| lora_3_name | COMBO | None | 2 options: None, None |
| lora_3_strength | FLOAT | 1.00-10–10 | — |
| lora_4_enable | BOOLEAN | false | — |
| lora_4_name | COMBO | None | 2 options: None, None |
| lora_4_strength | FLOAT | 1.00-10–10 | — |
| lora_5_enable | BOOLEAN | false | — |
| lora_5_name | COMBO | None | 2 options: None, None |
| lora_5_strength | FLOAT | 1.00-10–10 | — |
| settingopt | FLUX2_KLEIN_SETTING | — | |
| widthopt | INT | 00–8192 | — |
| heightopt | INT | 00–8192 | — |
| model_overrideopt | MODEL | — | |
| clip_overrideopt | CLIP | — | |
| vae_overrideopt | VAE | — | |
| reference_1_imageopt | IMAGE | — | |
| reference_2_imageopt | IMAGE | — | |
| reference_3_imageopt | IMAGE | — | |
| reference_4_imageopt | IMAGE | — | |
| reference_5_imageopt | IMAGE | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| latent | LATENT | — |
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| setting | FLUX2_KLEIN_SETTING | — |