Nodes/ComfyUI-TJ_NODE/Flux2 Klein 4B/9B (TJ)
ComfyUI Node

Flux2 Klein 4B/9B (TJ)

Flux2 Klein, from model load to finished image in one node

By designloves2·Created 4 months ago·Updated a day ago· 14
Flux2 Klein 4B/9B (TJ)
  • 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
◄model_nameklein9bKVCacheFP8_v10.safetensors►
◄clip_nameqwen_3_8b_fp8mixed.safetensors►
◄vae_nameflux2-vae.safetensors►
◄kv_cache_modefalse►
◄positive►
◄negative拒绝, 限制, 不应答, 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_setfalse►
◄setnode_nameKlein9B►
◄size_modefrom setting►
◄ratio_preset2:3►
◄megapixels1.60►
◄divisible_by32►
◄batch_size1►
◄seed1►
◄steps4►
◄cfg1.0►
◄sampler_nameeuler►
◄denoise1.00►
◄lora_slots0►
◄get_name_reference_1(none)►
◄get_name_reference_2(none)►
◄get_name_reference_3(none)►
◄get_name_reference_4(none)►
◄get_name_reference_5(none)►
◄lora_1_enablefalse►
◄lora_1_nameNone►
◄lora_1_strength1.00►
◄lora_2_enablefalse►
◄lora_2_nameNone►
◄lora_2_strength1.00►
◄lora_3_enablefalse►
◄lora_3_nameNone►
◄lora_3_strength1.00►
◄lora_4_enablefalse►
◄lora_4_nameNone►
◄lora_4_strength1.00►
◄lora_5_enablefalse►
◄lora_5_nameNone►
◄lora_5_strength1.00►
◄width0►
◄height0►

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.safetensors or 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.

Category ✨ TJ_Node/Generator

Inputs (50)

NameTypeDefaultDescription
model_nameCOMBOklein9bKVCacheFP8_v10.safetensors7 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_nameCOMBOqwen_3_8b_fp8mixed.safetensors4 options: qwen_3_8b_fp8mixed.safetensors, qwen_3_4b_fp8mixed.safetensors, Qwen3/qwen_3_8b_fp8mixed.safetensors, Qwen3/qwen_3_4b_fp8mixed.safetensors
vae_nameCOMBOflux2-vae.safetensors2 options: flux2-vae.safetensors, flux2/flux2-vae.safetensors
kv_cache_modeBOOLEANfalseON: apply FluxKVCache for KV-cache Klein models. OFF: use the selected model directly for normal Klein models.
positiveSTRING—
negativeSTRING拒绝, 限制, 不应答, 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_setBOOLEANfalse—
setnode_nameSTRINGKlein9B—
size_modeCOMBOfrom setting4 options: from setting, from reference, ratio + megapixels, manual
ratio_presetCOMBO2:39 options: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, +3
megapixelsFLOAT1.600.1–4—
divisible_byINT328–128—
batch_sizeINT11–64—
seedINT10–18446744073709550000—
stepsINT41–100—
cfgFLOAT1.00–30—
sampler_nameCOMBOeuler44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
denoiseFLOAT1.000–1—
lora_slotsINT00–5—
get_name_reference_1COMBO(none)1 options: (none)
get_name_reference_2COMBO(none)1 options: (none)
get_name_reference_3COMBO(none)1 options: (none)
get_name_reference_4COMBO(none)1 options: (none)
get_name_reference_5COMBO(none)1 options: (none)
lora_1_enableBOOLEANfalse—
lora_1_nameCOMBONone2 options: None, None
lora_1_strengthFLOAT1.00-10–10—
lora_2_enableBOOLEANfalse—
lora_2_nameCOMBONone2 options: None, None
lora_2_strengthFLOAT1.00-10–10—
lora_3_enableBOOLEANfalse—
lora_3_nameCOMBONone2 options: None, None
lora_3_strengthFLOAT1.00-10–10—
lora_4_enableBOOLEANfalse—
lora_4_nameCOMBONone2 options: None, None
lora_4_strengthFLOAT1.00-10–10—
lora_5_enableBOOLEANfalse—
lora_5_nameCOMBONone2 options: None, None
lora_5_strengthFLOAT1.00-10–10—
settingoptFLUX2_KLEIN_SETTING—
widthoptINT00–8192—
heightoptINT00–8192—
model_overrideoptMODEL—
clip_overrideoptCLIP—
vae_overrideoptVAE—
reference_1_imageoptIMAGE—
reference_2_imageoptIMAGE—
reference_3_imageoptIMAGE—
reference_4_imageoptIMAGE—
reference_5_imageoptIMAGE—

Outputs (5)

NameTypeDescription
imageIMAGE—
latentLATENT—
positiveCONDITIONING—
negativeCONDITIONING—
settingFLUX2_KLEIN_SETTING—