Nodes/ComfyUI-Apt_Preset/sum_stack_flux2_Klein
ComfyUI Node

sum_stack_flux2_Klein

Sum_stack_flux2_Klein

By cardenluo·Created 2 years ago·Updated 22 days ago· 309
sum_stack_flux2_Klein
  • context
  • model
  • lora_stack
  • ref_latent_img1
  • ref_latent_img2
  • ref_latent_img3
  • ref_latent_img4
  • ref_latent_img5
  • union_stack
  • latent_image
  • latent_mask
  • context
  • positive
  • negative-zero
  • prompt_info
prompt
img1_strength1.00
img2_strength1.00
img3_strength1.00
img4_strength1.00
img5_strength1.00
main_prompt_ratio0.50

Flux 2 Klein is BFL's January 2026 size-distilled answer to everyone who looked at the 32B Dev model, did the VRAM math, and walked away. Klein's whole pitch was fixing Flux 2's hardware problem: the 4B tier runs comfortably on a 12GB card at fp8, and it even got the Apache 2.0 license - the first commercially usable Flux 2 checkpoint. It's also an editing/consistency model at heart: give it reference images in-context and it holds their subjects across generations. sum_stack_flux2_Klein is the Apt_Preset controller that wires exactly that - up to five reference images, each with its own strength, plus the pack's [语义@权重] prompt-weighting and optional union ControlNet.

If your mental model is Kontext's single-image in-context editing, this is that idea with the reference count and the strength knobs multiplied.

What it actually does

It consumes the context, applies any LoRA stack, then runs your prompt through the pre_Unit_PromptWeight processor with main_prompt_ratio - the same weighting engine as sum_TextEncode's flux2.klein mode, so [女孩打伞,瀑布@0.2] style weighting works here. Then it folds in up to five reference images. The numbering matters: image weight numbers correspond to reference image numbers - ref_latent_img1 pairs with img1_strength, and so on, straight from the author's own node description. The negative side comes out as negative-zero because it's zeroed out conditioning (the modern guidance-distilled reality: negative prompts mostly don't exist on this family), and latent_image/latent_mask set the output geometry - with the author's note that if you leave latent_image unplugged, it grabs the latent size from the context.

The inputs that matter

  • ref_latent_img1…5 - the reference images. This is the whole point of the node.
  • img1_strength…img5_strength - 0–10, default 1.0. Per-image influence. Lower to relax a reference's grip, higher to lock it in.
  • prompt - the instruction. Blank pulls from the context's stored prompt.
  • main_prompt_ratio - 0–1, default 0.5. Higher = semantics lean toward the overall prompt; lower = the weighted features dominate.
  • union_stack - optional union ControlNet token (the pack's unified CN stack, which the KB notes now spans Flux-family models).
  • latent_image / latent_mask - output size and optional mask for localized edits.
  • lora_stack - stacked LoRAs on the Klein base.

The outputs that matter

context, positive, negative-zero (wire to the sampler's negative), and prompt_info - a string that tells you what the weight processor actually did, which is gold when your weighting isn't landing.

Wiring it in

sum_load_simple in Flux/Kontext mode (Unet + clip1 + clip2) → sum_stack_flux2_Kleinsum_Ksampler. The README's update log explicitly notes sum_load/sum_edit were made compatible with Klein's latent sizing, so this pairing is the intended path.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git
cd ComfyUI-Apt_Preset
pip install -r requirements.txt   # Windows: double-click install.bat

Or ComfyUI Manager → ComfyUI-Apt_Preset. ComfyUI-GGUF helps if you're running Klein quantized.

Common issues

The biggest confusion is the 1:1 numbering between refs and strengths - people set img2_strength and wonder why image one changed. Second: the weighting syntax is the pack's [语义@权重], not the dead CLIP (word:1.3) syntax, and on an LLM-encoded model like Klein the old syntax is literal punctuation, so porting old prompts quietly degrades. And main_prompt_ratio at 0.5 is a compromise, not a default you should trust: too-high and your weighted accents vanish, too-low and your main subject gets bullied by the references. Watch prompt_info and adjust.

CategoryApt_Preset/chx_tool

Inputs (18)

NameTypeDefaultDescription
contextRUN_CONTEXT
modeloptMODEL
lora_stackoptLORASTACK
ref_latent_img1optIMAGE
ref_latent_img2optIMAGE
ref_latent_img3optIMAGE
ref_latent_img4optIMAGE
ref_latent_img5optIMAGE
union_stackoptUNION_STACK
latent_imageoptIMAGE
latent_maskoptMASK
promptoptSTRING
img1_strengthoptFLOAT1.000–10
img2_strengthoptFLOAT1.000–10
img3_strengthoptFLOAT1.000–10
img4_strengthoptFLOAT1.000–10
img5_strengthoptFLOAT1.000–10
main_prompt_ratiooptFLOAT0.500–1

Outputs (4)

NameTypeDescription
contextRUN_CONTEXT
positiveCONDITIONING
negative-zeroCONDITIONING
prompt_infoSTRING