Krea2 Edit MXD
Give the instruction something to look at
- clip
- image
- image_b
- CONDITIONING
Here's the thing nobody tells you about editing with Krea 2: Krea never shipped an official edit checkpoint. What shipped instead is a base model whose text encoder is a vision model - Qwen3-VL - which Krea chose specifically so the same stack could support editing later. The community filled the gap with functional LoRAs (Conrad Locke's krea2-identity-edit being the one that got the attention, 800-plus upvotes on the samples thread) and those LoRAs expect a specific semantic path: instruction plus reference image, encoded together. This node is that path.
What it does
You give it a CLIP object, a prompt, and one or two images. It tokenizes the text with the images in the sequence, using the template <|vision_start|><|image_pad|><|vision_end|> repeated once per image, wraps it in the fixed caption-style system prompt the training path expects - "Describe the image by detailing the color, shape, size, texture, quantity, text, spatial relationships of the objects and background:" - and emits CONDITIONING. Translation: Qwen3-VL actually sees your source image, your instruction sits after the vision tokens, and the diffusion model gets conditioning in the shape it was taught to read.
Skip the image and it falls back to plain text tokenization. That's still valid conditioning, it just isn't an edit - you're back to ordinary text-to-image.
Inputs that matter
- clip - the Qwen3-VL encoder Krea 2 uses. It has to be a loader carrying a vision tower; a text-only CLIP object can't encode the images.
- prompt - write it as a change to the source, not a description of a new picture. This is the lesson every instruction editor taught the hard way: these models re-emit the whole frame, so anything you don't protect is fair game.
- image - the source. image_b - optional second reference for multi-reference LoRAs; the tooltip is explicit that the first image is the scene and the second is the subject you're dropping into it.
- grounding_px - default 768, the cap on the longest side fed to Qwen3-VL (area-resampled down). This is your lever when the vision tower is what's eating VRAM or adding a second to every run. Set it to
0for native resolution when detail matters - small text on a sign, a specific pattern - and accept the cost.
Output is a single CONDITIONING. Wire it into your sampler's positive input. If you're running Krea 2 Turbo at its default CFG 1.0 the negative is ignored anyway; on Raw at CFG 3.5, a normal CLIP Text Encode on the negative side is fine.
Install
ComfyUI Manager: search Maxed Out, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Maxed-Out-99/ComfyUI-MaxedOut.git
This one needs no extra node pack - the Krea 2 edit implementation was folded into the MXD nodes rather than depended on at runtime. The README is upfront that it's adapted from Conrad Locke's Apache-2.0 comfyui-krea2edit, and the code carries the upstream revision hash, so the credit is where it should be. The model weights are still a separate download; nothing here fetches them for you. And per the README there are no pip dependencies at all.
Where it goes wrong
The edit is a no-op, or the model invents the scene. Ninety percent of the time the images aren't reaching the encoder. Check that your CLIP loader is the Qwen3-VL one bundled for Krea 2 and that the image wire is actually connected - the image input is optional, so a disconnected wire is a silent fallback to text-only conditioning, not an error.
The model refuses or flattens your prompt. That's not this node. The open Krea 2 weights went through an alignment pass the hosted version didn't, and it doesn't stop at NSFW - it drops clauses about bodies and violence and flattens facial expression. Krea confirmed it on the record after release, and the community's workarounds are an uncensor LoRA or a conditioning rebalance. Nothing an encode node can fix, but worth knowing before you spend an evening rewiring.
Grounding is slow. Longest-side 768 on a 4K photo is a lot of downsampling per run, and you pay it on every queue. If you want that cheaper, lower grounding_px rather than cropping the input by hand.
The system prompt is fixed on purpose. That caption-style prefix is hard-coded in the node, not a widget. Don't go looking for a way to rewrite it - it's the training-matched prefix, and matching it is the whole job.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| prompt | STRING | — | |
| imageopt | IMAGE | — | |
| image_bopt | IMAGE | Optional second reference (subject) for multi-reference LoRAs; the first image is the scene. | |
| grounding_pxopt | INT | 7680–4096 | Maximum longest side fed to Qwen3-VL; 0 uses native resolution. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |