Krea2 风格融合
Krea 2's img2img fusion node
- clip
- vae
- style_image
- target_image
- 条件
- 目标Latent
The usual way to restyle an image with Krea 2 is to run img2img at high denoise and hope the prompt carries the look - which is how you end up with a picture that kept the pose and lost the face, or kept the face and lost the pose. Krea2StyleSemanticFusion is the sibling node in this pack that splits the job properly: one image supplies the style, a second image supplies the structure, and the two never fight for the same slot. It's the natural upgrade from the pack's plain conditioning node if you're working from an existing image.
How the split works
Two images in, two very different routes. The 风格参考图 (style_image) goes down the Qwen3-VL image-token path - clip.tokenize(..., images=[style_image]), the same mechanism as the pack's other node - and ends up inside the CONDITIONING. The 目标结构图 (target_image) never touches the CLIP at all. It's only VAE-encoded into a LATENT that becomes KSampler's starting point. Your subject, pose, composition and spatial structure live in that latent; the style lives in the conditioning. Then KSampler runs at a low-to-mid denoise, and the two combine.
That's the design worth understanding, because it tells you which dial does what. style_strength (轻微/平衡/强烈) shapes the wording of the English style instruction the node prepends - "keep the target image latent as the source of subject, spatial structure, pose, and composition; use the attached reference image only as the style guide." It is not a math strength. Structure preservation is controlled by KSampler's denoise, full stop. The README's ranges: 0.35–0.45 keeps structure tight, 0.45–0.65 is the balanced starting point, 0.65–0.80 stylizes harder and redraws more.
The inputs that matter
- CLIP - the krea2 text encoder (loader type
krea2). Only the style image goes into its image path. - VAE - the Krea2/Qwen image VAE (
qwen_image_vae.safetensors), used to encode the target into the initial latent. - 风格参考图 (style_image) - provides color, material, brushwork, light, mood.
- 目标结构图 (target_image) - the subject and composition to preserve. Size it before this node: the code center-crops to a multiple of the VAE's downscale ratio (8x by default) rather than rescaling for you, so feed it something already near your output size - the example workflow uses ComfyUI's built-in Resize Images by Longer Edge.
- 正面提示词 (prompt) - must not be empty, and describe the target image's subject and scene, not the reference. The example prompt for a girl in a red coat in a subway corridor ends with "preserve the target image composition and subject" - explicit ownership beats vague wording, which is exactly how Qwen-encoded models like to be prompted.
- 语义风格强度 (style_strength) - defaults to 平衡 here (the conditioning node defaults to 轻微). Leave it until denoise is settled.
- 视觉编码分辨率 (vision_resolution) - pixel budget for the style reference before encoding; 384 stable, 512 more detail, slower.
Outputs: 条件 (CONDITIONING) → KSampler positive, and 目标Latent (LATENT) → KSampler's latent image input.
Install
ComfyUI Manager, search "Krea2 Style Refrence", or:
cd ComfyUI/custom_nodes
git clone https://github.com/DocWorkBox/ComfyUI_Krea2_Style_Refrence.git
Restart. No Python dependencies (dependencies = []), no requirements.txt - pure Comfy core plus torch. The model stack is the same three files as the whole pack: krea2_turbo_fp8.safetensors, qwen3vl_4b_fp8_scaled.safetensors, and qwen_image_vae.safetensors. All three, or none of it works. Turbo settings from the pack: 8 steps, CFG 1.0, er_sde / simple.
Common issues
- Structure drifts from the target - lower
denoisefirst (0.35–0.45), and reinforce the subject in the prompt. Don't touchstyle_strengthfor this. - Style barely shows - raise
style_strengthto 强烈, then nudgedenoiseup a bit (0.55–0.65). If it's still weak, raisevision_resolutionto 512. - "Resize Images by Longer Edge" missing on workflow import - that's a stock ComfyUI node; update ComfyUI or swap in any proportional scale node. It's not part of this pack.
- Error about the target being too small - the node needs dimensions divisible by the VAE downscale ratio (8); too-small inputs raise a ValueError rather than being resized. Scale the target up first.
- Reference subject leaks in - lower
style_strengthand make the prompt unambiguous about keeping only the target's people and scene.
One honest caveat that applies to the whole pack: the open Krea 2 weights went through an alignment pass the hosted model never got, so flattened expressions and dropped body/violence prompt clauses still show up here. That's a model trait, not a node bug - and it's the same reason you shouldn't expect the reference style to replicate as faithfully as Krea's own cloud module, which was never released.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | 加载类型应为 krea2 的文本编码器。节点只会把风格参考图送入 clip.tokenize(..., images=[参考图])。 | |
| vae | VAE | Krea2/Qwen 图像 VAE。节点会用它把目标结构图编码为 KSampler 初始 latent。 | |
| style_image | IMAGE | 提供色彩、材质、笔触、光影和整体视觉语言。它会进入 Qwen3-VL 图像编码路径。 | |
| target_image | IMAGE | 提供主体、构图、姿势和空间结构。它只会通过 VAE 编码成 latent,不会进入 CLIP 图像条件。 | |
| prompt | STRING | 目标图像的文字描述。建议描述目标主体和期望结果,而不是重复参考图主体。 | |
| style_strength | COMBO | 平衡 | 通过提示词措辞控制参考图影响:轻微更保守,强烈更主动;结构保留主要由 KSampler denoise 控制。 |
| vision_resolution | INT | 384128–1024 | 风格参考图送入 Qwen3-VL 前按总像素缩放到此边长平方。384 较稳,512 保留更多细节但更慢。 |
| custom_instructionopt | STRING | 可选。留空使用上方强度预设;填写后会替代预设指令,仍会附加目标提示词。 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| 条件 | CONDITIONING | — |
| 目标Latent | LATENT | — |