Nodes/comfyui-svdint4/Krea2 Identity Edit Conditioning
ComfyUI Node

Krea2 Identity Edit Conditioning

The whole identity-edit recipe in one node

By wjie98·Created 2 months ago·Updated 3 days ago· 2
Krea2 Identity Edit Conditioning
  • model
  • clip
  • vae
  • target_latent
  • character_image
  • background_image
  • model
  • conditioning
prompt
character_strength4.00
background_strength1.00
grounding_px768

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) and background_strength (default 1) - reference-fidelity bias. Set both to 1 and 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.

CategoryTuring Utils/conditioning

Inputs (10)

NameTypeDefaultDescription
modelMODEL
clipCLIP
vaeVAE
target_latentLATENTConnect the same latent that feeds KSampler. It is used only to pre-encode references at the sampling resolution.
character_imageIMAGERequired character identity reference.
promptSTRING
character_strengthFLOAT4.000–1000Character reference-fidelity bias. Set to 1 for no extra attention bias and the fastest native attention path.
background_strengthFLOAT1.000–1000Background reference-fidelity bias; 1 disables it.
grounding_pxINT7680–4096Longest side presented to Qwen3-VL; 0 keeps native size.
background_imageoptIMAGEOptional scene or edit canvas. Internally it is always ordered before the character reference.

Outputs (2)

NameTypeDescription
modelMODEL
conditioningCONDITIONING