Files
fblissjr-ComfyUI-QwenImageW…/example_workflows/qwen_native_example.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
2.4 KiB
JSON

{
"7": {
"inputs": {
"model_path": "Qwen/Qwen-Image-Edit",
"device": "auto",
"dtype": "auto",
"low_vram": false,
"quantization": "none",
"model_variant": "edit",
"trust_remote_code": true,
"cache_dir": ""
},
"class_type": "QwenNativeLoader",
"_meta": {
"title": "Qwen Native Loader"
}
},
"8": {
"inputs": {
"qwen_model": [
"7",
0
],
"qwen_processor": [
"7",
1
],
"text": "A serene mountain landscape with crystal clear lakes, painted in watercolor style",
"chat_template": true,
"system_prompt": "",
"template_style": "default",
"resolution": "auto",
"use_processor": true,
"template_dropping": "fixed",
"debug_tokens": true,
"debug_vision": true,
"performance_mode": "quality"
},
"class_type": "QwenNativeEncoder",
"_meta": {
"title": "Qwen Native Encoder"
}
},
"9": {
"inputs": {
"width": 1024,
"height": 1024,
"batch_size": 1
},
"class_type": "EmptyLatentImage",
"_meta": {
"title": "Empty Latent Image"
}
},
"10": {
"inputs": {
"seed": 123456789,
"steps": 28,
"cfg": 7.0,
"sampler_name": "dpmpp_2m",
"scheduler": "karras",
"denoise": 1.0,
"model": [
"11",
0
],
"positive": [
"8",
0
],
"negative": [
"12",
0
],
"latent_image": [
"9",
0
]
},
"class_type": "KSampler",
"_meta": {
"title": "KSampler"
}
},
"11": {
"inputs": {
"ckpt_name": "juggernaut_final.safetensors"
},
"class_type": "CheckpointLoaderSimple",
"_meta": {
"title": "Load Checkpoint"
}
},
"12": {
"inputs": {
"text": "",
"clip": [
"11",
1
]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"13": {
"inputs": {
"samples": [
"10",
0
],
"vae": [
"11",
2
]
},
"class_type": "VAEDecode",
"_meta": {
"title": "VAE Decode"
}
},
"14": {
"inputs": {
"filename_prefix": "qwen_native_test",
"images": [
"13",
0
]
},
"class_type": "SaveImage",
"_meta": {
"title": "Save Image"
}
}
}