NK2E In-Context (Model)
Edit, tweak, re-edit without waiting
- model
- MODEL
If you're going to edit the same image a dozen times - and that's the whole point of in-context editing - you don't want the model reloading every time you swap a reference. That's the exact job of NK2E In-Context (Model): it's the same in-context edit mechanism as the pack's single-node version, but it reads its reference from elsewhere, so changing the image costs you nothing except the re-run itself.
This is the node the author actually wants you to use. In the pack's own words: it pairs with NK2E Set Reference, and the two of them together are the reload-free way to do Krea 2 edits.
Why "reload-free" matters
The legacy single node (NK2E In-Context Edit) bakes the reference into a clone of the model. Swap the reference and ComfyUI has to clone and re-wrap the model again - a real stall every iteration. This node instead registers its diffusion-model wrapper once and pulls the current reference at forward time from a global that the Set Reference node fills in. Your loop becomes: change reference → hit run → compare → change reference again. No loading pauses, no re-clone.
Mechanically it's the same in-context trick underneath: the VAE-encoded reference is tokenized, concatenated onto the image token sequence with its own position block, and the model attends to it while following your text instruction. This node is just the part that hooks the model; the reference plumbing lives in Set Reference.
What you wire
The node has exactly one input and one output:
- model (MODEL) - your Krea 2 checkpoint, typically after
LoraLoaderModelOnlyapplies the NK2E edit LoRA (the workflow runs it around 0.75). - MODEL output - goes straight into the
KSampler's model slot.
LoraLoaderModelOnly -> NK2E In-Context (Model) -> KSampler
That's the whole graph for this node. The reference isn't wired here at all - it arrives via the Set Reference node you place on the positive conditioning path:
CLIPTextEncode -> NK2E Set Reference -> KSampler (positive)
Run it at Krea 2 Turbo settings: denoise 1.0, ~4–8 steps, CFG 1, euler/simple, and a ConditioningZeroOut negative so the CFG-1 pipeline doesn't go grainy.
Install and gotchas
Same pack, same install: git clone https://github.com/Nynxz/ComfyUI-NK2E into custom_nodes, restart, or grab it via ComfyUI Manager (search NK2E). No pip dependencies. You need the NK2E edit LoRA from nynxz/NK2E plus the full Krea 2 stack - model, Qwen3-VL text encoder, Qwen-Image VAE - from Comfy-Org/Krea-2.
Three things to keep in mind:
- It needs a recent ComfyUI. The wrapper uses
comfy.patcher_extension, which isn't in old builds. If the node is missing or crashes on import, update first. - No reference, no edit. If nothing sets a reference, the wrapper bails out and you get a normal generation - useful as a fallback, confusing if you forgot the Set Reference node. Watch the console for
[NK2E] in-context active. - The pack is experimental. The README says results are rough and inconsistent across edit types. This is the better half of an unofficial tool, not a polished pipeline, and some of the older nodes carry deprecation flags as the author reshuffles the API.
The base Krea 2 weights also ship with the alignment pass that flattens expressions and skips some prompt clauses - edits inherit that, so don't chase a wiring bug when a face comes back blank. Swap in a different reference or rephrase before you blame this node.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |