Files
fblissjr-ComfyUI-QwenImageW…/example_workflows/1_qwen_t2i_basic.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

136 lines
3.5 KiB
JSON

{
"last_node_id": 10,
"last_link_id": 15,
"nodes": [
{
"id": 1,
"type": "CheckpointLoaderSimple",
"pos": [50, 200],
"size": {"0": 315, "1": 98},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{"name": "MODEL", "type": "MODEL", "links": [1]},
{"name": "CLIP", "type": "CLIP", "links": [2]},
{"name": "VAE", "type": "VAE", "links": [3]}
],
"properties": {"Node name for S&R": "CheckpointLoaderSimple"},
"widgets_values": ["qwen-image-edit.safetensors"]
},
{
"id": 2,
"type": "QwenImageEditTextEncoder",
"pos": [400, 200],
"size": {"0": 400, "1": 300},
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{"name": "clip", "type": "CLIP", "link": 2},
{"name": "vae", "type": "VAE", "link": 3}
],
"outputs": [
{"name": "conditioning", "type": "CONDITIONING", "links": [4]},
{"name": "edit_latent", "type": "LATENT", "links": [5]},
{"name": "encode_info", "type": "DICT", "links": [6]}
],
"properties": {"Node name for S&R": "QwenImageEditTextEncoder"},
"widgets_values": [
"A majestic mountain landscape at sunset, snow-capped peaks reflecting golden light, pine forests in the foreground",
"text_to_image",
true,
1048576,
true,
false
]
},
{
"id": 3,
"type": "EmptyLatentImage",
"pos": [400, 550],
"size": {"0": 315, "1": 106},
"flags": {},
"order": 2,
"mode": 0,
"outputs": [
{"name": "LATENT", "type": "LATENT", "links": [7]}
],
"properties": {"Node name for S&R": "EmptyLatentImage"},
"widgets_values": [1024, 1024, 1]
},
{
"id": 4,
"type": "KSampler",
"pos": [850, 200],
"size": {"0": 315, "1": 262},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{"name": "model", "type": "MODEL", "link": 1},
{"name": "positive", "type": "CONDITIONING", "link": 4},
{"name": "negative", "type": "CONDITIONING", "link": null},
{"name": "latent_image", "type": "LATENT", "link": 7}
],
"outputs": [
{"name": "LATENT", "type": "LATENT", "links": [8]}
],
"properties": {"Node name for S&R": "KSampler"},
"widgets_values": [
42,
"fixed",
30,
4.0,
"euler",
"normal",
1.0
]
},
{
"id": 5,
"type": "VAEDecode",
"pos": [1200, 200],
"size": {"0": 210, "1": 46},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{"name": "samples", "type": "LATENT", "link": 8},
{"name": "vae", "type": "VAE", "link": 3}
],
"outputs": [
{"name": "IMAGE", "type": "IMAGE", "links": [9]}
],
"properties": {"Node name for S&R": "VAEDecode"}
},
{
"id": 6,
"type": "SaveImage",
"pos": [1450, 200],
"size": {"0": 315, "1": 270},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{"name": "images", "type": "IMAGE", "link": 9}
],
"properties": {"Node name for S&R": "SaveImage"},
"widgets_values": ["qwen_t2i"]
}
],
"links": [
[1, 1, 0, 4, 0, "MODEL"],
[2, 1, 1, 2, 0, "CLIP"],
[3, 1, 2, 2, 1, "VAE"],
[3, 1, 2, 5, 1, "VAE"],
[4, 2, 0, 4, 1, "CONDITIONING"],
[7, 3, 0, 4, 3, "LATENT"],
[8, 4, 0, 5, 0, "LATENT"],
[9, 5, 0, 6, 0, "IMAGE"]
],
"groups": [],
"config": {},
"extra": {},
"version": 0.4
}