Eric Krea2 Style Reference (training-free)
Borrow the palette, not the picture — no LoRA training
- style_image
- style
- style_preview
Style LoRAs are the standard answer to "make it look like that", and they're great - right up until you want one specific reference's brushwork for one image, and training a LoRA for a single job is absurd. Krea 2 was designed with a style-reference module in the hosted product; Krea explicitly did not release it with the weights. So the community rebuilt it, and this node is a port of that rebuild: reference image in, its palette and rendering language transferred to your generation, no training, no LoRA file.
Reach for it when you have a target look - a painting, a film still, a texture you love - and you want a prompt to live inside that look rather than next to it.
How it works
This is a port of nkxx188/ComfyUI-Krea2-StyleTransfer (MIT), re-implemented against the pack's diffusers transformer. The mechanism explains both what it does well and what it refuses to do.
For every styled step the batch becomes [target, reference]. The reference is VAE-encoded at that call's grid (cover-cropped), then walked up the noise schedule along a model-guided trajectory - a Heun predictor-corrector on the model's own velocity, blended by gamma with the straight-line prior (1-s)·ref + s·eps - so it sits on-manifold at the target's noise level instead of being a naive ref + noise mix.
In the active blocks (default 7–27) your image's queries attend to [target K ; reference K] and [target V ; reference V] in one softmax. Here's the elegant bit: the reference keys are reweighted per RoPE frequency band. High-frequency (positional) bands fade from 1.04 to 0 across the run; low-frequency bands go 1.0 → 1.10 and then get multiplied by ref_k_strength. Early on the target can align itself to the reference's layout. Late in the run it physically cannot copy reference positions any more - that's the no-content-leakage guarantee, by construction rather than by hope - but it's still pulling the palette, stroke and texture statistics. Target Q and K are also AdaIN-matched toward the reference's token statistics, and the value path AdaINs target-V toward ref-V mixed with raw ref-V at ref_value_mix.
Inputs
style_image is the only required input, and it's cover-cropped to each styled stage's size, so similar aspect ratios crop less. Then:
preset- leave it atrecommended. That locks the original author's tuned low-leakage route and ignores every custom widget below. Flip tocustomonly when you want to tune.style_strength(1.0) - overall amount, applied in both modes. ~1.0 is strong and coherent at 3 MP; 2.0 can overshoot.s1_strength/s2_strength/s3_strength- per-stage multipliers on top ofstyle_strength, defaulting to 1 / 0 / 0. S2 refines S1's already-styled result at full speed. Raising S2 re-asserts the style while refining and it is slow; S3 at 8 MP is slower still.- The
customknobs -ref_k_strength(how hard the target attends to the reference),low_scale_end(high = more style, more leakage),high_scale_start/high_scale_end,adain_strength,ref_value_mix,value_adain_strength,beta(the high→low frequency weighting curve),blocks(e.g.7-27or5,8,20-27),trajectoryandgammaandtrajectory_steps.
Outputs are style - into Ultra's style socket - and style_preview, which is the reference image after its cover-crop, i.e. a check that you fed it what you thought you did.
What it costs
Budget for it, because it's not free. Roughly 2.3–2.6× per styled step plus the trajectory pass, and trajectory = model_pc (the original route) costs about 2 × trajectory_steps extra evaluations per styled stage. A 3 MP S1 run took around two minutes on a 48 GB card. trajectory = linear is free but weaker - you're replacing the model-guided path with a plain ref + noise mix.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/Krea2_ComfyUI_Advanced
or ComfyUI Manager → search Eric_Krea2. Same pack-level requirement as everything else here - a diffusers build that includes Krea2Pipeline:
python_embeded\python.exe -m pip install --upgrade --force-reinstall --no-deps git+https://github.com/huggingface/diffusers.git
The force flag is not optional; Krea 2 support merged after the version string was frozen at 0.39.0.dev0. Plus transformers>=4.57.0, Krea 2 weights in diffusers layout, and ideally flash-attn 2.8+.
Where it goes wrong
Expecting content transfer. This node transfers style and deliberately refuses to copy layout late in the run. If you want the subject of the reference too, you want Vision Prompt for semantic grounding or img2img for structure - style reference is a third, narrower channel.
Combination rules. Style pairs with control. It does not combine with paint or edit (both raise), and guidance is skipped with a printed note if you wire it alongside.
Style not strong enough? The honest first move is style_strength, not deep custom tuning - the recommended preset exists because the manual route leaks content long before it looks better. If you do go custom, raise low_scale_end for more style and watch for reference content appearing; that's the trade the low-frequency band is holding.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| style_image | IMAGE | The style reference. Its palette / brushwork / texture / rendering language are transferred; its content should not leak. It is cover-cropped to each styled stage's size, so similar aspect ratios crop less. | |
| presetopt | COMBO | recommended | recommended: the original author's tuned low-leakage route (custom widgets ignored). custom: use the widgets below. |
| style_strengthopt | FLOAT | 1.000–2 | Overall style amount (applies in both modes). 0 = off. |
| s1_strengthopt | FLOAT | 1.000–2 | Stage 1 multiplier on style_strength. 0 = stock model for S1. |
| s2_strengthopt | FLOAT | 0.000–2 | Stage 2 multiplier. Default 0: S2 refines S1's styled result at full speed; raise to re-assert the style while refining (slow). |
| s3_strengthopt | FLOAT | 0.000–2 | Stage 3 multiplier (very slow at 8 MP). |
| ref_k_strengthopt | FLOAT | 1.060–5 | custom: multiplier on the reference keys - how hard the target attends to the reference. Brings style back when low_scale_end is kept low. |
| low_scale_endopt | FLOAT | 1.10-4–8 | custom: end weight of the reference keys' low-frequency bands. Higher = more style, more content leakage / quality loss. |
| high_scale_startopt | FLOAT | 1.04-4–8 | custom: start weight of the high-frequency (positional) bands; they fade to high_scale_end over the run. |
| high_scale_endopt | FLOAT | 0.00-4–8 | custom: end weight of the high-frequency bands (0 = the target cannot copy reference positions late in the run). |
| adain_strengthopt | FLOAT | 0.850–1 | custom: AdaIN of the target's Q/K toward the reference. |
| ref_value_mixopt | FLOAT | 1.000–1 | custom: share of raw reference values (1 = raw). |
| value_adain_strengthopt | FLOAT | 0.650–1.5 | custom: AdaIN of target values toward the reference (only matters when ref_value_mix < 1). |
| betaopt | FLOAT | 2.500.01–20 | custom: curve of the high->low frequency weighting. |
| blocksopt | STRING | 7-27 | custom: transformer blocks that see the reference, e.g. 7-27 or 5,8,20-27. |
| trajectoryopt | COMBO | model_pc | How the reference is noised to the target's level. model_pc: model-guided (original route, costs ~2x trajectory_steps evals per styled stage). linear: plain ref+noise mix, free but weaker. |
| gammaopt | FLOAT | 0.500–1 | model_pc blend: 1 = pure model trajectory, 0 = pure linear prior. |
| trajectory_stepsopt | INT | 82–32 | Points on the reference trajectory per styled stage. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| style | KREA2_STYLE | — |
| style_preview | IMAGE | — |