Krea2 Identity Edit Conditioning
The whole identity-edit recipe in one node
- model
- clip
- vae
- target_latent
- character_image
- background_image
- model
- conditioning
Krea 2 is the 12B diffusion transformer that took over the open ecosystem on trainability and character knowledge, and "identity edit" is its party trick: take one picture of a character, drop them into a new scene, keep the face. On the hosted product that's a polished module you don't get to see. In open weights, the recipe needs the appearance signal from the character image and the semantic understanding of a vision-language model, plus careful geometry so nothing shifts mid-sampling. This node is the pack's attempt to make that a single node instead of a tangle of patches.
Mechanically, here's what happens when it runs. It takes your character image (and optional background/edit canvas), fits each to your target latent's geometry - centered crop, bicubic resize, no latent interpolation - and VAE-encodes them. Then it sends a downscaled version of the images to Qwen3-VL for grounding: the prompt is tokenized together with an image description, capped at grounding_px (768 by default) on the longest side. The VAE-encoded references travel inside the conditioning output, and the model gets patched twice: reference RoPE positions are re-centered against the target grid, and an attention bias is added from target queries to reference tokens. If both images are present, the model always sees them in [background, character] order - there's no secret reordering.
The inputs that matter
The model, clip, and vae inputs come straight from your loaders. The two you'll actually touch:
character_image(required) - the identity reference.background_image(optional) - scene or edit canvas, always ordered before the character.prompt- your normal Krea-style natural-language prompt.character_strength(default 4) andbackground_strength(default 1) - reference-fidelity bias. Set both to1and the extra attention bias is disabled, which is also the fastest native attention path. More strength, more likeness, slower and more memory.
The odd one is target_latent. It's a read-only input - used only to pre-encode references at the sampling resolution and to get the grid for centered RoPE - and it is not copied to an output. Connect the same latent that feeds KSampler to both this node and the sampler. This is the wiring straight from the README:
Load Diffusion Model -> Load LoRA -> Krea2 Identity Edit Conditioning.model
Load CLIP (krea2) ----------------> Krea2 Identity Edit Conditioning.clip
Load VAE -------------------------> Krea2 Identity Edit Conditioning.vae
Load Image (character) -----------> Krea2 Identity Edit Conditioning.character_image
Empty SD3 Latent -----------------+> Krea2 Identity Edit Conditioning.target_latent
+> KSampler.latent_image
Apply the Identity Edit LoRA before this node, then the patched model and conditioning outputs go to KSampler. For the recommended Turbo/CFG-1 path, connect the single conditioning output to both the positive and negative sockets - that's expected, not a mistake.
Install and the real-world catches
cd ComfyUI/custom_nodes
git clone https://github.com/wjie98/comfyui-svdint4
or ComfyUI Manager → search "Turing Utils", restart. This node is pure Python - no kernel build needed, unlike the H3 patch nodes in the same pack.
Three things get people. First, the missing-file trio: Krea 2 needs the Qwen3-VL text encoder and the Qwen-Image VAE alongside the checkpoint, and new users routinely skip them - if the CLIP fails to load, that's why. Second, the target-latent geometry: if reference geometry changes during sampling, you get a hard error telling you to use the same target latent here and at KSampler. Third, the weight you're editing is the open Krea 2, which went through alignment training the hosted version didn't - expect it to drop prompt clauses about bodies, violence and horror, and expect expression flattening. The community workarounds (notably the uncensor LoRA) recover some of it at a quality cost. And before commercial work, mind the Krea 2 Community License: free below $1M trailing-twelve-month revenue, terminable on 30 days' notice.
Honest verdict: for a two-reference character edit, this is the least-fiddly path you'll find - the ordering, fitting and bias are all handled. It's not magic, though. If you just want a single reference and no edit, the character-only path works fine, and some people prefer a plain reference-image setup they already understand. Try both.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| vae | VAE | — | |
| target_latent | LATENT | Connect the same latent that feeds KSampler. It is used only to pre-encode references at the sampling resolution. | |
| character_image | IMAGE | Required character identity reference. | |
| prompt | STRING | — | |
| character_strength | FLOAT | 4.000–1000 | Character reference-fidelity bias. Set to 1 for no extra attention bias and the fastest native attention path. |
| background_strength | FLOAT | 1.000–1000 | Background reference-fidelity bias; 1 disables it. |
| grounding_px | INT | 7680–4096 | Longest side presented to Qwen3-VL; 0 keeps native size. |
| background_imageopt | IMAGE | Optional scene or edit canvas. Internally it is always ordered before the character reference. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| conditioning | CONDITIONING | — |