Nodes/ComfyUI-NO8D-controls/NO8D-Remove Krea2 Reference Latents
ComfyUI Node

NO8D-Remove Krea2 Reference Latents

Strip the edit reference from conditioning

By no8d·Created 2 months ago·Updated 14 days ago· 271
NO8D-Remove Krea2 Reference Latents
  • conditioning
  • conditioning

Ostris's Krea2 Edit trick rides the conditioning: the reference image - the "edit this person/thing" input - isn't passed as a second image into the sampler. It's encoded and packed into the conditioning as reference_latents metadata, which the edit-model patch reads during sampling. That's elegant, and it creates a cleanup problem: once a reference is baked into your conditioning, every branch of the graph that shares that conditioning is carrying a reference it may not want.

NO8D-Remove Krea2 Reference Latents is the surgical removal tool. It takes conditioning that has the Ostris Krea2 reference_latents key and returns a copy of that conditioning with the reference latents gone - while keeping everything else intact: the encoded prompt, the visual-language conditioning, and all other metadata. The source is bluntly honest about the mechanism: it copies each conditioning entry's metadata and pops reference_latents off it.

What you set

  • conditioning - the one input. Any conditioning that may carry Krea2 reference latents.

Output is conditioning, the same conditioning minus the reference latents.

Why this exists

Two practical jobs. First, comparison: the whole point of Krea2-Edit-style reference workflows is asking "what does this prompt do with the reference, versus without?" The remove node gives you the clean branch - same prompt, same VLM conditioning, no reference - so you can A/B whether the edit patch is actually improving the result. Second, branch hygiene: if you're combining a reference-conditioned branch with a plain-generation branch (via a merge or switch), you don't want the reference bleeding into the plain path. Strip it at the source.

It pairs with NO8D-Match Krea2 Reference Latents, the sibling node that keeps the reference but resizes it. Remove when you want the reference gone; match when you want it kept but geometrically aligned to a new target size.

The honest scope

This node touches only the conditioning metadata. It can't undo the edit patch inside the model, and it can't restore a reference you already dropped - the reference latents are just gone, which is the point. And because it only acts when the reference_latents key exists, feeding it conditioning from a model that never had such a key is a harmless no-op. The underlying technique is still experimental territory - the community notes that Krea2-as-edit-model can alter the input image and misbehave on wide aspect ratios - so treat the whole reference workflow as a thing to validate visually, with this node as your off-switch for the reference.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/no8d/ComfyUI-NO8D-controls.git
python -m pip install -r requirements.txt

ComfyUI Manager → "NO8D-controls". No models. This is a pure conditioning-utility node - it needs a conditioning input that already carries reference latents, which means an Ostris Krea2 Edit workflow upstream of it.

CategoryNO8D-control

Inputs (1)

NameTypeDefaultDescription
conditioningCONDITIONING

Outputs (1)

NameTypeDescription
conditioningCONDITIONING