Element Krea2 In-Context Patch
The one-wire node that stops Krea 2 ignoring your reference
- model
- MODEL
This node has no widgets at all. One MODEL input, one MODEL output, no settings. It's the least interesting node in the pack to look at and, if you're doing Krea 2 tile work with a stock KSampler, the difference between a working reference and one that quietly isn't there.
The problem it solves is a plumbing problem. In ComfyUI you can attach reference_latents to a conditioning, and that's the sanctioned way to tell a reference-capable model "here's the source image, use it." But the sampler calls model.extra_conds(**cond_dict) on the way in, and that function drops keys it doesn't recognise. So your reference latent sails into the conditioning dict, gets discarded at the door, and the DiT never sees it. No error. No log. Krea 2 just runs as a plain text-to-image model and your upscale comes back looking like it was never anchored to anything.
What it does
Install it between your model loader and the sampler and two things happen.
First, it patches extra_conds so reference_latents gets translated into the ref_latents forward kwarg instead of being thrown away.
Second, it wraps the diffusion model's forward pass and, whenever that ref_latents arrives, rebuilds the sequence in the layout Krea 2's identity-edit LoRA was actually trained on: [text | source frame=1 | target frame=0]. That's not ComfyUI's native text-to-image layout, so the reference would otherwise be in the wrong place in the token stream even if it survived. This is a manual forward reconstruction - it reaches into the model's blocks, positional embedder and image slicing directly.
If it works, you get a log line telling you so, with the source latent's shape. If the references aren't arriving, you get a warning. That warning is slightly noisy by design: at cfg 1 the unconditional pass genuinely has no references, so you'll see it at least once on a healthy run. Repeated warnings on the conditioning passes mean they really aren't getting through, and that's when you check your wiring.
Also worth knowing: it sniffs whether the model is Krea 2 before doing anything, by checking for a handful of internal attributes. If you point it at the wrong model it logs "not a Krea 2 model, passing through" and hands your model back untouched. So a mistake here is safe, if silent.
When you need it, and when you don't
Only the Krea 2 identity-edit path needs this, and only on the split workflow. You need it when you're using Element Tile Split with reference_mode off, sampling through your own KSampler, and the reference is riding on the conditioning - which is the normal case for that wiring. Without this node, the reference is dropped at the door as described.
You don't need it in Element Tiled Upscale when reference_mode is on. That node builds the same machinery internally, and anything patched upstream gets ignored.
You also don't need it for Qwen or FLUX reference paths - those models declare their own reference method, and the pack's other plumbing handles them.
Prerequisites before any of this is worth wiring: Krea 2 plus the krea2_identity_edit LoRA, an empty negative_prompt, and cfg around 1.0. The empty negative isn't superstition - identity-edit was trained with an unconditional distribution of "same image, empty text", and blanking the negative lines you up with it (and saves you encoding it at cfg 1). Denoise 0.7–0.8 is the sweet spot for this model; higher does hold colour better but starts throwing dirty speckle.
Install
Manager → ComfyUI-Element_TileEdit, or:
cd ComfyUI/custom_nodes
git clone https://github.com/supElement/ComfyUI-Element_TileUpscale
Restart. No dependencies beyond ComfyUI, no model files. The LoRA lives in models/loras like any other.
Where it bites
Treat this node as the most fragile thing in the pack, because it is. It depends on ComfyUI's extra_conds object-patching and DIFFUSION_MODEL wrapper mechanism, and on the internal shape of Krea 2's implementation. When upstream changes a name, a signature, or the internal layout, the failure is not a clean exception - the author's own README says the node will either error out or silently produce wrong results. Silent is worse.
Practical consequences: don't upgrade ComfyUI mid-project while a Krea 2 tile workflow is producing something you like, and when an output suddenly loses its anchor, read the console for that "in-context forward engaged" line before you touch any parameter.
And if you don't actually need per-tile sampler control, skip all of this and use the all-in-one node. Fewer moving parts, no patch node, no silent drops.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |