Files
fblissjr-ComfyUI-QwenImageW…/example_workflows/test_1_frame_bridge.json
T
Fred Bliss 4a091e9298 Fix coordinate handling and make object_ref optional
- Fixed generateTokens to properly handle different region types (bounding_box, polygon, object_reference)
- Added checkbox UI to control includeObjectRef for boxes/polygons
- Object references now correctly handle 2 coordinates instead of expecting 4
- Updated Python code to respect includeObjectRef flag from JavaScript
- Fixed coordinate format issues (x1,y1,x2,y2 for boxes, x,y pairs for polygons)
- Restored updateBasePromptWithTokens function for editable prompts
- Default behavior keeps object_ref (checkbox checked) for backward compatibility
- Without object_ref, generates pure spatial tokens like <|box_start|>0.1,0.2,0.3,0.4<|box_end|>
2025-09-06 09:33:32 -05:00

195 lines
5.2 KiB
JSON

{
"last_node_id": 10,
"last_link_id": 12,
"nodes": [
{
"id": 1,
"type": "LoadImage",
"pos": [50, 100],
"size": {"0": 315, "1": 314},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{"name": "IMAGE", "type": "IMAGE", "links": [1], "slot_index": 0},
{"name": "MASK", "type": "MASK", "links": null}
],
"properties": {"Node name for S&R": "LoadImage"},
"widgets_values": ["example.png", "image"]
},
{
"id": 2,
"type": "QwenImageEncode",
"pos": [400, 100],
"size": {"0": 315, "1": 100},
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{"name": "image", "type": "IMAGE", "link": 1}
],
"outputs": [
{"name": "LATENT", "type": "LATENT", "links": [2], "slot_index": 0}
],
"properties": {"Node name for S&R": "QwenImageEncode"},
"widgets_values": ["a green ogre named shrek"]
},
{
"id": 3,
"type": "QwenWANUnifiedBridge",
"pos": [750, 100],
"size": {"0": 350, "1": 200},
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{"name": "qwen_latent", "type": "LATENT", "link": 2}
],
"outputs": [
{"name": "image_embeds", "type": "WANVIDIMAGE_EMBEDS", "links": [3], "slot_index": 0},
{"name": "aligned_text_embeds", "type": "WANVIDTEXT_EMBEDS", "links": null},
{"name": "report", "type": "STRING", "links": [10]}
],
"properties": {"Node name for S&R": "QwenWANUnifiedBridge"},
"widgets_values": [1, "statistical", true, 0.7]
},
{
"id": 4,
"type": "WanVideoModelLoader",
"pos": [50, 450],
"size": {"0": 315, "1": 100},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{"name": "model", "type": "MODEL", "links": [4]}
],
"properties": {"Node name for S&R": "WanVideoModelLoader"},
"widgets_values": ["wan2.2_i2v_high.safetensors"]
},
{
"id": 5,
"type": "WanVideoSampler",
"pos": [1150, 100],
"size": {"0": 350, "1": 300},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{"name": "model", "type": "MODEL", "link": 4},
{"name": "image_embeds", "type": "WANVIDIMAGE_EMBEDS", "link": 3},
{"name": "positive", "type": "WANVIDTEXT_EMBEDS", "link": 5},
{"name": "negative", "type": "WANVIDTEXT_EMBEDS", "link": 6}
],
"outputs": [
{"name": "samples", "type": "LATENT", "links": [7]}
],
"properties": {"Node name for S&R": "WanVideoSampler"},
"widgets_values": [
20,
7.0,
"DPM-Solver++",
"2m",
"karras",
1.0,
0,
true
]
},
{
"id": 6,
"type": "WanVideoTextEncode",
"pos": [400, 450],
"size": {"0": 350, "1": 100},
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{"name": "model", "type": "MODEL", "link": 4}
],
"outputs": [
{"name": "conditioning", "type": "WANVIDTEXT_EMBEDS", "links": [5]}
],
"properties": {"Node name for S&R": "WanVideoTextEncode"},
"widgets_values": ["a green ogre named shrek, high quality"]
},
{
"id": 7,
"type": "WanVideoTextEncode",
"pos": [400, 600],
"size": {"0": 350, "1": 100},
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{"name": "model", "type": "MODEL", "link": 4}
],
"outputs": [
{"name": "conditioning", "type": "WANVIDTEXT_EMBEDS", "links": [6]}
],
"properties": {"Node name for S&R": "WanVideoTextEncode"},
"widgets_values": ["blurry, low quality"]
},
{
"id": 8,
"type": "WanVideoDecode",
"pos": [1550, 100],
"size": {"0": 315, "1": 100},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{"name": "samples", "type": "LATENT", "link": 7}
],
"outputs": [
{"name": "video", "type": "IMAGE", "links": [8]}
],
"properties": {"Node name for S&R": "WanVideoDecode"}
},
{
"id": 9,
"type": "PreviewImage",
"pos": [1900, 100],
"size": {"0": 315, "1": 314},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{"name": "images", "type": "IMAGE", "link": 8}
],
"properties": {"Node name for S&R": "PreviewImage"}
},
{
"id": 10,
"type": "ShowText",
"pos": [750, 350],
"size": {"0": 350, "1": 200},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{"name": "text", "type": "STRING", "link": 10}
],
"outputs": [
{"name": "STRING", "type": "STRING", "links": null}
],
"properties": {"Node name for S&R": "ShowText"},
"widgets_values": [""]
}
],
"links": [
[1, 1, 0, 2, 0, "IMAGE"],
[2, 2, 0, 3, 0, "LATENT"],
[3, 3, 0, 5, 1, "WANVIDIMAGE_EMBEDS"],
[4, 4, 0, 5, 0, "MODEL"],
[5, 6, 0, 5, 2, "WANVIDTEXT_EMBEDS"],
[6, 7, 0, 5, 3, "WANVIDTEXT_EMBEDS"],
[7, 5, 0, 8, 0, "LATENT"],
[8, 8, 0, 9, 0, "IMAGE"],
[10, 3, 2, 10, 0, "STRING"]
],
"groups": [],
"config": {},
"extra": {},
"version": 0.4
}