ComfyUI Node
Krea 2 Reference Encode
Encodes a prompt plus up to 4 reference images for Krea 2. References enter as Qwen3-VL vision tokens, enabling character/style/pose transfer ('Redraw the character from image1 in the pose of image2').
Krea 2 Reference Encode
- clip
- image1
- image1_mask
- image2
- image2_mask
- image3
- image3_mask
- image4
- image4_mask
- bg_removal
- CONDITIONING
◄prompt—►
◄image1_detailhigh►
◄image2_detailhigh►
◄image3_detailhigh►
◄image4_detailhigh►
◄layout_split0.00►
Categoryconditioning/krea2
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| prompt | STRING | Roles come from the prompt: character1..4 = identity reference, style1..4 = style-only (patches shuffled). Both expand to the clauses the LoRA trains on. Plain image1..4 / Picture 1..4 also work, e.g. 'Redraw the character from image1 in the pose of image2'. | |
| image1opt | IMAGE | — | |
| image1_detailopt | COMBO | high | Longest side this reference is scaled to before the vision encoder. Higher = more vision tokens = stronger, more literal reference. Use high for the character/subject and low/normal for pose or style hints to avoid side-by-side collages. |
| image1_maskopt | MASK | Optional subject mask (e.g. from RemoveBackground). The reference is cropped to the mask's bounding box and the background is whited out before the vision encoder, so messy references (scenes, watermarks, other characters) only contribute the subject. | |
| image2opt | IMAGE | — | |
| image2_detailopt | COMBO | high | Longest side this reference is scaled to before the vision encoder. Higher = more vision tokens = stronger, more literal reference. Use high for the character/subject and low/normal for pose or style hints to avoid side-by-side collages. |
| image2_maskopt | MASK | Optional subject mask (e.g. from RemoveBackground). The reference is cropped to the mask's bounding box and the background is whited out before the vision encoder, so messy references (scenes, watermarks, other characters) only contribute the subject. | |
| image3opt | IMAGE | — | |
| image3_detailopt | COMBO | high | Longest side this reference is scaled to before the vision encoder. Higher = more vision tokens = stronger, more literal reference. Use high for the character/subject and low/normal for pose or style hints to avoid side-by-side collages. |
| image3_maskopt | MASK | Optional subject mask (e.g. from RemoveBackground). The reference is cropped to the mask's bounding box and the background is whited out before the vision encoder, so messy references (scenes, watermarks, other characters) only contribute the subject. | |
| image4opt | IMAGE | — | |
| image4_detailopt | COMBO | high | Longest side this reference is scaled to before the vision encoder. Higher = more vision tokens = stronger, more literal reference. Use high for the character/subject and low/normal for pose or style hints to avoid side-by-side collages. |
| image4_maskopt | MASK | Optional subject mask (e.g. from RemoveBackground). The reference is cropped to the mask's bounding box and the background is whited out before the vision encoder, so messy references (scenes, watermarks, other characters) only contribute the subject. | |
| bg_removalopt | BACKGROUND_REMOVAL | Optional: connect Load Background Removal Model (birefnet) and every content-role reference is auto-cleaned — cropped to its subject with the background whited out. Per-image masks override it; style-role images are left untouched (their background often carries the style). | |
| layout_splitopt | FLOAT | 0.000–0.9 | Fraction of the denoise steps that see TEXT-ONLY conditioning before the references kick in. The first steps fix the layout, so 0.25 strongly prevents side-by-side collages of the references. 0 disables. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |