Training-free local style reference nodes for Krea2 in ComfyUI.
This project adds local style-reference behavior to open-source Krea2 workflows. It is not the official Krea style reference module and does not call the official API. It is an independent ComfyUI implementation that injects reference-image style signals during sampling.
The main goal is simple:
Transfer the visual style of a reference image while keeping the new prompt content, with no visible content leakage and minimal quality loss.
In single-image reference cases, the behavior is close to a temporary training-free style adapter: similar in use to a style LoRA, but without training a LoRA, preparing a dataset, or changing model weights.
The open-source Krea2 model does not currently include the official Style Reference module. Common alternatives have clear drawbacks:
- Image-to-image often changes the subject, layout, or composition.
- Prompt-based style extraction depends heavily on VLM wording and works less directly.
- Early reference-injection routes could transfer style, but often caused content leakage, dirty textures, lower image quality, or too many hard-to-tune controls.
This node focuses on a more practical route:
- Single-reference style transfer that preserves Krea2's native visual quality.
- No visible reference-content leakage in the tested single-reference examples.
- Strong transfer of linework, color palette, texture, rendering language, and overall visual style.
- A simple
recommendedmode for normal use, pluscustommode for experiments. - Optional two-reference mode for controlled experiments.
The key discovery is the relationship between low_scale_end and ref_k_strength.
In reference-injection routes, low_scale_end strongly affects the balance between style transfer, quality, and leakage:
- Higher
low_scale_end: style transfers more easily, but reference content can leak in and image quality can degrade. - Lower
low_scale_end: image quality improves and content leakage is reduced, but the reference style can disappear.
This project introduces an independent ref_k_strength control for the reference K path.
That decouples two things that were previously tied together:
low_scale_endkeeps content leakage low and preserves image quality.ref_k_strengthre-activates the reference style signal whilelow_scale_endstays low.
This is the core improvement. It allows Krea2 to keep a low-leakage, high-quality setting while still transferring the reference image's style.
In plain terms:
low_scale_endsuppresses unwanted reference-content leakage.ref_k_strengthbrings the style back.
These examples use one reference image and a different text prompt. The output follows the prompt content while inheriting the reference style.
Prepares one reference image for style transfer.
Inputs:
vaetarget_latentreference_image
Outputs:
reference_latentreference_previewdebug
Use the same target latent that will feed the sampler. The reference is adapted to the target latent size so the style path matches the current generation.
Main single-image style transfer node.
Inputs:
modelreference_latentref_conditioningmode
recommended mode uses the tuned low-leakage route. custom mode exposes advanced controls, including ref_k_strength, low_scale_end, and related RF/attention parameters.
Bundles two prepared style reference latents.
This node intentionally supports two references only. See the multi-reference notes below.
Experimental two-reference style transfer.
Inputs include:
primary_referenceref_k_1ref_k_2
primary_reference chooses which reference acts as the main style anchor.
Convenience latent-size node with common Krea2 sizes and aspect ratios.
The default recommended mode currently locks the tested route:
style_strength: 1.00
ref_k_strength: 1.06
ref_value_mix: 1.00
value_adain_strength: 0.65
rf_mode: flowturbo_pc
gamma: 0.50
beta: 2.50
high_scale_start: 1.04
high_scale_end: 0.00
low_scale_start: 1.00
low_scale_end: 1.10
adain_strength: 0.85
blocks: 7-27
Suggested sampler:
steps: 8
cfg: 1.0
sampler: euler_ancestral
scheduler: simple
denoise: 1.0
Multi-reference support is intentionally limited to two images.
In this training-free route, reference images are not fused by a trained official style module. Each reference brings its own style signal into the K/V path. With two references, the result is still relatively controllable: one image can act as the primary style anchor while the other contributes secondary color, linework, texture, or atmosphere.
With three or more references, the signals tend to compete rather than blend cleanly. In testing, this often caused weaker style transfer, quality loss, unstable dominance by one reference, or results that were difficult to explain.
Two references are the practical limit for this route.
Two-reference transfer is not a simple weighted average.
The order of the references matters. In our experiments, the first or primary reference often affects the overall style entry point: base palette, outline treatment, background tendency, sticker-like borders, and other strong visual cues.
primary_reference lets you choose which image acts as the main style anchor. The secondary reference still contributes, but the primary reference has more influence over the overall visual direction.
Each pair below uses the same references and prompt, but swaps which reference is primary.
This project does not claim to reproduce the official Krea style reference module.
However, official Krea2 multi-reference results can also show split behavior inside a four-image batch: some outputs visibly follow one reference direction, while others follow another. This suggests that the official system may also have some form of ordered, routed, or stochastic reference influence rather than a perfectly uniform average.
The screenshot below is included only as an observation, not proof of the official implementation.
Our two-reference route may have touched part of a similar principle: references can act as separate style signals, and the result may depend on routing, order, or sampling dynamics.
- Independent ComfyUI implementation. No dependency on third-party style-transfer nodes.
- A practical low-leakage single-reference preset.
- Independent
ref_k_strengthcontrol for the reference K path. - A tuned low
low_scale_endroute to preserve quality and suppress reference-content leakage. - Two-reference experimental route with explicit
primary_reference. - Simplified UX:
recommendedfor normal users,customfor parameter experiments.
- This is not the official Krea style reference module.
- It is not a full LoRA replacement. It behaves like a training-free temporary style adapter in many single-reference cases, but it does not train or store a reusable style in model weights.
- Single-reference transfer is currently the strongest and most stable route.
- Two-reference transfer is experimental and order-sensitive.
- Very weak or generic references may not produce a strong style signal.
- Reference and target latent sizes must match for the current route.
Clone or copy this folder into ComfyUI's custom_nodes directory:
ComfyUI/custom_nodes/ComfyUI-Krea2-StyleTransfer
Restart ComfyUI.
The project only provides custom nodes. You still need a working Krea2 ComfyUI setup with the correct Krea2 UNet, VAE, and text encoder models.
Two example workflows are included alongside this project:
workflows/Krea2 Style Transfer Workflow.jsonworkflows/Krea2 Two Style Transfer Workflow.json
Use the single-reference workflow first. It is the main supported path.
This project was developed through practical experiments on local Krea2 workflows. It is inspired by public community discussion around Krea2 reference injection and RoPE/K-V style transfer ideas, but the node code, UX, tuned defaults, and ref_k_strength-based low-leakage route are implemented independently in this project.








