Nougan Krea 2 RefMod Encode π―
The text-encode node that swaps in for Krea 2 Ostris Edit and reads baked references
- clip
- extra_image
- vae
- positive
- negative
If you've got Krea 2 editing working at all, you know the shape of the graph: a Krea 2 model, an edit LoRA, the Krea 2 Ostris Edit Model Patch, and a Text Encode Krea 2 Ostris Edit node with image inputs on it. Nougan Krea 2 RefMod Encode π― drops into that last slot - same conditioning out, but the references come from your baked library instead of five image wires.
What it does
clip is your Krea 2 text encoder. prompt and negative_prompt are the usual pair. refmod_1 (required, None allowed), refmod_2 and refmod_3 are dropdowns of everything in models/refmods/krea2.
What comes out is conditioning with reference_latents populated, and the encoder input rewritten into Krea's own template - Picture 1: <|vision_start|><|image_pad|><|vision_end|>β¦ ahead of your prompt, with each stored image fitted into 384Γ384 total pixels for the vision tower. It's the same conditioning the Ostris encode node produces, which is the point: you can swap between them mid-experiment without changing anything downstream.
extra_image + vae handles the ad-hoc case - a reference you haven't baked. extra_image_resolution (default 1024, 0 = no cap) sizes it, with the same never-upscale rule.
And then ref_strength, which is the interesting one. It isn't a strength knob. The node builds a version of the conditioning with references and one without, then schedules them: references steer the first ref_strength fraction of the denoise, after which the plain prompt alone finishes. 1.0 is every step (the old behaviour), 0.6 gives you the first 60%, 0 turns them off. Lower means looser likeness and more prompt freedom. It's a much more predictable dial than amplitude scaling, because early steps set composition and late steps set detail - if the reference is fighting your prompt over layout, end its shift early.
Outputs
Just positive and negative (CONDITIONING). Feed them to your sampler as usual. No latent out - Krea 2 graphs already have a size decision somewhere, and this node stays out of it.
The thing that trips everyone
Stock Krea 2 has no reference path. This node produces conditioning in a shape the edit-trained stack understands, so you still need:
- a Krea 2 edit LoRA trained with ai-toolkit (
krea2arch,edit: true), - ostris/ComfyUI-Krea2-Ostris-Edit installed, with its Model Patch node on the MODEL line,
kv_cacheoff unless the LoRA was trained with it.
Wire it without the patch and the node runs fine, the conditioning looks fine, and the output quietly ignores your character. That's the failure mode to check first, and it's not this node's fault - the pack says so in the header of the source file.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Winnougan/Nougan_Nodes
git clone https://github.com/ostris/ComfyUI-Krea2-Ostris-Edit
# restart ComfyUI
Or both via ComfyUI Manager. Nothing to pip install. Bake references first with Nougan Krea 2 RefMod Bake π§¬, or the dropdown will offer you None and nothing else. Hard-refresh after restart so the refmod picker renders properly.
Where people get burned
Mixed families. A Krea 2 encode node fed an H3 or MOSS refmod. Each family carries its own metadata key and its own tensor layout; the dropdowns aren't a compatibility check. If a reference does nothing at all, verify which bake you picked.
Reference count creep. Krea 2 tops out at 8 baked references, but "can" and "should" differ - each one adds tokens to every block of every step. Two or three is a normal character workflow.
Negative prompt neglect. Krea 2 edit graphs still reward a real negative; the references go onto the negative conditioning too, so junk in the negative is junk attached to your reference path.
Licence reality check. Krea 2 is under the Krea 2 Community License: commercial use below a $1M trailing-twelve-month revenue threshold, but with an acceptable-use policy that bans circumventing content filters and watermarks - exactly the operation most memetic Krea 2 tooling performs. Read it before you monetise anything.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | β | |
| prompt | STRING | β | |
| negative_prompt | STRING | β | |
| refmod_1 | COMBO | 1 options: None | |
| refmod_2opt | COMBO | 1 options: None | |
| refmod_3opt | COMBO | 1 options: None | |
| extra_imageopt | IMAGE | Optional plain reference(s), encoded on the fly. Needs the VAE. | |
| vaeopt | VAE | Only needed for extra_image. | |
| extra_image_resolutionopt | INT | 10240β4096 | β |
| ref_strengthopt | FLOAT | 1.000β1 | How long the references stay active, as a fraction of the denoising steps counted from the start. 1.0 = every step (default, same as before). 0.6 = the references steer the first 60% of the steps, then the prompt alone finishes. 0 = references off. Lower = looser likeness and more prompt freedom. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | β |
| negative | CONDITIONING | β |