Nodes/ComfyUI-Krea2-MultiRef/Krea2 Reference Encoder (latent only)
ComfyUI Node

Krea2 Reference Encoder (latent only)

Krea2's latent-only encoder

By molbal·Created about a month ago·Updated about a month ago· 2
Krea2 Reference Encoder (latent only)
  • positive
  • base_latent
  • reference_latent_2
  • reference_latent_3
  • reference_latent_4
  • CONDITIONING
strength1.00

The pack's flagship node, Krea2ReferenceTextEncode, does two jobs at once: it runs your prompt through the Qwen3-VL text encoder and attaches reference latents. Sometimes you only want the second part. Maybe your text conditioning is already encoded and caching it is the difference between an 8-second run and a slow one. Maybe you're chaining references onto an existing positive. That's what Krea2ReferenceEncoder is for - the "latent only" variant, as the display name says.

What it does

Feed it a CONDITIONING (the positive from a normal text encode) and one or more already-VAE-encoded LATENTs, and it appends those latents to the conditioning's metadata under the reference_latents key - the same key the Krea2ModelPatcher looks for. No text is re-encoded, no images go through the VLM, nothing gets tokenized. It's a pure conditioning surgery node.

The slot convention is the same as the rest of the pack, and it matches what the adapter was trained on:

  • base_latent - the image being edited, VAE-encoded. Reference slot 1. Per the tooltip, this is your base.
  • reference_latent_2 / _3 / _4 - optional style or content references.
  • strength - a float from 0 to 2 (default 1.0) that scales every reference latent before it's stored.

The one output is a CONDITIONING that carries your original prompt plus the references, ready for a KSampler running a Krea2ModelPatcher-patched model.

When you'd actually reach for it

Honestly, most people start with the text-encode node and never touch this one. The cases where the latent-only version earns its keep:

  • You already have a cached conditioning. If you're iterating on a prompt but swapping references, re-encoding text through Qwen3-VL every time is pure waste. Encode once, swap latents here.
  • You're reusing a conditioning built outside this pack - anything that produces a CONDITIONING can feed positive.
  • You want strength control. The text-encode node has no per-run intensity knob; this one does, and it's a genuinely useful dial for "how much should the references steer the output."

The two inputs that actually matter are base_latent and strength. base_latent must match the output resolution - the author's docs call it a hard constraint from the training data, and mismatches produce degraded, drifting edits. strength above 1.0 amplifies the reference signal, and past ~1.2 the model tends to overfit to the references and start ignoring your prompt; dial it down before you start fighting the results. Chaining is supported - you can stack a second encoder's output onto the first and the references accumulate.

Installing it

Identical to the rest of the pack; there's nothing model-heavy in the repo itself.

cd ComfyUI/custom_nodes
git clone https://github.com/molbal/ComfyUI-Krea2-MultiRef

Restart ComfyUI, or ComfyUI Manager → Custom Nodes Manager → ComfyUI-Krea2-MultiRef → install. The model files (Krea2 checkpoint, Qwen3-VL text encoder, Qwen-Image VAE) are yours to fetch; the only code dependency beyond stock ComfyUI is einops, which ships with it.

Troubleshooting

  • No effect at all = the model isn't patched. Krea2ModelPatcher must sit between the model and the sampler, or reference_latents is silently discarded.
  • Reference resolution mismatch. Latents get snapped to multiples of 16, but the base image resolution is not resized - that's on you. Match it to the output.
  • A heads-up about the repo docs: the bundled docs mention a negative conditioning input and a matching negative output. The shipped node doesn't have them - positive in, one CONDITIONING out. Don't hunt for a negative socket; with Krea2's refusal quirks, negative prompts are best handled the normal way upstream.

Keep expectations realistic: this is the runtime for an adapter that was still mid-training when its author ran out of GPU budget. The plumbing works; the polish is a work in progress.

Categorykrea2/editing

Inputs (6)

NameTypeDefaultDescription
positiveCONDITIONING
base_latentLATENTVAE-encoded image to edit. Reference slot 1.
strengthFLOAT1.000–2
reference_latent_2optLATENT
reference_latent_3optLATENT
reference_latent_4optLATENT

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING