Files
CthomasdesignandClaude Opus 4.8 3ec843606c feat: two-reference grounded edits + preprocess robustness fix
Generalize the grounded encode to N reference images (scene + subject):
both go through the vision tower with a per-image <vision> block, spliced
and deepstack-injected at their own token positions, with multi-image
get_rope_index. Validated vs full torch Qwen3-VL — two-image grounded tap
matches to cosine 1.0, mean|Δ| 3.1e-5 (single-image unchanged). generate_edit
now feeds both image + image_b through grounding when grounding_px > 0.

Fix a ZeroDivisionError in preprocess: max_pixels is now clamped so a tiny
grounding_px (e.g. from a stale workflow whose widgets predate the
grounding_px control) can't zero the area ceiling. The example edit
workflow gains the grounding_px widget so its values align with the node.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 20:37:02 -04:00

103 lines
2.7 KiB
JSON

{
"last_node_id": 6,
"last_link_id": 4,
"nodes": [
{
"id": 1,
"type": "Krea2ModelLoader",
"pos": [80, 100],
"size": [340, 60],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{ "name": "krea2_pipe", "type": "KREA2_PIPE", "links": [1], "slot_index": 0 }
],
"properties": { "Node name for S&R": "Krea2ModelLoader" },
"widgets_values": ["transformer_mixed_4_8.safetensors"]
},
{
"id": 6,
"type": "Krea2LoRA",
"pos": [80, 200],
"size": [340, 100],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{ "name": "lora_stack", "type": "KREA2_LORASTACK", "link": null }
],
"outputs": [
{ "name": "lora_stack", "type": "KREA2_LORASTACK", "links": [4], "slot_index": 0 }
],
"properties": { "Node name for S&R": "Krea2LoRA" },
"widgets_values": ["krea2_identity_edit_v1.safetensors", 1.0]
},
{
"id": 5,
"type": "LoadImage",
"pos": [80, 340],
"size": [340, 320],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{ "name": "IMAGE", "type": "IMAGE", "links": [2], "slot_index": 0 },
{ "name": "MASK", "type": "MASK", "links": null, "slot_index": 1 }
],
"properties": { "Node name for S&R": "LoadImage" },
"widgets_values": ["example.png", "image"]
},
{
"id": 2,
"type": "Krea2Edit",
"pos": [460, 100],
"size": [360, 320],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{ "name": "krea2_pipe", "type": "KREA2_PIPE", "link": 1 },
{ "name": "image", "type": "IMAGE", "link": 2 },
{ "name": "image_b", "type": "IMAGE", "link": null },
{ "name": "lora_stack", "type": "KREA2_LORASTACK", "link": 4 }
],
"outputs": [
{ "name": "IMAGE", "type": "IMAGE", "links": [3], "slot_index": 0 }
],
"properties": { "Node name for S&R": "Krea2Edit" },
"widgets_values": [
"the same person wearing a blue t-shirt",
768, 1024, 8, 0, "fixed", 1, 768, true
]
},
{
"id": 3,
"type": "SaveImage",
"pos": [880, 100],
"size": [400, 420],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{ "name": "images", "type": "IMAGE", "link": 3 }
],
"outputs": [],
"properties": { "Node name for S&R": "SaveImage" },
"widgets_values": ["krea2_edit"]
}
],
"links": [
[1, 1, 0, 2, 0, "KREA2_PIPE"],
[2, 5, 0, 2, 1, "IMAGE"],
[3, 2, 0, 3, 0, "IMAGE"],
[4, 6, 0, 2, 3, "KREA2_LORASTACK"]
],
"groups": [],
"config": {},
"extra": {},
"version": 0.4
}