{ "last_node_id": 17, "last_link_id": 21, "nodes": [ { "id": 1, "type": "UNETLoader", "pos": [ 40, 60 ], "size": [ 340, 82 ], "flags": {}, "order": 0, "mode": 0, "inputs": [], "outputs": [ { "name": "MODEL", "type": "MODEL", "links": [ 2 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "UNETLoader" }, "widgets_values": [ "krea2_turbo_bf16.safetensors", "default" ], "title": "Load Krea 2 Diffusion Model" }, { "id": 2, "type": "LoraLoaderModelOnly", "pos": [ 40, 200 ], "size": [ 340, 82 ], "flags": {}, "order": 1, "mode": 0, "inputs": [ { "name": "model", "type": "MODEL", "link": 2 } ], "outputs": [ { "name": "MODEL", "type": "MODEL", "links": [ 3 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "LoraLoaderModelOnly" }, "widgets_values": [ "krea2_identity_edit_v1_1.safetensors", 1.0 ], "title": "Identity Edit LoRA v1.1 (required)" }, { "id": 3, "type": "CLIPLoader", "pos": [ 40, 340 ], "size": [ 340, 106 ], "flags": {}, "order": 2, "mode": 0, "inputs": [], "outputs": [ { "name": "CLIP", "type": "CLIP", "links": [ 4, 5 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "CLIPLoader" }, "widgets_values": [ "qwen3vl_4b_fp8_scaled.safetensors", "krea2", "default" ], "title": "Load Text Encoder" }, { "id": 4, "type": "VAELoader", "pos": [ 40, 500 ], "size": [ 340, 58 ], "flags": {}, "order": 3, "mode": 0, "inputs": [], "outputs": [ { "name": "VAE", "type": "VAE", "links": [ 9, 20 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "VAELoader" }, "widgets_values": [ "qwen_image_vae.safetensors" ], "title": "Load VAE" }, { "id": 5, "type": "LoadImage", "pos": [ 40, 620 ], "size": [ 340, 314 ], "flags": {}, "order": 4, "mode": 0, "inputs": [], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 6 ], "slot_index": 0 }, { "name": "MASK", "type": "MASK", "links": [], "slot_index": 1 } ], "properties": { "Node name for S&R": "LoadImage" }, "widgets_values": [ "example.png", "image" ], "title": "Source Image" }, { "id": 6, "type": "PrimitiveInt", "pos": [ 760, 300 ], "size": [ 300, 82 ], "flags": {}, "order": 5, "mode": 0, "inputs": [], "outputs": [ { "name": "INT", "type": "INT", "links": [ 1 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "PrimitiveInt" }, "widgets_values": [ 1280, "fixed" ], "title": "Input max size (longest edge)" }, { "id": 7, "type": "ImageScaleToMaxDimension", "pos": [ 440, 620 ], "size": [ 300, 106 ], "flags": {}, "order": 6, "mode": 0, "inputs": [ { "name": "image", "type": "IMAGE", "link": 6 }, { "name": "largest_size", "type": "INT", "link": 1, "widget": { "name": "largest_size" } } ], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 7, 8, 10, 11 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "ImageScaleToMaxDimension" }, "widgets_values": [ "lanczos", 1280 ], "title": "Scale source (longest edge = max size)" }, { "id": 8, "type": "GetImageSize", "pos": [ 440, 780 ], "size": [ 240, 90 ], "flags": {}, "order": 7, "mode": 0, "inputs": [ { "name": "image", "type": "IMAGE", "link": 7 } ], "outputs": [ { "name": "width", "type": "INT", "links": [ 13 ], "slot_index": 0 }, { "name": "height", "type": "INT", "links": [ 14 ], "slot_index": 1 }, { "name": "batch_size", "type": "INT", "links": [], "slot_index": 2 } ], "properties": { "Node name for S&R": "GetImageSize" }, "widgets_values": [], "title": "Source size → target latent" }, { "id": 9, "type": "VAEEncode", "pos": [ 440, 920 ], "size": [ 300, 46 ], "flags": {}, "order": 8, "mode": 0, "inputs": [ { "name": "pixels", "type": "IMAGE", "link": 8 }, { "name": "vae", "type": "VAE", "link": 9 } ], "outputs": [ { "name": "LATENT", "type": "LATENT", "links": [ 12 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "VAEEncode" }, "title": "VAE Encode Source" }, { "id": 10, "type": "Krea2EditModelPatch", "pos": [ 760, 460 ], "size": [ 300, 46 ], "flags": {}, "order": 9, "mode": 0, "inputs": [ { "name": "model", "type": "MODEL", "link": 3 }, { "name": "source_latent", "type": "LATENT", "link": 12 } ], "outputs": [ { "name": "MODEL", "type": "MODEL", "links": [ 15 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "Krea2EditModelPatch", "aux_id": "lbouaraba/comfyui-krea2edit", "ver": "17af88332728c97ab5c7d26296b2cae59c935976" }, "widgets_values": [], "title": "Krea2 Edit (source patch)" }, { "id": 11, "type": "Krea2EditGroundedEncode", "pos": [ 440, 60 ], "size": [ 420, 190 ], "flags": {}, "order": 10, "mode": 0, "inputs": [ { "name": "clip", "type": "CLIP", "link": 4 }, { "name": "image", "type": "IMAGE", "link": 10 } ], "outputs": [ { "name": "CONDITIONING", "type": "CONDITIONING", "links": [ 16 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "Krea2EditGroundedEncode", "aux_id": "lbouaraba/comfyui-krea2edit", "ver": "17af88332728c97ab5c7d26296b2cae59c935976" }, "widgets_values": [ "change the background to a beach at sunset", 768 ], "title": "Edit Instruction (grounded on source)" }, { "id": 12, "type": "Krea2EditGroundedEncode", "pos": [ 440, 300 ], "size": [ 420, 130 ], "flags": {}, "order": 11, "mode": 0, "inputs": [ { "name": "clip", "type": "CLIP", "link": 5 }, { "name": "image", "type": "IMAGE", "link": 11 } ], "outputs": [ { "name": "CONDITIONING", "type": "CONDITIONING", "links": [ 17 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "Krea2EditGroundedEncode", "aux_id": "lbouaraba/comfyui-krea2edit", "ver": "17af88332728c97ab5c7d26296b2cae59c935976" }, "widgets_values": [ "", 768 ], "title": "Negative (grounded, empty — used at CFG > 1)" }, { "id": 13, "type": "EmptySD3LatentImage", "pos": [ 760, 620 ], "size": [ 300, 106 ], "flags": {}, "order": 12, "mode": 0, "inputs": [ { "name": "width", "type": "INT", "link": 13, "widget": { "name": "width" } }, { "name": "height", "type": "INT", "link": 14, "widget": { "name": "height" } } ], "outputs": [ { "name": "LATENT", "type": "LATENT", "links": [ 18 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "EmptySD3LatentImage" }, "widgets_values": [ 1024, 1024, 1 ], "title": "Target Latent (auto-sized from source)" }, { "id": 14, "type": "KSampler", "pos": [ 1120, 60 ], "size": [ 315, 262 ], "flags": {}, "order": 13, "mode": 0, "inputs": [ { "name": "model", "type": "MODEL", "link": 15 }, { "name": "positive", "type": "CONDITIONING", "link": 16 }, { "name": "negative", "type": "CONDITIONING", "link": 17 }, { "name": "latent_image", "type": "LATENT", "link": 18 } ], "outputs": [ { "name": "LATENT", "type": "LATENT", "links": [ 19 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "KSampler" }, "widgets_values": [ 42, "randomize", 10, 1.0, "euler", "simple", 1.0 ] }, { "id": 15, "type": "VAEDecode", "pos": [ 1120, 380 ], "size": [ 210, 46 ], "flags": {}, "order": 14, "mode": 0, "inputs": [ { "name": "samples", "type": "LATENT", "link": 19 }, { "name": "vae", "type": "VAE", "link": 20 } ], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 21 ], "slot_index": 0 } ], "properties": { "Node name for S&R": "VAEDecode" } }, { "id": 16, "type": "SaveImage", "pos": [ 1120, 480 ], "size": [ 360, 270 ], "flags": {}, "order": 15, "mode": 0, "inputs": [ { "name": "images", "type": "IMAGE", "link": 21 } ], "outputs": [], "properties": { "Node name for S&R": "SaveImage" }, "widgets_values": [ "krea2_turbo_edit" ] }, { "id": 17, "type": "MarkdownNote", "pos": [ 1500, 60 ], "size": [ 520, 420 ], "flags": {}, "order": 16, "mode": 0, "inputs": [], "outputs": [], "properties": { "Node name for S&R": "MarkdownNote" }, "widgets_values": [ "## Krea 2 — instruction-based image editing (Identity Edit LoRA, single reference)\n\nTurns Krea 2 from text-to-image into an instruction-based image editor (background swaps, restyles, object changes) using one LoRA — no separate edit model. From [Benji's AI Playground video](https://www.youtube.com/watch?v=QW2Wp6WjQF4).\n\n**Required:** `krea2_identity_edit_v1_1.safetensors` ([conradlocke/krea2-identity-edit](https://huggingface.co/conradlocke/krea2-identity-edit)) at strength 1.0, plus the [comfyui-krea2edit](https://github.com/lbouaraba/comfyui-krea2edit) node pack. **Krea2 Edit (source patch)** injects the VAE-encoded source as clean context tokens; **Krea2 Edit (grounded encode)** encodes the instruction while the text encoder sees the source image. Do not bypass either.\n\n**Prompting:** plain-English instructions — `change the background to a beach at sunset`, `make his jacket red`.\n\n**Resolution:** the *Input max size* INT sets the render's longest edge (default 1280), same control as qwen-edit-turbo-v4. The source keeps its aspect ratio and the target latent auto-follows its post-scale size. Keep total area ≤2MP (the LoRA's trained ceiling); at native-resolution inputs just raise/lower this one INT.\n\n**grounding_px** (on the grounded-encode nodes): 384–768 trained range. Lower = stronger edit adherence, higher = stronger identity/likeness. 768 default.\n\n**Turbo vs Raw:** turbo (this file) = 10 steps / CFG 1.0 / euler. For removals or large deletions the LoRA author recommends the raw model: swap UNETLoader to `krea2_raw_bf16.safetensors`, 20 steps / CFG 3.0 — the empty grounded negative is already wired for CFG > 1.\n\n**Face detail:** at ~1MP faces can come back soft; run a second pass or an upscaler for production quality." ], "title": "About this workflow" } ], "links": [ [ 1, 6, 0, 7, 1, "INT" ], [ 2, 1, 0, 2, 0, "MODEL" ], [ 3, 2, 0, 10, 0, "MODEL" ], [ 4, 3, 0, 11, 0, "CLIP" ], [ 5, 3, 0, 12, 0, "CLIP" ], [ 6, 5, 0, 7, 0, "IMAGE" ], [ 7, 7, 0, 8, 0, "IMAGE" ], [ 8, 7, 0, 9, 0, "IMAGE" ], [ 9, 4, 0, 9, 1, "VAE" ], [ 10, 7, 0, 11, 1, "IMAGE" ], [ 11, 7, 0, 12, 1, "IMAGE" ], [ 12, 9, 0, 10, 1, "LATENT" ], [ 13, 8, 0, 13, 0, "INT" ], [ 14, 8, 1, 13, 1, "INT" ], [ 15, 10, 0, 14, 0, "MODEL" ], [ 16, 11, 0, 14, 1, "CONDITIONING" ], [ 17, 12, 0, 14, 2, "CONDITIONING" ], [ 18, 13, 0, 14, 3, "LATENT" ], [ 19, 14, 0, 15, 0, "LATENT" ], [ 20, 4, 0, 15, 1, "VAE" ], [ 21, 15, 0, 16, 0, "IMAGE" ] ], "groups": [], "config": {}, "extra": {}, "version": 0.4 }