Nodes/Krea 2 Identity Edit/Krea2 Edit (grounded encode)
ComfyUI Node

Krea2 Edit (grounded encode)

The node that makes 'the man on the left' finally work in Krea 2

By lbouaraba·Created 2 months ago·Updated about a month ago· 592
Krea2 Edit (grounded encode)
  • clip
  • image
  • image_b
  • CONDITIONING
prompt
grounding_px768
system_prompt

Despite the name, this isn't Krea's official edit model - that still hasn't shipped. Krea 2 Identity Edit is a community LoRA by conradlocke (repo: lbouaraba) that turns plain Krea 2 Raw or Turbo into an instruction-based image editor, and it ships with two nodes that its training requires. Krea2EditGroundedEncode is the one people skip, and skipping it is exactly how you get edits that ignore half your sentence.

Here's the thing: the LoRA was trained with dual conditioning. Your source image goes into the model twice - once as VAE latent tokens (that's the other node, Krea2EditModelPatch, carrying appearance), and once straight into the Qwen3-VL text encoder so it actually reads the image while it reads your instruction. That second job is this node. With a stock CLIPTextEncode the model never sees the image semantically, and scene-referential instructions like "the man on the left" or "change the sign in the back" fall apart. Quality drops sharply. The README is blunt: both nodes are required.

How it works

Training always encoded the instruction together with the source image through Qwen3-VL - the user turn was vision tokens for the image plus your text. This node rebuilds that exact chat template and runs the CLIP over it, pulling from 12 layers instead of plain last-layer extraction. It's the same in-context philosophy that made Flux.1 Kontext famous (the model consumes the reference itself, rather than an adapter embedding shoved in via IP-Adapter-style cross-attention), but done on Krea 2's own text encoder. There's even a text-only fallback: feed no image and it behaves like a stock encode, which is handy for building the negative.

The inputs that matter

  • clip (required) - your Krea 2 CLIP, i.e. Qwen3-VL loaded with type: krea2. Same one you'd use for plain Krea 2 text-to-image.
  • prompt (required) - the edit instruction. Plain language: "recolor the car to matte black."
  • image - the same source image you're editing. The one to actually get right.
  • image_b (optional) - second reference for two-image edits. Training order: scene goes in image, subject goes in image_b. Leave it unconnected for single-image work.
  • grounding_px (default 768) - caps the longest side fed to the vision encoder; 0 = native. This is your quality dial: lower = stronger edit adherence, higher = stronger identity/likeness. The v1.2 weights trained with 384–768 jitter, so 768 is comfortably in distribution; people report good results at 1024 for people and 512 for stubborn scene changes.
  • system_prompt (optional) - advanced, leave it empty. The training default steers what the vision encoder attends to (color, shape, spatial relationships); overriding it lets you push attention toward, say, facial identity detail.

Wiring it up

Wire the CONDITIONING output into KSampler.positive. And here's the trap that catches everyone: at CFG > 1 you should ground the negative too - a second Krea2EditGroundedEncode with an empty prompt and the same image. That's the trained unconditional, and it makes CFG behave instead of fighting you. The packaged workflow in workflows/krea2_identity_edit.json shows the whole thing.

Install

It's in ComfyUI Manager under "Krea 2 Identity Edit", or:

cd ComfyUI/custom_nodes
git clone https://github.com/lbouaraba/comfyui-krea2edit
# restart ComfyUI

No extra Python dependencies. But the node alone does nothing - you need the full Krea 2 stack: the Krea 2 model (Raw or Turbo), the Qwen3-VL 4B text encoder (~8 GB; people routinely forget this one and then report the model as broken), the Qwen-Image VAE, and the Identity Edit LoRA (krea2_identity_edit_v1_2.safetensors, from conradlocke on HuggingFace) applied via LoraLoaderModelOnly before the patch node. Note this is a fine-tune of Krea 2 Raw, trained on SFW data only - Krea's own safety-filter quirks still apply underneath it.

Common issues

  • Edits ignore scene references - you're feeding a non-Krea2 CLIP, or the patch node isn't in the model path. Both halves of the recipe have to be present.
  • Blurry output - usually the latent path at mismatched resolutions; the fix lives on the other node's pixel path, not here.
  • Keep it ≤ 2 MP - above the trained range, source content bleeds into the output and subjects duplicate.
  • Removals don't work on Turbo - distilled Turbo at CFG 1 tends to re-render the subject instead of deleting it. Switch to Raw at CFG 3, ~20 steps, and ground the negative.
Categorykrea2edit

Inputs (6)

NameTypeDefaultDescription
clipCLIP
promptSTRING
imageoptIMAGE
image_boptIMAGE2nd reference (subject) for multi-ref LoRAs; vision blocks in training order: scene, subject
grounding_pxoptINT7680–4096cap longest side fed to Qwen3-VL; 0 = native
system_promptoptSTRINGadvanced (optional): override the grounding system prompt (empty = training default). Steers what the vision encoder attends to, e.g. facial identity detail.

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING