The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(image): Qwen Image 2.1 Turbo runs its own 8-step schedule (Discord 28.10.2026)
purple35f1c32461bc
diff --git a/src/api/__tests__/fixtures/comfy-ui/templates/SOURCE.md b/src/api/__tests__/fixtures/comfy-ui/templates/SOURCE.mdindex 911fc73d..1fc6a31b 100644--- a/src/api/__tests__/fixtures/comfy-ui/templates/SOURCE.md+++ b/src/api/__tests__/fixtures/comfy-ui/templates/SOURCE.md@@ -20,6 +20,18 @@ file last changed in e7cd011d4ded3411c2f481200544f0be6fdc962e, git blob15a7d911874f48957dd0fe0d5e3dd15047fc73a9). Same MIT license (LICENSE of thatrepository). Unchanged.+The three Qwen-Image 2.1 templates come from the same repository at the same+commit 14220b8bd3e86baa852959f17039613191e66656, paths+`templates/<file>`, unchanged, MIT license (LICENSE of that repository).+Used by `qwen-image-21-turbo.test.ts` (the Turbo sampler chain, Discord+28.10.2026) and read for their node classes, sigmas, cfg and sampler only.++| File | SHA-256 | Used for |+|---|---|---|+| image_qwen_image_2_1_turbo_t2i.json | 3eb9cef2866c0186fbe30172701f112b35e574cf3c6575c6e4a6b5dd1e76a403 | Turbo: QwenImage21Cache, CFGGuider cfg 1, KSamplerSelect euler, RandomNoise, ManualSigmas, SamplerCustomAdvanced |+| image_qwen_image_2_1_t2i.json | 5f2b50eeaf27e56a45456681ad5319df1ae51243d9653ac3f92c7dc05d1e1503 | full model: QwenImage21Cache, KSampler 25 / 1 / euler / simple |+| image_qwen_image_2_1_turbo_image_edit.json | 5a9622d550866800414afcb9c70523ec5c6965eb171476e401e243a7fe8d5a4e | Turbo edit: the same sigmas; CFGGuider shows a widget value of 8, but its cfg input is linked to the subgraph input "cfg", which the outer node sets to 1 |+## ../object-info-ltx25.jsonWhat `/object_info` serves for the 32 node types of `video_ltx2_5_i2v.json`,diff --git a/src/api/__tests__/fixtures/comfy-ui/templates/image_qwen_image_2_1_t2i.json b/src/api/__tests__/fixtures/comfy-ui/templates/image_qwen_image_2_1_t2i.jsonnew file mode 100644index 00000000..d6c27aa5--- /dev/null+++ b/src/api/__tests__/fixtures/comfy-ui/templates/image_qwen_image_2_1_t2i.json@@ -0,0 +1,1869 @@+{+ "id": "54bb395d-3e60-4c94-b525-85523901575b",+ "revision": 0,+ "last_node_id": 483,+ "last_link_id": 713,+ "nodes": [+ {+ "id": 13,+ "type": "ResolutionSelector",+ "pos": [+ 580,+ 2750+ ],+ "size": [+ 300,+ 190+ ],+ "flags": {},+ "order": 0,+ "mode": 0,+ "showAdvanced": false,+ "inputs": [],+ "outputs": [+ {+ "name": "width",+ "type": "INT",+ "links": [+ 670+ ]+ },+ {+ "name": "height",+ "type": "INT",+ "links": [+ 671+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "ResolutionSelector"+ },+ "widgets_values": [+ "1:1 (Square)",+ 1,+ 8+ ],+ "widgets_values_named": {+ "aspect_ratio": "1:1 (Square)",+ "megapixels": 1,+ "multiple": 8+ }+ },+ {+ "id": 459,+ "type": "c291ceec-b98f-4751-9d0b-7bc288f27b30",+ "pos": [+ 920,+ 2470+ ],+ "size": [+ 410,+ 610+ ],+ "flags": {},+ "order": 4,+ "mode": 0,+ "inputs": [+ {+ "label": "positive_prompt",+ "name": "prompt",+ "type": "STRING",+ "widget": {+ "name": "prompt"+ },+ "link": null+ },+ {+ "label": "refine_prompt",+ "name": "switch",+ "type": "BOOLEAN",+ "widget": {+ "name": "switch"+ },+ "link": null+ },+ {+ "label": "thinking_mode",+ "name": "thinking",+ "shape": 7,+ "type": "BOOLEAN",+ "widget": {+ "name": "thinking"+ },+ "link": null+ },+ {+ "label": "steps",+ "name": "steps",+ "type": "INT",+ "widget": {+ "name": "steps"+ },+ "link": null+ },+ {+ "name": "width",+ "type": "INT",+ "widget": {+ "name": "width"+ },+ "link": 670+ },+ {+ "name": "height",+ "type": "INT",+ "widget": {+ "name": "height"+ },+ "link": 671+ },+ {+ "label": "sampler",+ "name": "scheduler",+ "type": "COMBO",+ "widget": {+ "name": "scheduler"+ },+ "link": null+ },+ {+ "label": "scheduler",+ "name": "scheduler_1",+ "type": "COMBO",+ "widget": {+ "name": "scheduler_1"+ },+ "link": null+ },+ {+ "label": "PE_model",+ "name": "clip_name_1",+ "type": "COMBO",+ "widget": {+ "name": "clip_name_1"+ },+ "link": null+ },+ {+ "label": "cache_device",+ "name": "device",+ "type": "COMBO",+ "widget": {+ "name": "device"+ },+ "link": null+ },+ {+ "label": "dtype",+ "name": "dtype_1",+ "type": "COMBO",+ "widget": {+ "name": "dtype_1"+ },+ "link": null+ }+ ],+ "outputs": [+ {+ "name": "IMAGE",+ "type": "IMAGE",+ "links": [+ 672+ ]+ }+ ],+ "properties": {+ "previewExposures": []+ },+ "widgets_values": [+ "Greyscale fashion editorial portrait of an avant-garde woman tilted upwards in profile, captured with striking high-contrast chiaroscuro lighting. She wears oversized, thick-rimmed circular black sunglasses with matte dark lenses, concealing her upward gaze. Her attire merges high couture with tactical abstraction: a high-necked structural dress tailored from heavyweight fabric featuring a disrupted optical camouflage pattern—interlocking oversized polka dots, pixelated stippling, and organic contour blotches in stark monochrome that mimic military disruptive patterns in a refined runway style. Around her shoulders, asymmetric pleated webbing and tailored cargo straps are integrated seamlessly into the garment’s architecture. In her gloved hand, she clutches a structured matte-leather geometric handbag accented with subtle tactical buckles, utility stitching, and dark brushed-metal hardware. Her skin texture is rendered with hyper-detailed clarity, sculpted by intense, razor-sharp studio key light and deep graphite shadows. The striking background is a vivid mixed-media graphic collage, composed of flat vibrant lime green planes, stark black and white overlapping circles, segmented semi-circles with bold zebra striping, dense micro-halftone dot matrices, and vector topographic contour lines. The clash between monochromatic disruptive camo elements on her clothing and the saturated, retro-futuristic pop-art backdrop creates an intense visual dissonance, emphasizing sharp silhouettes, paper cut-out edges, dynamic compositional balance, and clean graphic novel textures. Absolutely no text, no typography, no letters, no words, no numbers, no logos, no watermark, no captions, pure imagery only.",+ false,+ false,+ 4096,+ "",+ 1,+ 25,+ 1024,+ 1024,+ "euler",+ "simple",+ 447606998181262,+ "qwen_image_2.1_int8_convrot.safetensors",+ "qwen3vl_8b_int8_convrot.safetensors",+ "qwen_image_2.1_vae_bf16.safetensors",+ "qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",+ "auto",+ "default"+ ],+ "widgets_values_named": {+ "prompt": "Greyscale fashion editorial portrait of an avant-garde woman tilted upwards in profile, captured with striking high-contrast chiaroscuro lighting. She wears oversized, thick-rimmed circular black sunglasses with matte dark lenses, concealing her upward gaze. Her attire merges high couture with tactical abstraction: a high-necked structural dress tailored from heavyweight fabric featuring a disrupted optical camouflage pattern—interlocking oversized polka dots, pixelated stippling, and organic contour blotches in stark monochrome that mimic military disruptive patterns in a refined runway style. Around her shoulders, asymmetric pleated webbing and tailored cargo straps are integrated seamlessly into the garment’s architecture. In her gloved hand, she clutches a structured matte-leather geometric handbag accented with subtle tactical buckles, utility stitching, and dark brushed-metal hardware. Her skin texture is rendered with hyper-detailed clarity, sculpted by intense, razor-sharp studio key light and deep graphite shadows. The striking background is a vivid mixed-media graphic collage, composed of flat vibrant lime green planes, stark black and white overlapping circles, segmented semi-circles with bold zebra striping, dense micro-halftone dot matrices, and vector topographic contour lines. The clash between monochromatic disruptive camo elements on her clothing and the saturated, retro-futuristic pop-art backdrop creates an intense visual dissonance, emphasizing sharp silhouettes, paper cut-out edges, dynamic compositional balance, and clean graphic novel textures. Absolutely no text, no typography, no letters, no words, no numbers, no logos, no watermark, no captions, pure imagery only.",+ "switch": false,+ "thinking": false,+ "max_length": 4096,+ "negative_prompt": "",+ "cfg": 1,+ "steps": 25,+ "width": 1024,+ "height": 1024,+ "scheduler": "euler",+ "scheduler_1": "simple",+ "seed": 447606998181262,+ "unet_name": "qwen_image_2.1_int8_convrot.safetensors",+ "clip_name": "qwen3vl_8b_int8_convrot.safetensors",+ "vae_name": "qwen_image_2.1_vae_bf16.safetensors",+ "clip_name_1": "qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",+ "device": "auto",+ "dtype_1": "default"+ }+ },+ {+ "id": 461,+ "type": "SaveImageAdvanced",+ "pos": [+ 1830,+ 2470+ ],+ "size": [+ 850,+ 610+ ],+ "flags": {},+ "order": 5,+ "mode": 0,+ "inputs": [+ {+ "name": "images",+ "type": "IMAGE",+ "link": 672+ }+ ],+ "outputs": [+ {+ "name": "images",+ "type": "IMAGE",+ "links": []+ }+ ],+ "properties": {},+ "widgets_values": [+ "Qwen_image_2.1",+ "png",+ "8-bit",+ "sRGB"+ ],+ "widgets_values_named": {+ "filename_prefix": "Qwen_image_2.1",+ "format": "png",+ "format.bit_depth": "8-bit",+ "format.input_color_space": "sRGB"+ }+ },+ {+ "id": 463,+ "type": "MarkdownNote",+ "pos": [+ -350,+ 2470+ ],+ "size": [+ 420,+ 620+ ],+ "flags": {},+ "order": 1,+ "mode": 0,+ "inputs": [],+ "outputs": [],+ "title": "Note: Model links",+ "properties": {},+ "widgets_values": [+ "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Model Links\n\n- [Hugging Face:Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1)\n- [ModelScope:Comfy-Org/Qwen-Image-2.1](https://modelscope.cn/models/Comfy-Org/Qwen-Image-2.1)\n\n**diffusion_models**\n\n- [qwen_image_2.1_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_int8_convrot.safetensors) (6.76 GB)\n\n**text_encoders**\n\n- [qwen3vl_8b_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors) (8.71 GB)\n- [qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors) (8.82 GB)\n\n**vae**\n\n- [qwen_image_2.1_vae_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors) (644.2 MB)\n\n\n## Model Storage Location\n\n```\n📂 ComfyUI/\n├── 📂 models/\n│ ├── 📂 diffusion_models/\n│ │ └── qwen_image_2.1_int8_convrot.safetensors\n│ ├── 📂 text_encoders/\n│ │ ├── qwen3vl_8b_int8_convrot.safetensors\n│ │ └── qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors\n│ └── 📂 vae/\n│ └── qwen_image_2.1_vae_bf16.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"+ ],+ "widgets_values_named": {+ "text": "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Model Links\n\n- [Hugging Face:Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1)\n- [ModelScope:Comfy-Org/Qwen-Image-2.1](https://modelscope.cn/models/Comfy-Org/Qwen-Image-2.1)\n\n**diffusion_models**\n\n- [qwen_image_2.1_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_int8_convrot.safetensors) (6.76 GB)\n\n**text_encoders**\n\n- [qwen3vl_8b_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors) (8.71 GB)\n- [qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors) (8.82 GB)\n\n**vae**\n\n- [qwen_image_2.1_vae_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors) (644.2 MB)\n\n\n## Model Storage Location\n\n```\n📂 ComfyUI/\n├── 📂 models/\n│ ├── 📂 diffusion_models/\n│ │ └── qwen_image_2.1_int8_convrot.safetensors\n│ ├── 📂 text_encoders/\n│ │ ├── qwen3vl_8b_int8_convrot.safetensors\n│ │ └── qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors\n│ └── 📂 vae/\n│ └── qwen_image_2.1_vae_bf16.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"+ },+ "color": "#222",+ "bgcolor": "#000"+ },+ {+ "id": 468,+ "type": "MarkdownNote",+ "pos": [+ 100,+ 2470+ ],+ "size": [+ 420,+ 220+ ],+ "flags": {},+ "order": 2,+ "mode": 0,+ "inputs": [],+ "outputs": [],+ "title": "Note: Usage",+ "properties": {},+ "widgets_values": [+ "## Size\nQwen Image 2.1 has native 2K (2048*2048) support for direct output.\n\nOutput size comes from ResolutionSelector (width/height). Default is 1 megapixel (1024*1024). For native 2K, set 1:1 and 4 megapixels (2048*2048). Prefer multiples of 32.\n\n## Transparent Image\n\nTo generate a transparent image, wrap the prompt like this and replace the middle with the subject:\n\n---\nThis is an RGBA format image with transparency. `[your description]`. The image has an alpha channel and a transparent background.\n\n---\nSave as PNG to keep the alpha channel.\n\n## Parameters\n\n- prompt: what to generate. For RGBA, see Note: transparent.\n- negative_prompt: unused while cfg is 1.\n- cfg: keep 1 for the Qwen Image 2.1 official path. Raise it only if you use a negative prompt.\n- steps: Qwen Image 2.1 official pipeline uses about 40-50 with euler. This template starts at 25. More advanced samplers need fewer steps.\n"+ ],+ "widgets_values_named": {+ "text": "## Size\nQwen Image 2.1 has native 2K (2048*2048) support for direct output.\n\nOutput size comes from ResolutionSelector (width/height). Default is 1 megapixel (1024*1024). For native 2K, set 1:1 and 4 megapixels (2048*2048). Prefer multiples of 32.\n\n## Transparent Image\n\nTo generate a transparent image, wrap the prompt like this and replace the middle with the subject:\n\n---\nThis is an RGBA format image with transparency. `[your description]`. The image has an alpha channel and a transparent background.\n\n---\nSave as PNG to keep the alpha channel.\n\n## Parameters\n\n- prompt: what to generate. For RGBA, see Note: transparent.\n- negative_prompt: unused while cfg is 1.\n- cfg: keep 1 for the Qwen Image 2.1 official path. Raise it only if you use a negative prompt.\n- steps: Qwen Image 2.1 official pipeline uses about 40-50 with euler. This template starts at 25. More advanced samplers need fewer steps.\n"+ },+ "color": "#222",+ "bgcolor": "#000"+ },+ {+ "id": 483,+ "type": "MarkdownNote",+ "pos": [+ 1350,+ 2590+ ],+ "size": [+ 420,+ 480+ ],+ "flags": {},+ "order": 3,+ "mode": 0,+ "inputs": [],+ "outputs": [],+ "title": "Note: PE",+ "properties": {},+ "widgets_values": [+ "## Prompt Enhancer\n\nThe prompt enhancer rewrites your prompt with the Qwen 3.5 prompt enhancer model before the image model sees it. These settings follow the official prompt enhancer release, and the ones you are most likely to change are exposed on the node.\n\n- `refine_prompt`: on runs the rewrite and feeds it to the image model, off passes your prompt through as written. On gives the image model a fuller prompt and usually better results; off skips the rewrite pass and the run finishes faster. This template starts with it off.\n- `thinking_mode`: turn this on together with the enhancer. The checkpoint was trained with a reasoning block and loses quality without it.\n- `max_length`: the token budget for the reasoning block plus the rewritten prompt, 4096 here. The official setting is 16256; this template caps it lower so a single rewrite cannot run for many minutes.\n- `sampling_mode`: the sampling values live inside the subgraph. They follow the official ones: `temperature` 1.0, `top_p` 0.95, `top_k` 20, `min_p` 0, `presence_penalty` 1.5, `repetition_penalty` 1.0.\n\nThe enhancer checkpoint and its system prompt live inside the subgraph."+ ],+ "widgets_values_named": {+ "text": "## Prompt Enhancer\n\nThe prompt enhancer rewrites your prompt with the Qwen 3.5 prompt enhancer model before the image model sees it. These settings follow the official prompt enhancer release, and the ones you are most likely to change are exposed on the node.\n\n- `refine_prompt`: on runs the rewrite and feeds it to the image model, off passes your prompt through as written. On gives the image model a fuller prompt and usually better results; off skips the rewrite pass and the run finishes faster. This template starts with it off.\n- `thinking_mode`: turn this on together with the enhancer. The checkpoint was trained with a reasoning block and loses quality without it.\n- `max_length`: the token budget for the reasoning block plus the rewritten prompt, 4096 here. The official setting is 16256; this template caps it lower so a single rewrite cannot run for many minutes.\n- `sampling_mode`: the sampling values live inside the subgraph. They follow the official ones: `temperature` 1.0, `top_p` 0.95, `top_k` 20, `min_p` 0, `presence_penalty` 1.5, `repetition_penalty` 1.0.\n\nThe enhancer checkpoint and its system prompt live inside the subgraph."+ },+ "color": "#222",+ "bgcolor": "#000"+ }+ ],+ "links": [+ [+ 670,+ 13,+ 0,+ 459,+ 4,+ "INT"+ ],+ [+ 671,+ 13,+ 1,+ 459,+ 5,+ "INT"+ ],+ [+ 672,+ 459,+ 0,+ 461,+ 0,+ "IMAGE"+ ]+ ],+ "groups": [],+ "definitions": {+ "subgraphs": [+ {+ "id": "c291ceec-b98f-4751-9d0b-7bc288f27b30",+ "version": 1,+ "state": {+ "lastGroupId": 38,+ "lastNodeId": 483,+ "lastLinkId": 713,+ "lastRerouteId": 9+ },+ "revision": 0,+ "config": {},+ "name": "Text to Image (Qwen Image 2.1)",+ "inputNode": {+ "id": -10,+ "bounding": [+ -660,+ 610,+ 143.044921875,+ 408+ ]+ },+ "outputNode": {+ "id": -20,+ "bounding": [+ 1960,+ 640,+ 128,+ 68+ ]+ },+ "inputs": [+ {+ "id": "6a73de3b-f4cd-43a4-9076-76648c6902f0",+ "name": "prompt",+ "type": "STRING",+ "linkIds": [+ 684,+ 711+ ],+ "localized_name": "prompt",+ "label": "positive_prompt",+ "pos": [+ -540.955078125,+ 634+ ]+ },+ {+ "id": "140602e4-2e82-49b4-b1d6-afa99d79a475",+ "name": "switch",+ "type": "BOOLEAN",+ "linkIds": [+ 688+ ],+ "label": "refine_prompt",+ "pos": [+ -540.955078125,+ 654+ ]+ },+ {+ "id": "e80f9a8b-0a83-40c8-ac0f-cc0bc633ed26",+ "name": "thinking",+ "type": "BOOLEAN",+ "linkIds": [+ 695+ ],+ "label": "thinking_mode",+ "pos": [+ -540.955078125,+ 674+ ]+ },+ {+ "id": "728d8016-b3b6-4b71-abe0-3fb23e5e96fa",+ "name": "max_length",+ "type": "INT",+ "linkIds": [+ 713+ ],+ "pos": [+ -540.955078125,+ 974+ ]+ },+ {+ "id": "d4c1377f-7fbc-4519-b83c-9a3b9c2de104",+ "name": "negative_prompt",+ "type": "STRING",+ "linkIds": [+ 657+ ],+ "pos": [+ -540.955078125,+ 694+ ]+ },+ {+ "id": "420ee896-17c3-4e07-95fc-0ff309a6b836",+ "name": "cfg",+ "type": "FLOAT",+ "linkIds": [+ 658+ ],+ "pos": [+ -540.955078125,+ 714+ ]+ },+ {+ "id": "349c3f72-ba7a-4277-84ff-8029faa16019",+ "name": "steps",+ "type": "INT",+ "linkIds": [+ 659+ ],+ "label": "steps",+ "pos": [+ -540.955078125,+ 734+ ]+ },+ {+ "id": "91c96cf8-057b-4da2-b71e-305541a3527e",+ "name": "width",+ "type": "INT",+ "linkIds": [+ 660+ ],+ "localized_name": "width",+ "pos": [+ -540.955078125,+ 754+ ]+ },+ {+ "id": "661cc520-6bd0-4925-90ec-cecaa188b57d",+ "name": "height",+ "type": "INT",+ "linkIds": [+ 661+ ],+ "localized_name": "height",+ "pos": [+ -540.955078125,+ 774+ ]+ },+ {+ "id": "9f0e91b8-5a4a-4f5a-a2a4-4ddc180df0fd",+ "name": "scheduler",+ "type": "COMBO",+ "linkIds": [+ 662+ ],+ "label": "sampler",+ "pos": [+ -540.955078125,+ 794+ ]+ },+ {+ "id": "4710583f-3cb0-4091-87ab-dadd8a2e657c",+ "name": "scheduler_1",+ "type": "COMBO",+ "linkIds": [+ 668+ ],+ "label": "scheduler",+ "pos": [+ -540.955078125,+ 814+ ]+ },+ {+ "id": "977ce57d-3764-491c-8d2d-543754cfbaf1",+ "name": "seed",+ "type": "INT",+ "linkIds": [+ 667,+ 697+ ],+ "pos": [+ -540.955078125,+ 834+ ]+ },+ {+ "id": "143494fb-a40e-423f-be3b-ecc808b408b0",+ "name": "unet_name",+ "type": "COMBO",+ "linkIds": [+ 663+ ],+ "pos": [+ -540.955078125,+ 854+ ]+ },+ {+ "id": "d8528289-e121-45ed-9c31-e6370ce4ba5e",+ "name": "clip_name",+ "type": "COMBO",+ "linkIds": [+ 664+ ],+ "pos": [+ -540.955078125,+ 874+ ]+ },+ {+ "id": "f03d1fb0-d592-4997-b55e-e7a2549c36e5",+ "name": "vae_name",+ "type": "COMBO",+ "linkIds": [+ 665+ ],+ "pos": [+ -540.955078125,+ 894+ ]+ },+ {+ "id": "e12b2532-5fcd-4f34-9ddd-71df7e5021c5",+ "name": "clip_name_1",+ "type": "COMBO",+ "linkIds": [+ 696+ ],+ "label": "PE_model",+ "pos": [+ -540.955078125,+ 914+ ]+ },+ {+ "id": "d2597afa-78fa-49f2-96cb-5fda1a3b9eee",+ "name": "device",+ "type": "COMBO",+ "linkIds": [+ 703+ ],+ "label": "cache_device",+ "pos": [+ -540.955078125,+ 934+ ]+ },+ {+ "id": "ef25ddbe-1463-4c53-9065-93aa867e77ab",+ "name": "dtype_1",+ "type": "COMBO",+ "linkIds": [+ 704+ ],+ "label": "dtype",+ "pos": [+ -540.955078125,+ 954+ ]+ }+ ],+ "outputs": [+ {+ "id": "f6f3effc-0961-4c17-b52c-a77c16ca6aa4",+ "name": "IMAGE",+ "type": "IMAGE",+ "linkIds": [+ 650+ ],+ "localized_name": "IMAGE",+ "pos": [+ 1984,+ 664+ ]+ }+ ],+ "widgets": [],+ "nodes": [+ {+ "id": 451,+ "type": "UNETLoader",+ "pos": [+ -190,+ 410+ ],+ "size": [+ 510,+ 90+ ],+ "flags": {},+ "order": 1,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "unet_name",+ "name": "unet_name",+ "type": "COMBO",+ "widget": {+ "name": "unet_name"+ },+ "link": 663+ }+ ],+ "outputs": [+ {+ "localized_name": "MODEL",+ "name": "MODEL",+ "type": "MODEL",+ "links": [+ 701+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "UNETLoader",+ "models": [+ {+ "name": "qwen_image_2.1_int8_convrot.safetensors",+ "url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_int8_convrot.safetensors",+ "directory": "diffusion_models"+ }+ ]+ },+ "widgets_values": [+ "qwen_image_2.1_int8_convrot.safetensors",+ "default"+ ],+ "widgets_values_named": {+ "unet_name": "qwen_image_2.1_int8_convrot.safetensors",+ "weight_dtype": "default"+ }+ },+ {+ "id": 452,+ "type": "TextEncodeQwenImage21",+ "pos": [+ 440,+ 410+ ],+ "size": [+ 530,+ 680+ ],+ "flags": {},+ "order": 2,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "clip",+ "name": "clip",+ "type": "CLIP",+ "link": 647+ },+ {+ "localized_name": "image_1",+ "name": "images.image_1",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "localized_name": "vae",+ "name": "vae",+ "shape": 7,+ "type": "VAE",+ "link": null+ },+ {+ "localized_name": "prompt",+ "name": "prompt",+ "type": "STRING",+ "widget": {+ "name": "prompt"+ },+ "link": 687+ },+ {+ "localized_name": "negative_prompt",+ "name": "negative_prompt",+ "type": "STRING",+ "widget": {+ "name": "negative_prompt"+ },+ "link": 657+ }+ ],+ "outputs": [+ {+ "localized_name": "positive",+ "name": "positive",+ "type": "CONDITIONING",+ "links": [+ 653+ ]+ },+ {+ "localized_name": "negative",+ "name": "negative",+ "type": "CONDITIONING",+ "links": [+ 655+ ]+ },+ {+ "localized_name": "latent",+ "name": "latent",+ "type": "LATENT",+ "links": null+ }+ ],+ "properties": {+ "Node name for S&R": "TextEncodeQwenImage21"+ },+ "widgets_values": [+ "",+ "",+ 1024+ ],+ "widgets_values_named": {+ "prompt": "",+ "negative_prompt": "",+ "resolution": 1024+ }+ },+ {+ "id": 453,+ "type": "CLIPLoader",+ "pos": [+ -190,+ 570+ ],+ "size": [+ 510,+ 120+ ],+ "flags": {},+ "order": 3,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "clip_name",+ "name": "clip_name",+ "type": "COMBO",+ "widget": {+ "name": "clip_name"+ },+ "link": 664+ }+ ],+ "outputs": [+ {+ "localized_name": "CLIP",+ "name": "CLIP",+ "type": "CLIP",+ "links": [+ 647+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "CLIPLoader",+ "models": [+ {+ "name": "qwen3vl_8b_int8_convrot.safetensors",+ "url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors",+ "directory": "text_encoders"+ }+ ]+ },+ "widgets_values": [+ "qwen3vl_8b_int8_convrot.safetensors",+ "qwen_image",+ "default"+ ],+ "widgets_values_named": {+ "clip_name": "qwen3vl_8b_int8_convrot.safetensors",+ "type": "qwen_image",+ "device": "default"+ }+ },+ {+ "id": 454,+ "type": "VAELoader",+ "pos": [+ -190,+ 770+ ],+ "size": [+ 510,+ 70+ ],+ "flags": {},+ "order": 4,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "vae_name",+ "name": "vae_name",+ "type": "COMBO",+ "widget": {+ "name": "vae_name"+ },+ "link": 665+ }+ ],+ "outputs": [+ {+ "localized_name": "VAE",+ "name": "VAE",+ "type": "VAE",+ "links": [+ 649+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "VAELoader",+ "models": [+ {+ "name": "qwen_image_2.1_vae_bf16.safetensors",+ "url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors",+ "directory": "vae"+ }+ ]+ },+ "widgets_values": [+ "qwen_image_2.1_vae_bf16.safetensors"+ ],+ "widgets_values_named": {+ "vae_name": "qwen_image_2.1_vae_bf16.safetensors"+ }+ },+ {+ "id": 456,+ "type": "EmptyLatentImage",+ "pos": [+ -70,+ 1010+ ],+ "size": [+ 300,+ 120+ ],+ "flags": {},+ "order": 5,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "width",+ "name": "width",+ "type": "INT",+ "widget": {+ "name": "width"+ },+ "link": 660+ },+ {+ "localized_name": "height",+ "name": "height",+ "type": "INT",+ "widget": {+ "name": "height"+ },+ "link": 661+ }+ ],+ "outputs": [+ {+ "localized_name": "LATENT",+ "name": "LATENT",+ "type": "LATENT",+ "links": [+ 654+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "EmptyLatentImage"+ },+ "widgets_values": [+ 1024,+ 1024,+ 1+ ],+ "widgets_values_named": {+ "width": 1024,+ "height": 1024,+ "batch_size": 1+ }+ },+ {+ "id": 457,+ "type": "VAEDecode",+ "pos": [+ 1620,+ 660+ ],+ "size": [+ 230,+ 60+ ],+ "flags": {},+ "order": 6,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "samples",+ "name": "samples",+ "type": "LATENT",+ "link": 651+ },+ {+ "localized_name": "vae",+ "name": "vae",+ "type": "VAE",+ "link": 649+ }+ ],+ "outputs": [+ {+ "localized_name": "IMAGE",+ "name": "IMAGE",+ "type": "IMAGE",+ "links": [+ 650+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "VAEDecode"+ }+ },+ {+ "id": 458,+ "type": "KSampler",+ "pos": [+ 1180,+ 640+ ],+ "size": [+ 270,+ 270+ ],+ "flags": {},+ "order": 7,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "model",+ "name": "model",+ "type": "MODEL",+ "link": 700+ },+ {+ "localized_name": "positive",+ "name": "positive",+ "type": "CONDITIONING",+ "link": 653+ },+ {+ "localized_name": "negative",+ "name": "negative",+ "type": "CONDITIONING",+ "link": 655+ },+ {+ "localized_name": "latent_image",+ "name": "latent_image",+ "type": "LATENT",+ "link": 654+ },+ {+ "localized_name": "seed",+ "name": "seed",+ "type": "INT",+ "widget": {+ "name": "seed"+ },+ "link": 667+ },+ {+ "localized_name": "steps",+ "name": "steps",+ "type": "INT",+ "widget": {+ "name": "steps"+ },+ "link": 659+ },+ {+ "localized_name": "cfg",+ "name": "cfg",+ "type": "FLOAT",+ "widget": {+ "name": "cfg"+ },+ "link": 658+ },+ {+ "localized_name": "sampler_name",+ "name": "sampler_name",+ "type": "COMBO",+ "widget": {+ "name": "sampler_name"+ },+ "link": 662+ },+ {+ "localized_name": "scheduler",+ "name": "scheduler",+ "type": "COMBO",+ "widget": {+ "name": "scheduler"+ },+ "link": 668+ }+ ],+ "outputs": [+ {+ "localized_name": "LATENT",+ "name": "LATENT",+ "type": "LATENT",+ "links": [+ 651+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "KSampler"+ },+ "widgets_values": [+ 0,+ "fixed",+ 25,+ 1,+ "euler",+ "simple",+ 1+ ],+ "widgets_values_named": {+ "seed": 0,+ "control_after_generate": "fixed",+ "steps": 25,+ "cfg": 1,+ "sampler_name": "euler",+ "scheduler": "simple",+ "denoise": 1+ }+ },+ {+ "id": 471,+ "type": "TextGenerate",+ "pos": [+ 470,+ -420+ ],+ "size": [+ 400,+ 460+ ],+ "flags": {},+ "order": 8,+ "mode": 0,+ "showAdvanced": true,+ "inputs": [+ {+ "localized_name": "clip",+ "name": "clip",+ "type": "CLIP",+ "link": 681+ },+ {+ "localized_name": "image",+ "name": "image",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "localized_name": "video",+ "name": "video",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "localized_name": "audio",+ "name": "audio",+ "shape": 7,+ "type": "AUDIO",+ "link": null+ },+ {+ "localized_name": "system_prompt",+ "name": "system_prompt",+ "shape": 7,+ "type": "STRING",+ "link": 709+ },+ {+ "localized_name": "prompt",+ "name": "prompt",+ "type": "STRING",+ "widget": {+ "name": "prompt"+ },+ "link": 711+ },+ {+ "localized_name": "max_length",+ "name": "max_length",+ "type": "INT",+ "widget": {+ "name": "max_length"+ },+ "link": 713+ },+ {+ "localized_name": "seed",+ "name": "sampling_mode.seed",+ "type": "INT",+ "widget": {+ "name": "sampling_mode.seed"+ },+ "link": 697+ },+ {+ "localized_name": "thinking",+ "name": "thinking",+ "shape": 7,+ "type": "BOOLEAN",+ "widget": {+ "name": "thinking"+ },+ "link": 695+ }+ ],+ "outputs": [+ {+ "localized_name": "generated_text",+ "name": "generated_text",+ "type": "STRING",+ "links": [+ 712+ ]+ },+ {+ "localized_name": "thinking",+ "name": "thinking",+ "type": "STRING",+ "links": null+ }+ ],+ "properties": {+ "Node name for S&R": "TextGenerate"+ },+ "widgets_values": [+ "",+ 4096,+ "on",+ 1,+ 20,+ 0.95,+ 0,+ 1,+ 0,+ 1.5,+ true,+ true,+ "auto"+ ],+ "widgets_values_named": {+ "prompt": "",+ "max_length": 4096,+ "sampling_mode": "on",+ "sampling_mode.temperature": 1,+ "sampling_mode.top_k": 20,+ "sampling_mode.top_p": 0.95,+ "sampling_mode.min_p": 0,+ "sampling_mode.repetition_penalty": 1,+ "sampling_mode.seed": 0,+ "sampling_mode.presence_penalty": 1.5,+ "thinking": true,+ "use_default_template": true,+ "mtp": "auto"+ }+ },+ {+ "id": 472,+ "type": "PreviewAny",+ "pos": [+ 990,+ -250+ ],+ "size": [+ 470,+ 430+ ],+ "flags": {},+ "order": 9,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "source",+ "name": "source",+ "type": "*",+ "link": 686+ }+ ],+ "outputs": [+ {+ "localized_name": "STRING",+ "name": "STRING",+ "type": "STRING",+ "links": [+ 687+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "PreviewAny"+ },+ "widgets_values": [],+ "widgets_values_named": {}+ },+ {+ "id": 473,+ "type": "CLIPLoader",+ "pos": [+ -180,+ -420+ ],+ "size": [+ 530,+ 120+ ],+ "flags": {},+ "order": 10,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "clip_name",+ "name": "clip_name",+ "type": "COMBO",+ "widget": {+ "name": "clip_name"+ },+ "link": 696+ }+ ],+ "outputs": [+ {+ "localized_name": "CLIP",+ "name": "CLIP",+ "type": "CLIP",+ "links": [+ 681+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "CLIPLoader",+ "models": [+ {+ "name": "qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",+ "url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",+ "directory": "text_encoders"+ }+ ]+ },+ "widgets_values": [+ "qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",+ "stable_diffusion",+ "default"+ ],+ "widgets_values_named": {+ "clip_name": "qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",+ "type": "stable_diffusion",+ "device": "default"+ }+ },+ {+ "id": 474,+ "type": "ComfySwitchNode",+ "pos": [+ 990,+ -420+ ],+ "size": [+ 270,+ 80+ ],+ "flags": {},+ "order": 11,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "on_false",+ "name": "on_false",+ "shape": 7,+ "type": "STRING",+ "link": 684+ },+ {+ "localized_name": "on_true",+ "name": "on_true",+ "shape": 7,+ "type": "STRING",+ "link": 712+ },+ {+ "localized_name": "switch",+ "name": "switch",+ "type": "BOOLEAN",+ "widget": {+ "name": "switch"+ },+ "link": 688+ }+ ],+ "outputs": [+ {+ "localized_name": "output",+ "name": "output",+ "type": "STRING",+ "links": [+ 686+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "ComfySwitchNode"+ },+ "widgets_values": [+ false+ ],+ "widgets_values_named": {+ "switch": false+ }+ },+ {+ "id": 475,+ "type": "PrimitiveStringMultiline",+ "pos": [+ -180,+ -240+ ],+ "size": [+ 530,+ 270+ ],+ "flags": {},+ "order": 0,+ "mode": 0,+ "inputs": [],+ "outputs": [+ {+ "localized_name": "STRING",+ "name": "STRING",+ "type": "STRING",+ "links": [+ 709+ ]+ }+ ],+ "title": "Text (System Prompt)",+ "properties": {+ "Node name for S&R": "PrimitiveStringMultiline"+ },+ "widgets_values": [+ "# Image Prompt Rewriting Expert\n\nYou turn a user's image request into one long English paragraph that describes the\nfinished image as if you were looking at it, plus the aspect ratio it should be\nrendered at. You are not talking to the user and not talking to a renderer: you are\nan observer reporting what is in the frame.\n\nWork through the eight steps below in order. Each step commits one decision; later\nsteps never revise an earlier one.\n\n## Step 1 — Read the brief and split it in two\n\nList what the user has fixed and what they have left open.\n\nFixed, and it must survive into your description unchanged: every string of text\nthey want shown, every named object, every count, every stated colour, every stated\nposition, and the aspect ratio if they gave one. Copy their text strings character\nfor character, in their own script, including punctuation and spacing.\n\nA third thing they may give you is an instruction about the job rather than about the\npicture — \"use double quotes\", \"no hard-edged blocks\", \"4K, no noise\", \"make sure the\ntext is sharp\". That is not content. Obey it silently where it applies and never echo\nit: the description states what is in the frame, never what must be done.\n\nOpen, and you must decide it: everything they did not mention. A three-word request\nand a three-hundred-word request both become a description of the same size, so a\nshort brief means you are inventing most of the frame, not writing less.\n\n## Step 2 — Fix the frame\n\nDecide the orientation from the subject, then pick the ratio.\n\nIf the user states a ratio, use it. Otherwise: `3:2` for anything horizontal and\n`2:3` for anything vertical — these are the two defaults and cover most images.\nUse `1:1` for a square badge, icon, album cover or single centred emblem, `16:9`\nfor a wide cinematic or presentation frame, `1:2` or `9:16` for a phone screen or a\ntall standing banner. `3:4`, `2:1`, `21:9`, `4:3`, `9:21`, `4:5`, `3:1`, `5:4`,\n`1:3` exist but only when the subject or the user really calls for them.\n\nThe ratio lives only in the `wh_ratio` field. Never write a ratio, a resolution, or\na pixel count into the description itself.\n\n## Step 3 — Write the opening sentence\n\nOne sentence, around twenty words. Name the medium, the style, the subject, and the\nbackground or palette; usually name the orientation too:\n\n`The image is a ⟨vertical / wide / square / tall⟩ ⟨style⟩ ⟨photograph · poster · illustration · scene · portrait · infographic · close-up · graphic · page · card · sheet · logo⟩ of ⟨subject⟩, ⟨the background and its palette⟩.`\n\n`This is a …` or a bare `A vertical realistic photograph of …` work equally well. The\nmedium noun is the one part that is never omitted.\n\nThe style word goes here — realistic, photorealistic, minimalist, flat-vector,\ncinematic, watercolour, isometric, editorial, hand-drawn, 3D-rendered, retro. Name\nit once here; you may echo it in the closing sentence.\n\n## Step 4 — Inventory before you write\n\nBefore any more prose, settle two lists.\n\nEvery element that will appear, each with a place in the frame: upper-left,\nacross the top, on the far right, in the lower-third, in the centre, in front of,\nbehind, tucked into the corner. You will need eight to fourteen such positional\nphrases, about ten typically, and they must reach the corners, the edges and the\ncentre — not cluster in the middle.\n\nEvery piece of text that will be legible in the image, in reading order.\n\n## Step 5 — Walk the frame\n\nNow describe it in order. Which order depends on how the frame is filled.\n\n**If the frame is divided into regions** — a poster, a page, an interface, a layout, a\nwide scene with several things in it — walk the regions:\n\n1. The background and the surface it sits on — this comes immediately after the\n opening sentence, not at the end.\n2. The top band: headline, header bar, sky, ceiling, whatever occupies the top edge.\n3. Down and across the body of the frame: left side, then centre, then right side.\n Give each region one or two sentences.\n4. The bottom band: footer, foreground, ground plane, base row.\n\n**If one subject fills the frame** — a portrait, a close-up, a single object — walk\nthe subject instead: the background and how far it falls off, then the subject's pose\nand where it is placed in the frame, then head and face, then body and each garment or\nsurface, then what is held or touching it, then whatever little is left at the edges.\nKeep using positional phrases inside the subject — in the upper-left of the frame,\nbehind the left shoulder, along the lower edge — so the frame stays locatable.\n\nRoughly a third of your sentences should open on the positional phrase itself —\n\"On the right side of the frame, …\", \"In the upper-left corner, …\", \"Across the\nlower third, …\" — so the reader always knows where they are looking.\n\nKeep it to one paragraph. Break to a new paragraph only when the image is genuinely\nbuilt from stacked regions — panels, cards, sections, slides — and then one\nparagraph per region, each opening on where that region sits.\n\n## Step 6 — Set every piece of text\n\nSkip this step if nothing in the image is meant to be read — a third of images have\nno legible text at all, and inventing signage for them is a mistake.\n\nOtherwise, for each string from your Step 4 list, in reading order, name where it sits,\nwhat it looks like, and what it says: `a bold black headline across the top reads \"…\"`.\n\nPut the string in straight double quotes, in its own script — Chinese, Russian,\nKorean, Japanese and Arabic text stays in Chinese, Russian, Korean, Japanese and\nArabic. Give its weight, colour, case and relative size. Describe a line break as a\nsecond line rather than putting a real newline inside the string. If a mark is not meant\nto be read — distant signage, a label behind glass, dense body copy — call it\nblurred, indistinct, or too small to read rather than inventing letters. If the image contains a chart\nor a table, its axes, tick labels, legend entries, series and cell values are text\ntoo: write them out.\n\n## Step 7 — Give the lighting its own sentence\n\nEvery image has light in it, and the description always accounts for it: the source,\nits direction, its quality, and the shadows and highlights it leaves. Soft diffused\ndaylight from a window on the left, hard overhead studio light, warm low sun, flat\neven ambient light for a diagram.\n\nOnce the contents are placed, give it a sentence of its own — `The lighting is …` —\nor, if the light is what makes a particular surface look the way it does, fold it into\nthat surface's sentence. Either way it is stated explicitly, not left implied.\n\n## Step 8 — Close with the whole frame\n\nEnd on a single sentence that steps back:\n\n`The overall composition ⟨is / uses / feels⟩ …`\n\n`The composition is …`, `The overall design …`, `The overall mood …`, `The overall\npalette …` and `The image has …` are the same move. Cover balance and symmetry, the\npalette, the style, and the mood in that one sentence. Write exactly one such\nsentence — do not follow it with a second summary.\n\n## Throughout\n\n**Size.** The description runs about twenty sentences and four to five hundred words,\nroughly twenty-five words a sentence. That is the same size whether the brief was three\nwords or three hundred: a dense frame with many regions and a lot of text runs longer, a\nsingle quiet subject runs shorter, but a thin brief never buys a thin description.\n\n**Observe, don't instruct.** Present tense, third person, declarative. No \"you\", no\n\"create\", no \"make sure\", no \"the AI should\". No quality boosters — no \"masterpiece\",\n\"8K\", \"highly detailed\", \"award-winning\".\n\n**Hedge what you cannot be certain of.** An observer describing a picture says\n\"appears to be\", \"likely\", \"suggesting\", and offers a pair — \"a notebook\nor a tablet\", \"wood or dark laminate\" — when the thing is genuinely ambiguous. Do\nthis often; it is the natural register here. Be flatly definite only about what the\nuser fixed.\n\n**Name colours with a modifier, almost never bare.** Deep navy, muted olive, pale\ncream, warm terracotta, soft dusty rose, blue-grey, off-white, charcoal, brownish-\ngreen. Hex codes only if the user gave them.\n\n**Give the material, not just the noun.** Brushed metal, matte plastic, glossy\nceramic, coarse linen, weathered wood, frosted glass, grain, scuffs, condensation,\nvisible brush strokes, paper fibre.\n\n**Enumerate; never summarise.** \"Several items\" and \"various decorations\" are not\ndescriptions. Say what each thing is. Write small counts as words — three, five,\ntwelve — and if something is partly hidden, say so and describe the visible part.\n\n**People get their observable surface.** Build, posture, where they are looking,\nexpression, hair, skin tone, and each garment with its colour and material. Age is a\nlife stage or a decade — a child, a teenager, a young adult, middle-aged, elderly,\nin her thirties — never a number of years. If a face is turned away or cropped, say\nthat instead of describing it.\n\n**Objects by class, not by brand.** A silver laptop, a mirrorless camera, a compact\nhatchback — unless the user named the brand. Photographic and design vocabulary is\nwelcome: shallow depth of field, bokeh, backlit, close-up, negative space,\ngrid, drop shadow.\n\n**Everything holds together physically.** Shadows fall away from the light, reflections\nmatch what is in front of the surface, scale is consistent between neighbouring\nobjects, and a surface reacts to what sits on it. If the user asked for something\nimpossible, describe it as the image shows it and let the rest of the scene stay\ncoherent around it.\n\n## Language\n\nThe description is always in English, whatever language the request arrives in. The\nonly exception is text shown inside the image, which stays in its own script.\n\n## Output format\n\n- Return the description and nothing else: one continuous paragraph of English, in a single line\nstarting on the very first character of your reply.\n- No JSON, no braces, no key names, no labels, no headings, no markdown, no code fences, and no quotation marks around the paragraph.\n- No preamble, no acknowledgement, no explanation, no summary, no notes, no closing remarks, no questions.\n- No ratio, no resolution, no pixel count, no timestamps.\n\nYour whole reply is used as the image prompt, so every extra word you add becomes part of the image.\n"+ ],+ "widgets_values_named": {+ "value": "# Image Prompt Rewriting Expert\n\nYou turn a user's image request into one long English paragraph that describes the\nfinished image as if you were looking at it, plus the aspect ratio it should be\nrendered at. You are not talking to the user and not talking to a renderer: you are\nan observer reporting what is in the frame.\n\nWork through the eight steps below in order. Each step commits one decision; later\nsteps never revise an earlier one.\n\n## Step 1 — Read the brief and split it in two\n\nList what the user has fixed and what they have left open.\n\nFixed, and it must survive into your description unchanged: every string of text\nthey want shown, every named object, every count, every stated colour, every stated\nposition, and the aspect ratio if they gave one. Copy their text strings character\nfor character, in their own script, including punctuation and spacing.\n\nA third thing they may give you is an instruction about the job rather than about the\npicture — \"use double quotes\", \"no hard-edged blocks\", \"4K, no noise\", \"make sure the\ntext is sharp\". That is not content. Obey it silently where it applies and never echo\nit: the description states what is in the frame, never what must be done.\n\nOpen, and you must decide it: everything they did not mention. A three-word request\nand a three-hundred-word request both become a description of the same size, so a\nshort brief means you are inventing most of the frame, not writing less.\n\n## Step 2 — Fix the frame\n\nDecide the orientation from the subject, then pick the ratio.\n\nIf the user states a ratio, use it. Otherwise: `3:2` for anything horizontal and\n`2:3` for anything vertical — these are the two defaults and cover most images.\nUse `1:1` for a square badge, icon, album cover or single centred emblem, `16:9`\nfor a wide cinematic or presentation frame, `1:2` or `9:16` for a phone screen or a\ntall standing banner. `3:4`, `2:1`, `21:9`, `4:3`, `9:21`, `4:5`, `3:1`, `5:4`,\n`1:3` exist but only when the subject or the user really calls for them.\n\nThe ratio lives only in the `wh_ratio` field. Never write a ratio, a resolution, or\na pixel count into the description itself.\n\n## Step 3 — Write the opening sentence\n\nOne sentence, around twenty words. Name the medium, the style, the subject, and the\nbackground or palette; usually name the orientation too:\n\n`The image is a ⟨vertical / wide / square / tall⟩ ⟨style⟩ ⟨photograph · poster · illustration · scene · portrait · infographic · close-up · graphic · page · card · sheet · logo⟩ of ⟨subject⟩, ⟨the background and its palette⟩.`\n\n`This is a …` or a bare `A vertical realistic photograph of …` work equally well. The\nmedium noun is the one part that is never omitted.\n\nThe style word goes here — realistic, photorealistic, minimalist, flat-vector,\ncinematic, watercolour, isometric, editorial, hand-drawn, 3D-rendered, retro. Name\nit once here; you may echo it in the closing sentence.\n\n## Step 4 — Inventory before you write\n\nBefore any more prose, settle two lists.\n\nEvery element that will appear, each with a place in the frame: upper-left,\nacross the top, on the far right, in the lower-third, in the centre, in front of,\nbehind, tucked into the corner. You will need eight to fourteen such positional\nphrases, about ten typically, and they must reach the corners, the edges and the\ncentre — not cluster in the middle.\n\nEvery piece of text that will be legible in the image, in reading order.\n\n## Step 5 — Walk the frame\n\nNow describe it in order. Which order depends on how the frame is filled.\n\n**If the frame is divided into regions** — a poster, a page, an interface, a layout, a\nwide scene with several things in it — walk the regions:\n\n1. The background and the surface it sits on — this comes immediately after the\n opening sentence, not at the end.\n2. The top band: headline, header bar, sky, ceiling, whatever occupies the top edge.\n3. Down and across the body of the frame: left side, then centre, then right side.\n Give each region one or two sentences.\n4. The bottom band: footer, foreground, ground plane, base row.\n\n**If one subject fills the frame** — a portrait, a close-up, a single object — walk\nthe subject instead: the background and how far it falls off, then the subject's pose\nand where it is placed in the frame, then head and face, then body and each garment or\nsurface, then what is held or touching it, then whatever little is left at the edges.\nKeep using positional phrases inside the subject — in the upper-left of the frame,\nbehind the left shoulder, along the lower edge — so the frame stays locatable.\n\nRoughly a third of your sentences should open on the positional phrase itself —\n\"On the right side of the frame, …\", \"In the upper-left corner, …\", \"Across the\nlower third, …\" — so the reader always knows where they are looking.\n\nKeep it to one paragraph. Break to a new paragraph only when the image is genuinely\nbuilt from stacked regions — panels, cards, sections, slides — and then one\nparagraph per region, each opening on where that region sits.\n\n## Step 6 — Set every piece of text\n\nSkip this step if nothing in the image is meant to be read — a third of images have\nno legible text at all, and inventing signage for them is a mistake.\n\nOtherwise, for each string from your Step 4 list, in reading order, name where it sits,\nwhat it looks like, and what it says: `a bold black headline across the top reads \"…\"`.\n\nPut the string in straight double quotes, in its own script — Chinese, Russian,\nKorean, Japanese and Arabic text stays in Chinese, Russian, Korean, Japanese and\nArabic. Give its weight, colour, case and relative size. Describe a line break as a\nsecond line rather than putting a real newline inside the string. If a mark is not meant\nto be read — distant signage, a label behind glass, dense body copy — call it\nblurred, indistinct, or too small to read rather than inventing letters. If the image contains a chart\nor a table, its axes, tick labels, legend entries, series and cell values are text\ntoo: write them out.\n\n## Step 7 — Give the lighting its own sentence\n\nEvery image has light in it, and the description always accounts for it: the source,\nits direction, its quality, and the shadows and highlights it leaves. Soft diffused\ndaylight from a window on the left, hard overhead studio light, warm low sun, flat\neven ambient light for a diagram.\n\nOnce the contents are placed, give it a sentence of its own — `The lighting is …` —\nor, if the light is what makes a particular surface look the way it does, fold it into\nthat surface's sentence. Either way it is stated explicitly, not left implied.\n\n## Step 8 — Close with the whole frame\n\nEnd on a single sentence that steps back:\n\n`The overall composition ⟨is / uses / feels⟩ …`\n\n`The composition is …`, `The overall design …`, `The overall mood …`, `The overall\npalette …` and `The image has …` are the same move. Cover balance and symmetry, the\npalette, the style, and the mood in that one sentence. Write exactly one such\nsentence — do not follow it with a second summary.\n\n## Throughout\n\n**Size.** The description runs about twenty sentences and four to five hundred words,\nroughly twenty-five words a sentence. That is the same size whether the brief was three\nwords or three hundred: a dense frame with many regions and a lot of text runs longer, a\nsingle quiet subject runs shorter, but a thin brief never buys a thin description.\n\n**Observe, don't instruct.** Present tense, third person, declarative. No \"you\", no\n\"create\", no \"make sure\", no \"the AI should\". No quality boosters — no \"masterpiece\",\n\"8K\", \"highly detailed\", \"award-winning\".\n\n**Hedge what you cannot be certain of.** An observer describing a picture says\n\"appears to be\", \"likely\", \"suggesting\", and offers a pair — \"a notebook\nor a tablet\", \"wood or dark laminate\" — when the thing is genuinely ambiguous. Do\nthis often; it is the natural register here. Be flatly definite only about what the\nuser fixed.\n\n**Name colours with a modifier, almost never bare.** Deep navy, muted olive, pale\ncream, warm terracotta, soft dusty rose, blue-grey, off-white, charcoal, brownish-\ngreen. Hex codes only if the user gave them.\n\n**Give the material, not just the noun.** Brushed metal, matte plastic, glossy\nceramic, coarse linen, weathered wood, frosted glass, grain, scuffs, condensation,\nvisible brush strokes, paper fibre.\n\n**Enumerate; never summarise.** \"Several items\" and \"various decorations\" are not\ndescriptions. Say what each thing is. Write small counts as words — three, five,\ntwelve — and if something is partly hidden, say so and describe the visible part.\n\n**People get their observable surface.** Build, posture, where they are looking,\nexpression, hair, skin tone, and each garment with its colour and material. Age is a\nlife stage or a decade — a child, a teenager, a young adult, middle-aged, elderly,\nin her thirties — never a number of years. If a face is turned away or cropped, say\nthat instead of describing it.\n\n**Objects by class, not by brand.** A silver laptop, a mirrorless camera, a compact\nhatchback — unless the user named the brand. Photographic and design vocabulary is\nwelcome: shallow depth of field, bokeh, backlit, close-up, negative space,\ngrid, drop shadow.\n\n**Everything holds together physically.** Shadows fall away from the light, reflections\nmatch what is in front of the surface, scale is consistent between neighbouring\nobjects, and a surface reacts to what sits on it. If the user asked for something\nimpossible, describe it as the image shows it and let the rest of the scene stay\ncoherent around it.\n\n## Language\n\nThe description is always in English, whatever language the request arrives in. The\nonly exception is text shown inside the image, which stays in its own script.\n\n## Output format\n\n- Return the description and nothing else: one continuous paragraph of English, in a single line\nstarting on the very first character of your reply.\n- No JSON, no braces, no key names, no labels, no headings, no markdown, no code fences, and no quotation marks around the paragraph.\n- No preamble, no acknowledgement, no explanation, no summary, no notes, no closing remarks, no questions.\n- No ratio, no resolution, no pixel count, no timestamps.\n\nYour whole reply is used as the image prompt, so every extra word you add becomes part of the image.\n"+ }+ },+ {+ "id": 480,+ "type": "QwenImage21Cache",+ "pos": [+ 1190,+ 460+ ],+ "size": [+ 270,+ 90+ ],+ "flags": {},+ "order": 12,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "model",+ "name": "model",+ "type": "MODEL",+ "link": 701+ },+ {+ "localized_name": "device",+ "name": "device",+ "type": "COMBO",+ "widget": {+ "name": "device"+ },+ "link": 703+ },+ {+ "localized_name": "dtype",+ "name": "dtype",+ "type": "COMBO",+ "widget": {+ "name": "dtype"+ },+ "link": 704+ }+ ],+ "outputs": [+ {+ "localized_name": "MODEL",+ "name": "MODEL",+ "type": "MODEL",+ "links": [+ 700+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "QwenImage21Cache"+ },+ "widgets_values": [+ "auto",+ "default"+ ],+ "widgets_values_named": {+ "device": "auto",+ "dtype": "default"+ }+ }+ ],+ "groups": [+ {+ "id": 34,+ "title": "Models",+ "bounding": [+ -200,+ 300,+ 530,+ 590+ ],+ "color": "#3f789e",+ "flags": {}+ },+ {+ "id": 35,+ "title": "Image Size",+ "bounding": [+ -200,+ 920,+ 530,+ 250+ ],+ "color": "#3f789e",+ "flags": {}+ },+ {+ "id": 36,+ "title": "Conditioning",+ "bounding": [+ 360,+ 300,+ 700,+ 860+ ],+ "color": "#3f789e",+ "flags": {}+ },+ {+ "id": 37,+ "title": "Sampling",+ "bounding": [+ 1090,+ 300,+ 470,+ 860+ ],+ "color": "#3f789e",+ "flags": {}+ },+ {+ "id": 38,+ "title": "Prompt Enhancer",+ "bounding": [+ -200,+ -500,+ 1760,+ 770+ ],+ "color": "#3f789e",+ "flags": {}+ }+ ],+ "links": [+ {+ "id": 647,+ "origin_id": 453,+ "origin_slot": 0,+ "target_id": 452,+ "target_slot": 0,+ "type": "CLIP"+ },+ {+ "id": 649,+ "origin_id": 454,+ "origin_slot": 0,+ "target_id": 457,+ "target_slot": 1,+ "type": "VAE"+ },+ {+ "id": 650,+ "origin_id": 457,+ "origin_slot": 0,+ "target_id": -20,+ "target_slot": 0,+ "type": "IMAGE"+ },+ {+ "id": 651,+ "origin_id": 458,+ "origin_slot": 0,+ "target_id": 457,+ "target_slot": 0,+ "type": "LATENT"+ },+ {+ "id": 653,+ "origin_id": 452,+ "origin_slot": 0,+ "target_id": 458,+ "target_slot": 1,+ "type": "CONDITIONING"+ },+ {+ "id": 654,+ "origin_id": 456,+ "origin_slot": 0,+ "target_id": 458,+ "target_slot": 3,+ "type": "LATENT"+ },+ {+ "id": 655,+ "origin_id": 452,+ "origin_slot": 1,+ "target_id": 458,+ "target_slot": 2,+ "type": "CONDITIONING"+ },+ {+ "id": 686,+ "origin_id": 474,+ "origin_slot": 0,+ "target_id": 472,+ "target_slot": 0,+ "type": "STRING"+ },+ {+ "id": 687,+ "origin_id": 472,+ "origin_slot": 0,+ "target_id": 452,+ "target_slot": 3,+ "type": "STRING"+ },+ {+ "id": 700,+ "origin_id": 480,+ "origin_slot": 0,+ "target_id": 458,+ "target_slot": 0,+ "type": "MODEL"+ },+ {+ "id": 701,+ "origin_id": 451,+ "origin_slot": 0,+ "target_id": 480,+ "target_slot": 0,+ "type": "MODEL"+ },+ {+ "id": 712,+ "origin_id": 471,+ "origin_slot": 0,+ "target_id": 474,+ "target_slot": 1,+ "type": "STRING"+ },+ {+ "id": 684,+ "origin_id": -10,+ "origin_slot": 0,+ "target_id": 474,+ "target_slot": 0,+ "type": "STRING"+ },+ {+ "id": 688,+ "origin_id": -10,+ "origin_slot": 1,+ "target_id": 474,+ "target_slot": 2,+ "type": "BOOLEAN"+ },+ {+ "id": 657,+ "origin_id": -10,+ "origin_slot": 4,+ "target_id": 452,+ "target_slot": 4,+ "type": "STRING"+ },+ {+ "id": 658,+ "origin_id": -10,+ "origin_slot": 5,+ "target_id": 458,+ "target_slot": 6,+ "type": "FLOAT"+ },+ {+ "id": 659,+ "origin_id": -10,+ "origin_slot": 6,+ "target_id": 458,+ "target_slot": 5,+ "type": "INT"+ },+ {+ "id": 660,+ "origin_id": -10,+ "origin_slot": 7,+ "target_id": 456,+ "target_slot": 0,+ "type": "INT"+ },+ {+ "id": 661,+ "origin_id": -10,+ "origin_slot": 8,+ "target_id": 456,+ "target_slot": 1,+ "type": "INT"+ },+ {+ "id": 662,+ "origin_id": -10,+ "origin_slot": 9,+ "target_id": 458,+ "target_slot": 7,+ "type": "COMBO"+ },+ {+ "id": 668,+ "origin_id": -10,+ "origin_slot": 10,+ "target_id": 458,+ "target_slot": 8,+ "type": "COMBO"+ },+ {+ "id": 667,+ "origin_id": -10,+ "origin_slot": 11,+ "target_id": 458,+ "target_slot": 4,+ "type": "INT"+ },+ {+ "id": 663,+ "origin_id": -10,+ "origin_slot": 12,+ "target_id": 451,+ "target_slot": 0,+ "type": "COMBO"+ },+ {+ "id": 664,+ "origin_id": -10,+ "origin_slot": 13,+ "target_id": 453,+ "target_slot": 0,+ "type": "COMBO"+ },+ {+ "id": 665,+ "origin_id": -10,+ "origin_slot": 14,+ "target_id": 454,+ "target_slot": 0,+ "type": "COMBO"+ },+ {+ "id": 696,+ "origin_id": -10,+ "origin_slot": 15,+ "target_id": 473,+ "target_slot": 0,+ "type": "COMBO"+ },+ {+ "id": 703,+ "origin_id": -10,+ "origin_slot": 16,+ "target_id": 480,+ "target_slot": 1,+ "type": "COMBO"+ },+ {+ "id": 704,+ "origin_id": -10,+ "origin_slot": 17,+ "target_id": 480,+ "target_slot": 2,+ "type": "COMBO"+ },+ {+ "id": 681,+ "origin_id": 473,+ "origin_slot": 0,+ "target_id": 471,+ "target_slot": 0,+ "type": "CLIP"+ },+ {+ "id": 709,+ "origin_id": 475,+ "origin_slot": 0,+ "target_id": 471,+ "target_slot": 4,+ "type": "STRING"+ },+ {+ "id": 711,+ "origin_id": -10,+ "origin_slot": 0,+ "target_id": 471,+ "target_slot": 5,+ "type": "STRING"+ },+ {+ "id": 713,+ "origin_id": -10,+ "origin_slot": 3,+ "target_id": 471,+ "target_slot": 6,+ "type": "INT"+ },+ {+ "id": 695,+ "origin_id": -10,+ "origin_slot": 2,+ "target_id": 471,+ "target_slot": 8,+ "type": "BOOLEAN"+ },+ {+ "id": 697,+ "origin_id": -10,+ "origin_slot": 11,+ "target_id": 471,+ "target_slot": 7,+ "type": "INT"+ }+ ],+ "extra": {}+ }+ ]+ },+ "config": {},+ "extra": {+ "frontendVersion": "1.53.6",+ "VHS_latentpreview": false,+ "VHS_latentpreviewrate": 0,+ "VHS_MetadataImage": true,+ "VHS_KeepIntermediate": true,+ "ds": {+ "scale": 0.2767489071668226,+ "offset": [+ 1859.0869959863226,+ -1066.7146833281727+ ]+ }+ },+ "version": 0.4+}\ No newline at end of filediff --git a/src/api/__tests__/fixtures/comfy-ui/templates/image_qwen_image_2_1_turbo_image_edit.json b/src/api/__tests__/fixtures/comfy-ui/templates/image_qwen_image_2_1_turbo_image_edit.jsonnew file mode 100644index 00000000..b4746a5d--- /dev/null+++ b/src/api/__tests__/fixtures/comfy-ui/templates/image_qwen_image_2_1_turbo_image_edit.json@@ -0,0 +1,2711 @@+{+ "id": "54bb395d-3e60-4c94-b525-85523901575b",+ "revision": 0,+ "last_node_id": 507,+ "last_link_id": 915,+ "nodes": [+ {+ "id": 459,+ "type": "bc1c967a-7f6a-4be9-a372-dad16e4f28e3",+ "pos": [+ 546.5131640122675,+ 2419.9458226107668+ ],+ "size": [+ 420,+ 760+ ],+ "flags": {},+ "order": 4,+ "mode": 0,+ "inputs": [+ {+ "label": "positive_prompt",+ "name": "prompt",+ "type": "STRING",+ "widget": {+ "name": "prompt"+ },+ "link": null+ },+ {+ "label": "refine_prompt",+ "name": "switch_1",+ "type": "BOOLEAN",+ "widget": {+ "name": "switch_1"+ },+ "link": null+ },+ {+ "label": "custom_size",+ "name": "switch",+ "type": "BOOLEAN",+ "widget": {+ "name": "switch"+ },+ "link": null+ },+ {+ "label": "sampler",+ "name": "scheduler",+ "type": "COMBO",+ "widget": {+ "name": "scheduler"+ },+ "link": null+ },+ {+ "label": "cache_device",+ "name": "device",+ "type": "COMBO",+ "widget": {+ "name": "device"+ },+ "link": null+ },+ {+ "label": "dtype",+ "name": "dtype",+ "type": "COMBO",+ "widget": {+ "name": "dtype"+ },+ "link": null+ },+ {+ "label": "PE_model",+ "name": "clip_name_1",+ "type": "COMBO",+ "widget": {+ "name": "clip_name_1"+ },+ "link": null+ },+ {+ "label": "image_1",+ "name": "images.image_1",+ "type": "IMAGE",+ "link": 704+ },+ {+ "label": "image_2",+ "name": "images.image_2",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "label": "image_3",+ "name": "images.image_3",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "label": "image_4",+ "name": "images.image_4",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "label": "image_5",+ "name": "images.image_5_1",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "label": "image_6",+ "name": "images.image_6",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "label": "image_7",+ "name": "images.image_7",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "label": "image_8",+ "name": "images.image_8",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "label": "image_9",+ "name": "images.image_9",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "label": "image_10",+ "name": "images.image_10",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ }+ ],+ "outputs": [+ {+ "name": "IMAGE",+ "type": "IMAGE",+ "links": [+ 672+ ]+ }+ ],+ "properties": {+ "previewExposures": []+ },+ "widgets_values": [+ 0,+ "Relight the scene as a clear moonlit night: the sky seen through the oculus becomes a deep night sky with a bright full moon and a few stars, and the tree stays as a dark night silhouette. Soft blue-silver moonlight is now the only light source, casting a cool pale pool of light on the circular stone platform and a long soft shadow of the dancer. The concrete walls turn cool blue-grey with deep shadows, and the dancer's black dress catches a faint silver rim light. Keep her exact pose, the architecture, the framing and the tree position unchanged.",+ false,+ false,+ 4096,+ "",+ 1,+ false,+ 1024,+ 1024,+ "euler",+ 891836227295375,+ "qwen_image_2.1_turbo_int8_convrot.safetensors",+ "qwen3vl_8b_int8_convrot.safetensors",+ "qwen_image_2.1_vae_bf16.safetensors",+ "auto",+ "default",+ "qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors"+ ],+ "widgets_values_named": {+ "resolution": 0,+ "prompt": "Relight the scene as a clear moonlit night: the sky seen through the oculus becomes a deep night sky with a bright full moon and a few stars, and the tree stays as a dark night silhouette. Soft blue-silver moonlight is now the only light source, casting a cool pale pool of light on the circular stone platform and a long soft shadow of the dancer. The concrete walls turn cool blue-grey with deep shadows, and the dancer's black dress catches a faint silver rim light. Keep her exact pose, the architecture, the framing and the tree position unchanged.",+ "switch_1": false,+ "thinking": false,+ "max_length": 4096,+ "negative_prompt": "",+ "cfg": 1,+ "switch": false,+ "width": 1024,+ "height": 1024,+ "scheduler": "euler",+ "seed": 891836227295375,+ "unet_name": "qwen_image_2.1_turbo_int8_convrot.safetensors",+ "clip_name": "qwen3vl_8b_int8_convrot.safetensors",+ "vae_name": "qwen_image_2.1_vae_bf16.safetensors",+ "device": "auto",+ "dtype": "default",+ "clip_name_1": "qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors"+ }+ },+ {+ "id": 461,+ "type": "SaveImageAdvanced",+ "pos": [+ 1476.5131640122675,+ 2419.9458226107668+ ],+ "size": [+ 710,+ 760+ ],+ "flags": {},+ "order": 5,+ "mode": 0,+ "showAdvanced": true,+ "inputs": [+ {+ "name": "images",+ "type": "IMAGE",+ "link": 672+ }+ ],+ "outputs": [+ {+ "name": "images",+ "type": "IMAGE",+ "links": [+ 708+ ]+ }+ ],+ "properties": {},+ "widgets_values": [+ "Qwen_image_2.1",+ "png",+ "8-bit",+ "sRGB"+ ],+ "widgets_values_named": {+ "filename_prefix": "Qwen_image_2.1",+ "format": "png",+ "format.bit_depth": "8-bit",+ "format.input_color_space": "sRGB"+ }+ },+ {+ "id": 463,+ "type": "MarkdownNote",+ "pos": [+ -360,+ 2410+ ],+ "size": [+ 420,+ 620+ ],+ "flags": {},+ "order": 0,+ "mode": 0,+ "inputs": [],+ "outputs": [],+ "title": "Note: Usage",+ "properties": {},+ "widgets_values": [+ "## Size\nQwen Image 2.1 has native 2K (2048*2048) support for direct output.\n\n- resolution is a total pixel budget (not width or height). Aspect ratio is preserved.\n- Official default is 1024. The model supports up to 2048.\n- This template starts at 0: no resize beyond a multiple of 32.\n- Output follows image_1. Extra refs can differ in size or aspect.\n- custom_size off: canvas comes from the encode latent (image_1).\n- custom_size on: use ResolutionSelector width/height. Keep it close to the resized image_1 size, or the edit can shift.\n\n## Reference images\n- Up to 10 reference images (image_1 to image_10).\n- Mention them in the prompt as `<image1>`, `<image2>`, ...\n- image_1 is the edit target. The rest are references.\n\n## Custom settings\nIf you need custom settings, enter or unpack the subgraph to edit it. See the [Subgraph](https://docs.comfy.org/interface/features/subgraph) guide.\n\n## Parameters\n- prompt: edit instruction. Use `<image1>` ... `<image10>`.\n- negative_prompt: unused while cfg is 1.\n- cfg: keep 1 for the Qwen Image 2.1 official path. Raise it only if you use a negative prompt.\n- steps: Qwen Image 2.1 official pipeline uses about 40-50 with euler. This template starts at 25. More advanced samplers need fewer steps."+ ],+ "widgets_values_named": {+ "text": "## Size\nQwen Image 2.1 has native 2K (2048*2048) support for direct output.\n\n- resolution is a total pixel budget (not width or height). Aspect ratio is preserved.\n- Official default is 1024. The model supports up to 2048.\n- This template starts at 0: no resize beyond a multiple of 32.\n- Output follows image_1. Extra refs can differ in size or aspect.\n- custom_size off: canvas comes from the encode latent (image_1).\n- custom_size on: use ResolutionSelector width/height. Keep it close to the resized image_1 size, or the edit can shift.\n\n## Reference images\n- Up to 10 reference images (image_1 to image_10).\n- Mention them in the prompt as `<image1>`, `<image2>`, ...\n- image_1 is the edit target. The rest are references.\n\n## Custom settings\nIf you need custom settings, enter or unpack the subgraph to edit it. See the [Subgraph](https://docs.comfy.org/interface/features/subgraph) guide.\n\n## Parameters\n- prompt: edit instruction. Use `<image1>` ... `<image10>`.\n- negative_prompt: unused while cfg is 1.\n- cfg: keep 1 for the Qwen Image 2.1 official path. Raise it only if you use a negative prompt.\n- steps: Qwen Image 2.1 official pipeline uses about 40-50 with euler. This template starts at 25. More advanced samplers need fewer steps."+ },+ "color": "#222",+ "bgcolor": "#000"+ },+ {+ "id": 470,+ "type": "LoadImage",+ "pos": [+ 140,+ 2420+ ],+ "size": [+ 351.59115163987053,+ 548.8686769486816+ ],+ "flags": {},+ "order": 1,+ "mode": 0,+ "inputs": [],+ "outputs": [+ {+ "name": "IMAGE",+ "type": "IMAGE",+ "links": [+ 704,+ 707+ ]+ },+ {+ "name": "MASK",+ "type": "MASK",+ "links": null+ }+ ],+ "properties": {+ "Node name for S&R": "LoadImage"+ },+ "widgets_values": [+ "ballet_dancer_photography_minimalist_architecture.png",+ "image"+ ],+ "widgets_values_named": {+ "image": "ballet_dancer_photography_minimalist_architecture.png",+ "upload": "image"+ }+ },+ {+ "id": 472,+ "type": "ImageCompare",+ "pos": [+ 2226.513164012267,+ 2419.9458226107668+ ],+ "size": [+ 660,+ 760+ ],+ "flags": {},+ "order": 6,+ "mode": 0,+ "inputs": [+ {+ "name": "image_a",+ "shape": 7,+ "type": "IMAGE",+ "link": 707+ },+ {+ "name": "image_b",+ "shape": 7,+ "type": "IMAGE",+ "link": 708+ }+ ],+ "outputs": [],+ "properties": {+ "Node name for S&R": "ImageCompare"+ },+ "widgets_values": [],+ "widgets_values_named": {}+ },+ {+ "id": 476,+ "type": "MarkdownNote",+ "pos": [+ -840,+ 2410+ ],+ "size": [+ 420,+ 620+ ],+ "flags": {},+ "order": 2,+ "mode": 0,+ "inputs": [],+ "outputs": [],+ "title": "Note: Model links",+ "properties": {},+ "widgets_values": [+ "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Input Asset\n\n- [ballet_dancer_photography_minimalist_architecture.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/ballet_dancer_photography_minimalist_architecture.png)\n\n## Model Links\n\n- [Hugging Face:Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1)\n- [ModelScope:Comfy-Org/Qwen-Image-2.1](https://modelscope.cn/models/Comfy-Org/Qwen-Image-2.1)\n\n**diffusion_models**\n\n- [qwen_image_2.1_turbo_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_turbo_bf16.safetensors) (13.25 GB)\n- [qwen_image_2.1_turbo_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_turbo_int8_convrot.safetensors) (6.76 GB)\n\n**text_encoders**\n\n- [qwen3vl_8b_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_bf16.safetensors) (16.33 GB)\n- [qwen3vl_8b_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors) (8.71 GB) \n- [qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors) (8.82 GB)\n\n**vae**\n\n- [qwen_image_2.1_vae_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors) (644.2 MB)\n\n\n## Model Storage Location\n\n```\n📂 ComfyUI/\n├── 📂 models/\n│ ├── 📂 diffusion_models/\n│ │ ├── qwen_image_2.1_turbo_bf16.safetensors\n│ │ └── qwen_image_2.1_turbo_int8_convrot.safetensors\n│ ├── 📂 text_encoders/\n│ │ ├── qwen3vl_8b_bf16.safetensors\n│ │ ├── qwen3vl_8b_int8_convrot.safetensors\n│ │ └── qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors│ └── 📂 vae/\n│ └── qwen_image_2.1_vae_bf16.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"+ ],+ "widgets_values_named": {+ "text": "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Input Asset\n\n- [ballet_dancer_photography_minimalist_architecture.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/ballet_dancer_photography_minimalist_architecture.png)\n\n## Model Links\n\n- [Hugging Face:Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1)\n- [ModelScope:Comfy-Org/Qwen-Image-2.1](https://modelscope.cn/models/Comfy-Org/Qwen-Image-2.1)\n\n**diffusion_models**\n\n- [qwen_image_2.1_turbo_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_turbo_bf16.safetensors) (13.25 GB)\n- [qwen_image_2.1_turbo_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_turbo_int8_convrot.safetensors) (6.76 GB)\n\n**text_encoders**\n\n- [qwen3vl_8b_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_bf16.safetensors) (16.33 GB)\n- [qwen3vl_8b_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors) (8.71 GB) \n- [qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors) (8.82 GB)\n\n**vae**\n\n- [qwen_image_2.1_vae_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors) (644.2 MB)\n\n\n## Model Storage Location\n\n```\n📂 ComfyUI/\n├── 📂 models/\n│ ├── 📂 diffusion_models/\n│ │ ├── qwen_image_2.1_turbo_bf16.safetensors\n│ │ └── qwen_image_2.1_turbo_int8_convrot.safetensors\n│ ├── 📂 text_encoders/\n│ │ ├── qwen3vl_8b_bf16.safetensors\n│ │ ├── qwen3vl_8b_int8_convrot.safetensors\n│ │ └── qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors│ └── 📂 vae/\n│ └── qwen_image_2.1_vae_bf16.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"+ },+ "color": "#222",+ "bgcolor": "#000"+ },+ {+ "id": 501,+ "type": "MarkdownNote",+ "pos": [+ 986.5131640122675,+ 2729.9458226107668+ ],+ "size": [+ 420,+ 480+ ],+ "flags": {},+ "order": 3,+ "mode": 0,+ "inputs": [],+ "outputs": [],+ "title": "Note: PE",+ "properties": {},+ "widgets_values": [+ "## Prompt Enhancer\n\nThe prompt enhancer rewrites your instruction with the Qwen 3.5 prompt enhancer model before the edit model sees it. These settings follow the official prompt enhancer release, and the ones you are most likely to change are exposed on the node.\n\n- `refine_prompt`: on runs the rewrite and feeds it to the edit model, off passes your instruction through as written. On gives the edit model a fuller prompt and usually better results; off skips the rewrite pass and the run finishes faster. This template starts with it off.\n- `thinking`: turn this on together with the enhancer. The checkpoint was trained with a reasoning block and loses quality without it.\n- `max_length`: the token budget for the reasoning block plus the rewritten prompt, 4096 here. The official setting is 24000; this template caps it lower so a single rewrite cannot run for many minutes.\n- `sampling_mode`: the sampling values live inside the subgraph. They follow the official ones: `temperature` 1.0, `top_p` 0.95, `top_k` 20, `min_p` 0, `presence_penalty` 0, `repetition_penalty` 1.0.\n\nThe enhancer checkpoint and its system prompt live inside the subgraph."+ ],+ "widgets_values_named": {+ "text": "## Prompt Enhancer\n\nThe prompt enhancer rewrites your instruction with the Qwen 3.5 prompt enhancer model before the edit model sees it. These settings follow the official prompt enhancer release, and the ones you are most likely to change are exposed on the node.\n\n- `refine_prompt`: on runs the rewrite and feeds it to the edit model, off passes your instruction through as written. On gives the edit model a fuller prompt and usually better results; off skips the rewrite pass and the run finishes faster. This template starts with it off.\n- `thinking`: turn this on together with the enhancer. The checkpoint was trained with a reasoning block and loses quality without it.\n- `max_length`: the token budget for the reasoning block plus the rewritten prompt, 4096 here. The official setting is 24000; this template caps it lower so a single rewrite cannot run for many minutes.\n- `sampling_mode`: the sampling values live inside the subgraph. They follow the official ones: `temperature` 1.0, `top_p` 0.95, `top_k` 20, `min_p` 0, `presence_penalty` 0, `repetition_penalty` 1.0.\n\nThe enhancer checkpoint and its system prompt live inside the subgraph."+ },+ "color": "#222",+ "bgcolor": "#000"+ }+ ],+ "links": [+ [+ 707,+ 470,+ 0,+ 472,+ 0,+ "IMAGE"+ ],+ [+ 708,+ 461,+ 0,+ 472,+ 1,+ "IMAGE"+ ],+ [+ 704,+ 470,+ 0,+ 459,+ 7,+ "IMAGE"+ ],+ [+ 672,+ 459,+ 0,+ 461,+ 0,+ "IMAGE"+ ]+ ],+ "groups": [],+ "definitions": {+ "subgraphs": [+ {+ "id": "bc1c967a-7f6a-4be9-a372-dad16e4f28e3",+ "version": 1,+ "state": {+ "lastGroupId": 38,+ "lastNodeId": 507,+ "lastLinkId": 915,+ "lastRerouteId": 9+ },+ "revision": 0,+ "config": {},+ "name": "Image Edit (Qwen Image 2.1 Turbo)",+ "inputNode": {+ "id": -10,+ "bounding": [+ -720,+ 630,+ 143.044921875,+ 608+ ]+ },+ "outputNode": {+ "id": -20,+ "bounding": [+ 1960,+ 640,+ 128,+ 68+ ]+ },+ "inputs": [+ {+ "id": "1f3911c3-71b5-45b7-9a0e-4ac7285069dc",+ "name": "resolution",+ "type": "INT",+ "linkIds": [+ 725+ ],+ "pos": [+ -600.955078125,+ 654+ ]+ },+ {+ "id": "6a73de3b-f4cd-43a4-9076-76648c6902f0",+ "name": "prompt",+ "type": "STRING",+ "linkIds": [+ 739,+ 802+ ],+ "localized_name": "prompt",+ "label": "positive_prompt",+ "pos": [+ -600.955078125,+ 674+ ]+ },+ {+ "id": "57887da4-f3f5-41b1-9fce-a7292abaef6a",+ "name": "switch_1",+ "type": "BOOLEAN",+ "linkIds": [+ 741+ ],+ "label": "refine_prompt",+ "pos": [+ -600.955078125,+ 694+ ]+ },+ {+ "id": "cd079967-6ff0-46d9-8b58-d52c2cdc5de5",+ "name": "thinking",+ "type": "BOOLEAN",+ "linkIds": [+ 902+ ],+ "pos": [+ -600.955078125,+ 714+ ]+ },+ {+ "id": "d98ec6b1-9955-48e0-874d-b99d10218329",+ "name": "max_length",+ "type": "INT",+ "linkIds": [+ 903+ ],+ "pos": [+ -600.955078125,+ 734+ ]+ },+ {+ "id": "d4c1377f-7fbc-4519-b83c-9a3b9c2de104",+ "name": "negative_prompt",+ "type": "STRING",+ "linkIds": [+ 727+ ],+ "pos": [+ -600.955078125,+ 754+ ]+ },+ {+ "id": "420ee896-17c3-4e07-95fc-0ff309a6b836",+ "name": "cfg",+ "type": "FLOAT",+ "linkIds": [+ 911+ ],+ "pos": [+ -600.955078125,+ 774+ ]+ },+ {+ "id": "60df426d-f8ab-4ce2-8c82-42dc7cbf19d0",+ "name": "switch",+ "type": "BOOLEAN",+ "linkIds": [+ 703+ ],+ "label": "custom_size",+ "pos": [+ -600.955078125,+ 794+ ]+ },+ {+ "id": "91c96cf8-057b-4da2-b71e-305541a3527e",+ "name": "width",+ "type": "INT",+ "linkIds": [+ 660+ ],+ "localized_name": "width",+ "pos": [+ -600.955078125,+ 814+ ]+ },+ {+ "id": "661cc520-6bd0-4925-90ec-cecaa188b57d",+ "name": "height",+ "type": "INT",+ "linkIds": [+ 661+ ],+ "localized_name": "height",+ "pos": [+ -600.955078125,+ 834+ ]+ },+ {+ "id": "9f0e91b8-5a4a-4f5a-a2a4-4ddc180df0fd",+ "name": "scheduler",+ "type": "COMBO",+ "linkIds": [+ 915+ ],+ "label": "sampler",+ "pos": [+ -600.955078125,+ 854+ ]+ },+ {+ "id": "977ce57d-3764-491c-8d2d-543754cfbaf1",+ "name": "seed",+ "type": "INT",+ "linkIds": [+ 804,+ 914+ ],+ "pos": [+ -600.955078125,+ 874+ ]+ },+ {+ "id": "143494fb-a40e-423f-be3b-ecc808b408b0",+ "name": "unet_name",+ "type": "COMBO",+ "linkIds": [+ 663+ ],+ "pos": [+ -600.955078125,+ 894+ ]+ },+ {+ "id": "d8528289-e121-45ed-9c31-e6370ce4ba5e",+ "name": "clip_name",+ "type": "COMBO",+ "linkIds": [+ 664+ ],+ "pos": [+ -600.955078125,+ 914+ ]+ },+ {+ "id": "f03d1fb0-d592-4997-b55e-e7a2549c36e5",+ "name": "vae_name",+ "type": "COMBO",+ "linkIds": [+ 665+ ],+ "pos": [+ -600.955078125,+ 934+ ]+ },+ {+ "id": "c2d95dbf-7f92-4c0b-a138-b9b5d1472e7f",+ "name": "device",+ "type": "COMBO",+ "linkIds": [+ 729+ ],+ "label": "cache_device",+ "pos": [+ -600.955078125,+ 954+ ]+ },+ {+ "id": "974d6751-be03-4afc-911f-a0d43f7cb906",+ "name": "dtype",+ "type": "COMBO",+ "linkIds": [+ 730+ ],+ "label": "dtype",+ "pos": [+ -600.955078125,+ 974+ ]+ },+ {+ "id": "c11b216a-e05d-49a4-b776-293022d01a52",+ "name": "clip_name_1",+ "type": "COMBO",+ "linkIds": [+ 746+ ],+ "label": "PE_model",+ "pos": [+ -600.955078125,+ 994+ ]+ },+ {+ "id": "6bbe4c8a-0ce9-4576-9468-697a165b98b4",+ "name": "images.image_1",+ "type": "IMAGE",+ "linkIds": [+ 710,+ 750+ ],+ "label": "image_1",+ "pos": [+ -600.955078125,+ 1014+ ]+ },+ {+ "id": "5e9080e7-bbd0-4363-9e25-aaa201f9ff01",+ "name": "images.image_2",+ "type": "IMAGE",+ "linkIds": [+ 711,+ 779+ ],+ "label": "image_2",+ "pos": [+ -600.955078125,+ 1034+ ]+ },+ {+ "id": "29bd6732-17d4-4ca7-aa9f-dc118c6c008a",+ "name": "images.image_3",+ "type": "IMAGE",+ "linkIds": [+ 712,+ 780+ ],+ "label": "image_3",+ "pos": [+ -600.955078125,+ 1054+ ]+ },+ {+ "id": "c0899e22-8834-4c49-b0ec-5d2e1c9a4f9d",+ "name": "images.image_4",+ "type": "IMAGE",+ "linkIds": [+ 713,+ 781+ ],+ "label": "image_4",+ "pos": [+ -600.955078125,+ 1074+ ]+ },+ {+ "id": "f4bb2fe2-583b-429d-83dc-0af6d4d3fdf8",+ "name": "images.image_5_1",+ "type": "IMAGE",+ "linkIds": [+ 714,+ 782+ ],+ "label": "image_5",+ "pos": [+ -600.955078125,+ 1094+ ]+ },+ {+ "id": "4dc8dcc5-da5f-4dd4-82f4-479dabed8567",+ "name": "images.image_6",+ "type": "IMAGE",+ "linkIds": [+ 715,+ 783+ ],+ "label": "image_6",+ "pos": [+ -600.955078125,+ 1114+ ]+ },+ {+ "id": "58ac7e94-91ff-4992-9022-fd67902782eb",+ "name": "images.image_7",+ "type": "IMAGE",+ "linkIds": [+ 716,+ 784+ ],+ "label": "image_7",+ "pos": [+ -600.955078125,+ 1134+ ]+ },+ {+ "id": "b736a3f9-62a7-4b77-ad2b-9ed40a482949",+ "name": "images.image_8",+ "type": "IMAGE",+ "linkIds": [+ 717,+ 785+ ],+ "label": "image_8",+ "pos": [+ -600.955078125,+ 1154+ ]+ },+ {+ "id": "79883453-5e79-4003-a7ef-8d9156cffcc4",+ "name": "images.image_9",+ "type": "IMAGE",+ "linkIds": [+ 718,+ 786+ ],+ "label": "image_9",+ "pos": [+ -600.955078125,+ 1174+ ]+ },+ {+ "id": "68c8b3fa-d3fd-4281-82ba-09030a9918dc",+ "name": "images.image_10",+ "type": "IMAGE",+ "linkIds": [+ 719,+ 787+ ],+ "label": "image_10",+ "pos": [+ -600.955078125,+ 1194+ ]+ }+ ],+ "outputs": [+ {+ "id": "f6f3effc-0961-4c17-b52c-a77c16ca6aa4",+ "name": "IMAGE",+ "type": "IMAGE",+ "linkIds": [+ 650+ ],+ "localized_name": "IMAGE",+ "pos": [+ 1984,+ 664+ ]+ }+ ],+ "widgets": [],+ "nodes": [+ {+ "id": 451,+ "type": "UNETLoader",+ "pos": [+ -190,+ 410+ ],+ "size": [+ 510,+ 90+ ],+ "flags": {},+ "order": 2,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "unet_name",+ "name": "unet_name",+ "type": "COMBO",+ "widget": {+ "name": "unet_name"+ },+ "link": 663+ }+ ],+ "outputs": [+ {+ "localized_name": "MODEL",+ "name": "MODEL",+ "type": "MODEL",+ "links": [+ 688+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "UNETLoader",+ "models": [+ {+ "name": "qwen_image_2.1_turbo_int8_convrot.safetensors",+ "url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_turbo_int8_convrot.safetensors",+ "directory": "diffusion_models"+ }+ ]+ },+ "widgets_values": [+ "qwen_image_2.1_turbo_int8_convrot.safetensors",+ "default"+ ],+ "widgets_values_named": {+ "unet_name": "qwen_image_2.1_turbo_int8_convrot.safetensors",+ "weight_dtype": "default"+ }+ },+ {+ "id": 453,+ "type": "CLIPLoader",+ "pos": [+ -190,+ 570+ ],+ "size": [+ 510,+ 120+ ],+ "flags": {},+ "order": 3,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "clip_name",+ "name": "clip_name",+ "type": "COMBO",+ "widget": {+ "name": "clip_name"+ },+ "link": 664+ }+ ],+ "outputs": [+ {+ "localized_name": "CLIP",+ "name": "CLIP",+ "type": "CLIP",+ "links": [+ 721+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "CLIPLoader",+ "models": [+ {+ "name": "qwen3vl_8b_int8_convrot.safetensors",+ "url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors",+ "directory": "text_encoders"+ }+ ]+ },+ "widgets_values": [+ "qwen3vl_8b_int8_convrot.safetensors",+ "qwen_image",+ "default"+ ],+ "widgets_values_named": {+ "clip_name": "qwen3vl_8b_int8_convrot.safetensors",+ "type": "qwen_image",+ "device": "default"+ }+ },+ {+ "id": 454,+ "type": "VAELoader",+ "pos": [+ -190,+ 770+ ],+ "size": [+ 510,+ 70+ ],+ "flags": {},+ "order": 4,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "vae_name",+ "name": "vae_name",+ "type": "COMBO",+ "widget": {+ "name": "vae_name"+ },+ "link": 665+ }+ ],+ "outputs": [+ {+ "localized_name": "VAE",+ "name": "VAE",+ "type": "VAE",+ "links": [+ 649,+ 720+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "VAELoader",+ "models": [+ {+ "name": "qwen_image_2.1_vae_bf16.safetensors",+ "url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors",+ "directory": "vae"+ }+ ]+ },+ "widgets_values": [+ "qwen_image_2.1_vae_bf16.safetensors"+ ],+ "widgets_values_named": {+ "vae_name": "qwen_image_2.1_vae_bf16.safetensors"+ }+ },+ {+ "id": 456,+ "type": "EmptyLatentImage",+ "pos": [+ -70,+ 1010+ ],+ "size": [+ 300,+ 120+ ],+ "flags": {},+ "order": 5,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "width",+ "name": "width",+ "type": "INT",+ "widget": {+ "name": "width"+ },+ "link": 660+ },+ {+ "localized_name": "height",+ "name": "height",+ "type": "INT",+ "widget": {+ "name": "height"+ },+ "link": 661+ }+ ],+ "outputs": [+ {+ "localized_name": "LATENT",+ "name": "LATENT",+ "type": "LATENT",+ "links": [+ 684+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "EmptyLatentImage"+ },+ "widgets_values": [+ 1024,+ 1024,+ 1+ ],+ "widgets_values_named": {+ "width": 1024,+ "height": 1024,+ "batch_size": 1+ }+ },+ {+ "id": 457,+ "type": "VAEDecode",+ "pos": [+ 1620,+ 660+ ],+ "size": [+ 230,+ 60+ ],+ "flags": {},+ "order": 6,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "samples",+ "name": "samples",+ "type": "LATENT",+ "link": 907+ },+ {+ "localized_name": "vae",+ "name": "vae",+ "type": "VAE",+ "link": 649+ }+ ],+ "outputs": [+ {+ "localized_name": "IMAGE",+ "name": "IMAGE",+ "type": "IMAGE",+ "links": [+ 650+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "VAEDecode"+ }+ },+ {+ "id": 468,+ "type": "ComfySwitchNode",+ "pos": [+ 479.85314513256685,+ 1015.0153766097112+ ],+ "size": [+ 270,+ 80+ ],+ "flags": {},+ "order": 7,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "on_false",+ "name": "on_false",+ "shape": 7,+ "type": "LATENT",+ "link": 724+ },+ {+ "localized_name": "on_true",+ "name": "on_true",+ "shape": 7,+ "type": "LATENT",+ "link": 684+ },+ {+ "localized_name": "switch",+ "name": "switch",+ "type": "BOOLEAN",+ "widget": {+ "name": "switch"+ },+ "link": 703+ }+ ],+ "outputs": [+ {+ "localized_name": "output",+ "name": "output",+ "type": "LATENT",+ "links": [+ 913+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "ComfySwitchNode"+ },+ "widgets_values": [+ false+ ],+ "widgets_values_named": {+ "switch": false+ }+ },+ {+ "id": 469,+ "type": "QwenImage21Cache",+ "pos": [+ 955.4012707927922,+ 398.1717177666044+ ],+ "size": [+ 270,+ 90+ ],+ "flags": {},+ "order": 8,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "model",+ "name": "model",+ "type": "MODEL",+ "link": 688+ },+ {+ "localized_name": "device",+ "name": "device",+ "type": "COMBO",+ "widget": {+ "name": "device"+ },+ "link": 729+ },+ {+ "localized_name": "dtype",+ "name": "dtype",+ "type": "COMBO",+ "widget": {+ "name": "dtype"+ },+ "link": 730+ }+ ],+ "outputs": [+ {+ "localized_name": "MODEL",+ "name": "MODEL",+ "type": "MODEL",+ "links": [+ 908+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "QwenImage21Cache"+ },+ "widgets_values": [+ "auto",+ "default"+ ],+ "widgets_values_named": {+ "device": "auto",+ "dtype": "default"+ }+ },+ {+ "id": 474,+ "type": "TextEncodeQwenImage21",+ "pos": [+ 419.68682172750084,+ 430.45130327289627+ ],+ "size": [+ 375.2628583088489,+ 446+ ],+ "flags": {},+ "order": 9,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "clip",+ "name": "clip",+ "type": "CLIP",+ "link": 721+ },+ {+ "localized_name": "image_1",+ "name": "images.image_1",+ "shape": 7,+ "type": "IMAGE",+ "link": 710+ },+ {+ "localized_name": "vae",+ "name": "vae",+ "shape": 7,+ "type": "VAE",+ "link": 720+ },+ {+ "localized_name": "prompt",+ "name": "prompt",+ "type": "STRING",+ "widget": {+ "name": "prompt"+ },+ "link": 743+ },+ {+ "localized_name": "negative_prompt",+ "name": "negative_prompt",+ "type": "STRING",+ "widget": {+ "name": "negative_prompt"+ },+ "link": 727+ },+ {+ "localized_name": "resolution",+ "name": "resolution",+ "type": "INT",+ "widget": {+ "name": "resolution"+ },+ "link": 725+ },+ {+ "localized_name": "image_12",+ "name": "images.image_12",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "localized_name": "image_11",+ "name": "images.image_11",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "localized_name": "image_2",+ "name": "images.image_2",+ "shape": 7,+ "type": "IMAGE",+ "link": 711+ },+ {+ "localized_name": "image_3",+ "name": "images.image_3",+ "shape": 7,+ "type": "IMAGE",+ "link": 712+ },+ {+ "localized_name": "image_4",+ "name": "images.image_4",+ "shape": 7,+ "type": "IMAGE",+ "link": 713+ },+ {+ "localized_name": "image_5",+ "name": "images.image_5",+ "shape": 7,+ "type": "IMAGE",+ "link": 714+ },+ {+ "localized_name": "image_6",+ "name": "images.image_6",+ "shape": 7,+ "type": "IMAGE",+ "link": 715+ },+ {+ "localized_name": "image_7",+ "name": "images.image_7",+ "shape": 7,+ "type": "IMAGE",+ "link": 716+ },+ {+ "localized_name": "image_8",+ "name": "images.image_8",+ "shape": 7,+ "type": "IMAGE",+ "link": 717+ },+ {+ "localized_name": "image_9",+ "name": "images.image_9",+ "shape": 7,+ "type": "IMAGE",+ "link": 718+ },+ {+ "localized_name": "image_10",+ "name": "images.image_10",+ "shape": 7,+ "type": "IMAGE",+ "link": 719+ }+ ],+ "outputs": [+ {+ "localized_name": "positive",+ "name": "positive",+ "type": "CONDITIONING",+ "links": [+ 909+ ]+ },+ {+ "localized_name": "negative",+ "name": "negative",+ "type": "CONDITIONING",+ "links": [+ 910+ ]+ },+ {+ "localized_name": "latent",+ "name": "latent",+ "type": "LATENT",+ "links": [+ 724+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "TextEncodeQwenImage21"+ },+ "widgets_values": [+ "",+ "",+ 1024+ ],+ "widgets_values_named": {+ "prompt": "",+ "negative_prompt": "",+ "resolution": 1024+ }+ },+ {+ "id": 477,+ "type": "CLIPLoader",+ "pos": [+ -180,+ -480+ ],+ "size": [+ 530,+ 120+ ],+ "flags": {},+ "order": 10,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "clip_name",+ "name": "clip_name",+ "type": "COMBO",+ "widget": {+ "name": "clip_name"+ },+ "link": 746+ }+ ],+ "outputs": [+ {+ "localized_name": "CLIP",+ "name": "CLIP",+ "type": "CLIP",+ "links": [+ 800+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "CLIPLoader",+ "models": [+ {+ "name": "qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors",+ "url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors",+ "directory": "text_encoders"+ }+ ]+ },+ "widgets_values": [+ "qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors",+ "qwen_image",+ "default"+ ],+ "widgets_values_named": {+ "clip_name": "qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors",+ "type": "qwen_image",+ "device": "default"+ }+ },+ {+ "id": 479,+ "type": "PrimitiveStringMultiline",+ "pos": [+ -180,+ 10+ ],+ "size": [+ 620,+ 240+ ],+ "flags": {},+ "order": 0,+ "mode": 0,+ "inputs": [],+ "outputs": [+ {+ "localized_name": "STRING",+ "name": "STRING",+ "type": "STRING",+ "links": [+ 901+ ]+ }+ ],+ "title": "Text (System Prompt)",+ "properties": {+ "Node name for S&R": "PrimitiveStringMultiline"+ },+ "widgets_values": [+ "# Edit Prompt Enhancer — General (v2, 精简版)\n\n**FIRST — there are TWO separate language decisions. Do NOT conflate them.**\n\n**(A) Language of the rewritten prompt's DESCRIPTIVE prose — every word OUTSIDE double quotes (the description you write for the diffusion model, NOT the text painted into the image). This decision is final and non-negotiable:**\n- User instruction is in Chinese → write the description in Chinese.\n- User instruction is in English → write the description in English.\n- User instruction is in ANY other language (Japanese, Korean, French, Spanish, Thai, etc.) → write the description in English.\n\n**(B) Language of the TEXT THAT WILL BE RENDERED INTO THE OUTPUT IMAGE — the content INSIDE double quotes. Decide it in this strict priority order:**\n1. If the user's instruction gives the exact text to write, OR names a target language for the text (e.g. \"改成'夏日特惠'\", \"把标题写成英文\", \"add a Japanese title\", \"write the caption in Thai\") → render exactly that text / in exactly that specified language.\n2. Otherwise, if the input image already contains text → render in the DOMINANT language of the image's existing text — even when the instruction is written in a different language.\n3. Otherwise (the image contains no text AND the instruction names no target language) → render in the language of the user's instruction itself — including Japanese, Korean, Thai, Arabic, French, etc. Do NOT force it to English.\nWorked example: image is mostly Thai, instruction is in English asking to add/redesign a title without giving the exact words or a language → the rendered (quoted) text must be **Thai** (the image's dominant language), while the surrounding description (A) is still written in English.\n\nTwo reinforcements on decision (B): all rendered (quoted) text must be **monolingual** — do not mix Chinese and English inside the quotes and do not emit a bilingual pair unless the user explicitly asks for one. And **genre never overrides input language**: a \"spec sheet / cinematic data-document / storyboard / technical parameter\" look is achieved through layout and typography, NOT by switching rendered labels to English — every header, label, and caption stays in the decided language (standardized units and user-given proper nouns may remain Latin).\n\nYou are an expert at clarifying image editing instructions. Given a user's vague or ambiguous edit instruction and the input image(s), rewrite it into a precise, unambiguous, actionable editing directive. An input image is ALWAYS present — this is always an image-editing task, never text-to-image from nothing.\n\n## Core Objective\n\nRewrite the instruction so a downstream image-editing model can execute it without guessing — anchored on what the input image(s) actually show, faithful to the user's intent, inventing nothing.\n\n**How much you build is intent-branched.** When the user wants *this picture changed* (a local object/attribute/background edit, a text or UI edit, a quality or style change, a viewpoint/canvas transform), clarify and constrain: say exactly what changes, and let everything else stand. When the user wants *a new picture of this subject* (placing a subject in a new scene, compositing across images, a photo-shoot or poster or infographic built from a reference), construct actively: design the scene, lighting, composition and layout to a professional standard. Scale the elaboration to what was asked — a plain placement stays restrained, a styled shoot or a publication-grade poster is built out fully.\n\n## The Governing Principle — Attribute Disentanglement at Full Strength\n\n**Edit exactly the attribute(s) the user named, push each to a strong and unmistakable degree, and hold everything else at input fidelity.**\n\nBoth halves matter, and the two failure modes are symmetric:\n\n- **Leakage** — touching what the user did not name (a sharpen that re-grades color, an upscale that reframes, a style change that drifts a face, an outfit swap that drops an accessory, a background change that \"helpfully\" cleans up something unmentioned).\n- **Under-editing** — an output a viewer could mistake for the unedited input, because the requested change was applied faintly.\n\nPreservation locks **content, never edit strength**. Recognizability is bought by naming what stays fixed, not by holding the effect back.\n\n## What to Anchor, What to Decide\n\n**Anchor on the image.** Every spatial, tonal and contextual claim comes from what is visibly there. If you are unsure a detail exists, leave it out — a preserved element described at a higher level of abstraction is always safer than an invented specific.\n\n**Say what stays, without repainting it.** Name the untargeted content by type, position and role rather than describing its appearance, and prefer one blanket preservation clause over walking the frame. A preservation description reads to the model as a generation instruction: the more concretely you describe something you meant to keep, the more likely it drifts. Describe appearance concretely only for what you are actually changing, or when it is the only way to disambiguate between similar objects.\n\n**Identity is the hardest invariant.** A person's facial identity and the personal accessories that make them recognizable; a product's exact design, markings and count; and the input's rendering medium (photograph, anime, illustration, sketch, 3D render, painting) all survive every edit unless the user explicitly targets them. When identity comes from a reference image, point at that image rather than describing features in words — verbal descriptions make the model regenerate and degrade the likeness.\n\n**Resolve ambiguity, then commit.** Turn vague intent, imprecise spatial reference and unparameterized style words into something concrete and observable. Translate abstract quality language into the visual properties it implies. Where the instruction offers alternatives or contradicts itself, pick the most reasonable reading and state it as a decision. Keep the user's own action verb, spatial relations and described state intact, and treat anything they asked to preserve as absolute. Preserve creative or physically impossible intent rather than correcting it.\n\n**Only what was asked.** Do not add operations the user did not request, and do not clean up unmentioned defects, overlays or clutter however prominent they look. When an edit removes, moves or reveals something, say enough about the newly exposed region that the result stays physically coherent.\n\n**Text in the image is literal.** Whenever readable text will appear in the output, commit to the exact characters — every element, quoted, nothing summarized or abbreviated away. Text you cannot commit to should not be added at all. Match the typography and language the input establishes unless the user asks otherwise. When the operation extends the canvas outward, name it as outpainting explicitly.\n\n**Write it as an instruction.** Lead with the operation, not a description of the finished picture, and write from the perspective of someone holding only the input image(s).\n\n## Thinking Process\n\nBefore emitting the final prompt, reason through: what the image(s) actually contain (including a complete reading of any text present); what the user is asking for and which attributes that names; what must therefore stay fixed; and finally the composed directive. Close with a check that every visible element is either the target of the edit or covered by what stays fixed, that the requested change is unmistakable, that nothing outside the target was touched, and that every quoted string obeys language decision (B).\n\n## Image Reference Rules\n\nFor Multi-Image Input (N >= 2), the rewritten instruction MUST use `<image1>`, `<image2>`, ... to refer to each input image. Do not use natural language references like \"图1\", \"第一张图\", \"the first image\", or \"image A\". This tagging format is mandatory and non-negotiable. For single-image input (N = 1), do NOT use tags — refer to the image naturally (\"图像\", \"图片中\", \"the image\").\n\nState each image's role explicitly — which one is the canvas whose composition and untargeted content survive, and which supply material to transfer — and say what is taken from each. For scene generation with no canvas (合影/合照 and the like), all images serve as identity sources. Describe every referenced image individually; never compress several into a range or a group to avoid describing them one by one.\n\n## Output Format\nOutput ONLY the rewritten editing instruction itself: one single continuous paragraph of plain text.\n\nFormatting rules:\n- The entire rewritten prompt must be a single continuous paragraph with NO line breaks or newline characters.\n- The response must contain nothing except the instruction itself: no object or array wrapper, no field names or key-value pairs, no headings, labels, or prefaces, no greetings, explanations, or commentary, no markdown, and no code fences. Begin with the first word of the instruction and end with its last word.\n- Do not wrap the whole instruction in quotes: double quotes are reserved for text that will be RENDERED in the image (next rule).\n- All text that should appear as visible, readable content in the output image must be enclosed in double quotes (\"\"). Descriptive or structural language that does not appear as rendered text should NOT be quoted.\n- **Never include any resolution or aspect ratio information** (e.g., \"2:3\", \"16:9\", \"1920x1080\", \"2K\", \"4K\"). Output size is decided downstream, not by you.\n- Write it out in full — no ellipsis, no truncation.\n- State requirements affirmatively (\"保持背景与输入图完全一致\") rather than as prohibitions (\"禁止改变背景\"). Standard preservation phrasing \"保持/保留[X]不变\" is fine.\n- Be precise and decisive: no hedging, no unresolved alternatives, no vague degree words left unresolved.\n- The descriptive prose (outside double quotes) follows language decision (A); the text rendered inside the image (inside double quotes) follows language decision (B). Retain proper nouns and domain-specific terms in their original language, placed in English double quotes.\n- **Language-purge self-check (do this last)**: re-scan every double-quoted string — the text that will be RENDERED in the image — and enforce language decision (B). No quoted string may mix Chinese and English, form a bilingual pair, or carry a parenthetical translation gloss unless the user explicitly asked. Standardized units and user-given proper nouns may remain Latin.\n\nThe user's edit instruction to rewrite is:"+ ],+ "widgets_values_named": {+ "value": "# Edit Prompt Enhancer — General (v2, 精简版)\n\n**FIRST — there are TWO separate language decisions. Do NOT conflate them.**\n\n**(A) Language of the rewritten prompt's DESCRIPTIVE prose — every word OUTSIDE double quotes (the description you write for the diffusion model, NOT the text painted into the image). This decision is final and non-negotiable:**\n- User instruction is in Chinese → write the description in Chinese.\n- User instruction is in English → write the description in English.\n- User instruction is in ANY other language (Japanese, Korean, French, Spanish, Thai, etc.) → write the description in English.\n\n**(B) Language of the TEXT THAT WILL BE RENDERED INTO THE OUTPUT IMAGE — the content INSIDE double quotes. Decide it in this strict priority order:**\n1. If the user's instruction gives the exact text to write, OR names a target language for the text (e.g. \"改成'夏日特惠'\", \"把标题写成英文\", \"add a Japanese title\", \"write the caption in Thai\") → render exactly that text / in exactly that specified language.\n2. Otherwise, if the input image already contains text → render in the DOMINANT language of the image's existing text — even when the instruction is written in a different language.\n3. Otherwise (the image contains no text AND the instruction names no target language) → render in the language of the user's instruction itself — including Japanese, Korean, Thai, Arabic, French, etc. Do NOT force it to English.\nWorked example: image is mostly Thai, instruction is in English asking to add/redesign a title without giving the exact words or a language → the rendered (quoted) text must be **Thai** (the image's dominant language), while the surrounding description (A) is still written in English.\n\nTwo reinforcements on decision (B): all rendered (quoted) text must be **monolingual** — do not mix Chinese and English inside the quotes and do not emit a bilingual pair unless the user explicitly asks for one. And **genre never overrides input language**: a \"spec sheet / cinematic data-document / storyboard / technical parameter\" look is achieved through layout and typography, NOT by switching rendered labels to English — every header, label, and caption stays in the decided language (standardized units and user-given proper nouns may remain Latin).\n\nYou are an expert at clarifying image editing instructions. Given a user's vague or ambiguous edit instruction and the input image(s), rewrite it into a precise, unambiguous, actionable editing directive. An input image is ALWAYS present — this is always an image-editing task, never text-to-image from nothing.\n\n## Core Objective\n\nRewrite the instruction so a downstream image-editing model can execute it without guessing — anchored on what the input image(s) actually show, faithful to the user's intent, inventing nothing.\n\n**How much you build is intent-branched.** When the user wants *this picture changed* (a local object/attribute/background edit, a text or UI edit, a quality or style change, a viewpoint/canvas transform), clarify and constrain: say exactly what changes, and let everything else stand. When the user wants *a new picture of this subject* (placing a subject in a new scene, compositing across images, a photo-shoot or poster or infographic built from a reference), construct actively: design the scene, lighting, composition and layout to a professional standard. Scale the elaboration to what was asked — a plain placement stays restrained, a styled shoot or a publication-grade poster is built out fully.\n\n## The Governing Principle — Attribute Disentanglement at Full Strength\n\n**Edit exactly the attribute(s) the user named, push each to a strong and unmistakable degree, and hold everything else at input fidelity.**\n\nBoth halves matter, and the two failure modes are symmetric:\n\n- **Leakage** — touching what the user did not name (a sharpen that re-grades color, an upscale that reframes, a style change that drifts a face, an outfit swap that drops an accessory, a background change that \"helpfully\" cleans up something unmentioned).\n- **Under-editing** — an output a viewer could mistake for the unedited input, because the requested change was applied faintly.\n\nPreservation locks **content, never edit strength**. Recognizability is bought by naming what stays fixed, not by holding the effect back.\n\n## What to Anchor, What to Decide\n\n**Anchor on the image.** Every spatial, tonal and contextual claim comes from what is visibly there. If you are unsure a detail exists, leave it out — a preserved element described at a higher level of abstraction is always safer than an invented specific.\n\n**Say what stays, without repainting it.** Name the untargeted content by type, position and role rather than describing its appearance, and prefer one blanket preservation clause over walking the frame. A preservation description reads to the model as a generation instruction: the more concretely you describe something you meant to keep, the more likely it drifts. Describe appearance concretely only for what you are actually changing, or when it is the only way to disambiguate between similar objects.\n\n**Identity is the hardest invariant.** A person's facial identity and the personal accessories that make them recognizable; a product's exact design, markings and count; and the input's rendering medium (photograph, anime, illustration, sketch, 3D render, painting) all survive every edit unless the user explicitly targets them. When identity comes from a reference image, point at that image rather than describing features in words — verbal descriptions make the model regenerate and degrade the likeness.\n\n**Resolve ambiguity, then commit.** Turn vague intent, imprecise spatial reference and unparameterized style words into something concrete and observable. Translate abstract quality language into the visual properties it implies. Where the instruction offers alternatives or contradicts itself, pick the most reasonable reading and state it as a decision. Keep the user's own action verb, spatial relations and described state intact, and treat anything they asked to preserve as absolute. Preserve creative or physically impossible intent rather than correcting it.\n\n**Only what was asked.** Do not add operations the user did not request, and do not clean up unmentioned defects, overlays or clutter however prominent they look. When an edit removes, moves or reveals something, say enough about the newly exposed region that the result stays physically coherent.\n\n**Text in the image is literal.** Whenever readable text will appear in the output, commit to the exact characters — every element, quoted, nothing summarized or abbreviated away. Text you cannot commit to should not be added at all. Match the typography and language the input establishes unless the user asks otherwise. When the operation extends the canvas outward, name it as outpainting explicitly.\n\n**Write it as an instruction.** Lead with the operation, not a description of the finished picture, and write from the perspective of someone holding only the input image(s).\n\n## Thinking Process\n\nBefore emitting the final prompt, reason through: what the image(s) actually contain (including a complete reading of any text present); what the user is asking for and which attributes that names; what must therefore stay fixed; and finally the composed directive. Close with a check that every visible element is either the target of the edit or covered by what stays fixed, that the requested change is unmistakable, that nothing outside the target was touched, and that every quoted string obeys language decision (B).\n\n## Image Reference Rules\n\nFor Multi-Image Input (N >= 2), the rewritten instruction MUST use `<image1>`, `<image2>`, ... to refer to each input image. Do not use natural language references like \"图1\", \"第一张图\", \"the first image\", or \"image A\". This tagging format is mandatory and non-negotiable. For single-image input (N = 1), do NOT use tags — refer to the image naturally (\"图像\", \"图片中\", \"the image\").\n\nState each image's role explicitly — which one is the canvas whose composition and untargeted content survive, and which supply material to transfer — and say what is taken from each. For scene generation with no canvas (合影/合照 and the like), all images serve as identity sources. Describe every referenced image individually; never compress several into a range or a group to avoid describing them one by one.\n\n## Output Format\nOutput ONLY the rewritten editing instruction itself: one single continuous paragraph of plain text.\n\nFormatting rules:\n- The entire rewritten prompt must be a single continuous paragraph with NO line breaks or newline characters.\n- The response must contain nothing except the instruction itself: no object or array wrapper, no field names or key-value pairs, no headings, labels, or prefaces, no greetings, explanations, or commentary, no markdown, and no code fences. Begin with the first word of the instruction and end with its last word.\n- Do not wrap the whole instruction in quotes: double quotes are reserved for text that will be RENDERED in the image (next rule).\n- All text that should appear as visible, readable content in the output image must be enclosed in double quotes (\"\"). Descriptive or structural language that does not appear as rendered text should NOT be quoted.\n- **Never include any resolution or aspect ratio information** (e.g., \"2:3\", \"16:9\", \"1920x1080\", \"2K\", \"4K\"). Output size is decided downstream, not by you.\n- Write it out in full — no ellipsis, no truncation.\n- State requirements affirmatively (\"保持背景与输入图完全一致\") rather than as prohibitions (\"禁止改变背景\"). Standard preservation phrasing \"保持/保留[X]不变\" is fine.\n- Be precise and decisive: no hedging, no unresolved alternatives, no vague degree words left unresolved.\n- The descriptive prose (outside double quotes) follows language decision (A); the text rendered inside the image (inside double quotes) follows language decision (B). Retain proper nouns and domain-specific terms in their original language, placed in English double quotes.\n- **Language-purge self-check (do this last)**: re-scan every double-quoted string — the text that will be RENDERED in the image — and enforce language decision (B). No quoted string may mix Chinese and English, form a bilingual pair, or carry a parenthetical translation gloss unless the user explicitly asked. Standardized units and user-given proper nouns may remain Latin.\n\nThe user's edit instruction to rewrite is:"+ }+ },+ {+ "id": 480,+ "type": "PreviewAny",+ "pos": [+ 1040,+ -480+ ],+ "size": [+ 470,+ 680+ ],+ "flags": {},+ "order": 11,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "source",+ "name": "source",+ "type": "*",+ "link": 791+ }+ ],+ "outputs": [+ {+ "localized_name": "STRING",+ "name": "STRING",+ "type": "STRING",+ "links": [+ 743+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "PreviewAny"+ },+ "widgets_values": [],+ "widgets_values_named": {}+ },+ {+ "id": 484,+ "type": "ComfySwitchNode",+ "pos": [+ 620,+ 120+ ],+ "size": [+ 270,+ 80+ ],+ "flags": {},+ "order": 12,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "on_false",+ "name": "on_false",+ "shape": 7,+ "type": "STRING",+ "link": 739+ },+ {+ "localized_name": "on_true",+ "name": "on_true",+ "shape": 7,+ "type": "STRING",+ "link": 806+ },+ {+ "localized_name": "switch",+ "name": "switch",+ "type": "BOOLEAN",+ "widget": {+ "name": "switch"+ },+ "link": 741+ }+ ],+ "outputs": [+ {+ "localized_name": "output",+ "name": "output",+ "type": "STRING",+ "links": [+ 791+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "ComfySwitchNode"+ },+ "widgets_values": [+ false+ ],+ "widgets_values_named": {+ "switch": false+ }+ },+ {+ "id": 485,+ "type": "BatchImagesNode",+ "pos": [+ -180,+ -310+ ],+ "size": [+ 230,+ 270+ ],+ "flags": {},+ "order": 13,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "image0",+ "name": "images.image0",+ "type": "IMAGE",+ "link": 750+ },+ {+ "localized_name": "image1",+ "name": "images.image1",+ "shape": 7,+ "type": "IMAGE",+ "link": 779+ },+ {+ "localized_name": "image5",+ "name": "images.image5",+ "shape": 7,+ "type": "IMAGE",+ "link": 780+ },+ {+ "localized_name": "image6",+ "name": "images.image6",+ "shape": 7,+ "type": "IMAGE",+ "link": 781+ },+ {+ "localized_name": "image7",+ "name": "images.image7",+ "shape": 7,+ "type": "IMAGE",+ "link": 782+ },+ {+ "localized_name": "image8",+ "name": "images.image8",+ "shape": 7,+ "type": "IMAGE",+ "link": 783+ },+ {+ "localized_name": "image9",+ "name": "images.image9",+ "shape": 7,+ "type": "IMAGE",+ "link": 784+ },+ {+ "localized_name": "image10",+ "name": "images.image10",+ "shape": 7,+ "type": "IMAGE",+ "link": 785+ },+ {+ "localized_name": "image11",+ "name": "images.image11",+ "shape": 7,+ "type": "IMAGE",+ "link": 786+ },+ {+ "localized_name": "image12",+ "name": "images.image12",+ "shape": 7,+ "type": "IMAGE",+ "link": 787+ },+ {+ "localized_name": "image13",+ "name": "images.image13",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "localized_name": "image2",+ "name": "images.image2",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ }+ ],+ "outputs": [+ {+ "localized_name": "IMAGE",+ "name": "IMAGE",+ "type": "IMAGE",+ "links": [+ 801+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "BatchImagesNode"+ }+ },+ {+ "id": 500,+ "type": "TextGenerate",+ "pos": [+ 500,+ -480+ ],+ "size": [+ 400,+ 460+ ],+ "flags": {},+ "order": 14,+ "mode": 0,+ "showAdvanced": true,+ "inputs": [+ {+ "localized_name": "clip",+ "name": "clip",+ "type": "CLIP",+ "link": 800+ },+ {+ "localized_name": "image",+ "name": "image",+ "shape": 7,+ "type": "IMAGE",+ "link": 801+ },+ {+ "localized_name": "video",+ "name": "video",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "localized_name": "audio",+ "name": "audio",+ "shape": 7,+ "type": "AUDIO",+ "link": null+ },+ {+ "localized_name": "system_prompt",+ "name": "system_prompt",+ "shape": 7,+ "type": "STRING",+ "link": 901+ },+ {+ "localized_name": "prompt",+ "name": "prompt",+ "type": "STRING",+ "widget": {+ "name": "prompt"+ },+ "link": 802+ },+ {+ "localized_name": "max_length",+ "name": "max_length",+ "type": "INT",+ "widget": {+ "name": "max_length"+ },+ "link": 903+ },+ {+ "localized_name": "seed",+ "name": "sampling_mode.seed",+ "type": "INT",+ "widget": {+ "name": "sampling_mode.seed"+ },+ "link": 804+ },+ {+ "localized_name": "thinking",+ "name": "thinking",+ "shape": 7,+ "type": "BOOLEAN",+ "widget": {+ "name": "thinking"+ },+ "link": 902+ }+ ],+ "outputs": [+ {+ "localized_name": "generated_text",+ "name": "generated_text",+ "type": "STRING",+ "links": [+ 806+ ]+ },+ {+ "localized_name": "thinking",+ "name": "thinking",+ "type": "STRING",+ "links": null+ }+ ],+ "properties": {+ "Node name for S&R": "TextGenerate"+ },+ "widgets_values": [+ "",+ 4096,+ "on",+ 1,+ 20,+ 0.95,+ 0,+ 1,+ 0,+ 0,+ true,+ true,+ "auto"+ ],+ "widgets_values_named": {+ "prompt": "",+ "max_length": 4096,+ "sampling_mode": "on",+ "sampling_mode.temperature": 1,+ "sampling_mode.top_k": 20,+ "sampling_mode.top_p": 0.95,+ "sampling_mode.min_p": 0,+ "sampling_mode.repetition_penalty": 1,+ "sampling_mode.seed": 0,+ "sampling_mode.presence_penalty": 0,+ "thinking": true,+ "use_default_template": true,+ "mtp": "auto"+ }+ },+ {+ "id": 502,+ "type": "ManualSigmas",+ "pos": [+ 965.7365870616367,+ 1053.9252521551643+ ],+ "size": [+ 418.9732421875,+ 58+ ],+ "flags": {},+ "order": 1,+ "mode": 0,+ "inputs": [],+ "outputs": [+ {+ "localized_name": "SIGMAS",+ "name": "SIGMAS",+ "type": "SIGMAS",+ "links": [+ 906+ ]+ }+ ],+ "title": "Manual Sigmas (Qwen-Image-2.1-Turbo 8-step schedule)",+ "properties": {+ "Node name for S&R": "ManualSigmas"+ },+ "widgets_values": [+ "1.0, 0.978453, 0.95418, 0.926626, 0.89508, 0.845148, 0.704534, 0.414568, 0"+ ],+ "widgets_values_named": {+ "sigmas": "1.0, 0.978453, 0.95418, 0.926626, 0.89508, 0.845148, 0.704534, 0.414568, 0"+ }+ },+ {+ "id": 503,+ "type": "KSamplerSelect",+ "pos": [+ 956.9532525294051,+ 907.865461371432+ ],+ "size": [+ 270,+ 58+ ],+ "flags": {},+ "order": 15,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "sampler_name",+ "name": "sampler_name",+ "type": "COMBO",+ "widget": {+ "name": "sampler_name"+ },+ "link": 915+ }+ ],+ "outputs": [+ {+ "localized_name": "SAMPLER",+ "name": "SAMPLER",+ "type": "SAMPLER",+ "links": [+ 905+ ]+ }+ ],+ "title": "KSampler Select (euler)",+ "properties": {+ "Node name for S&R": "KSamplerSelect"+ },+ "widgets_values": [+ "euler"+ ],+ "widgets_values_named": {+ "sampler_name": "euler"+ }+ },+ {+ "id": 504,+ "type": "RandomNoise",+ "pos": [+ 956.9532525294051,+ 571.865461371432+ ],+ "size": [+ 270,+ 82+ ],+ "flags": {},+ "order": 16,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "noise_seed",+ "name": "noise_seed",+ "type": "INT",+ "widget": {+ "name": "noise_seed"+ },+ "link": 914+ }+ ],+ "outputs": [+ {+ "localized_name": "NOISE",+ "name": "NOISE",+ "type": "NOISE",+ "links": [+ 904+ ]+ }+ ],+ "title": "Random Noise",+ "properties": {+ "Node name for S&R": "RandomNoise"+ },+ "widgets_values": [+ 424242,+ "randomize"+ ],+ "widgets_values_named": {+ "noise_seed": 424242,+ "control_after_generate": "randomize"+ }+ },+ {+ "id": 505,+ "type": "SamplerCustomAdvanced",+ "pos": [+ 1284.3410123920985,+ 595.4249474282406+ ],+ "size": [+ 220.2388671875,+ 106+ ],+ "flags": {},+ "order": 17,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "noise",+ "name": "noise",+ "type": "NOISE",+ "link": 904+ },+ {+ "localized_name": "guider",+ "name": "guider",+ "type": "GUIDER",+ "link": 912+ },+ {+ "localized_name": "sampler",+ "name": "sampler",+ "type": "SAMPLER",+ "link": 905+ },+ {+ "localized_name": "sigmas",+ "name": "sigmas",+ "type": "SIGMAS",+ "link": 906+ },+ {+ "localized_name": "latent_image",+ "name": "latent_image",+ "type": "LATENT",+ "link": 913+ }+ ],+ "outputs": [+ {+ "localized_name": "output",+ "name": "output",+ "type": "LATENT",+ "links": [+ 907+ ]+ },+ {+ "localized_name": "denoised_output",+ "name": "denoised_output",+ "type": "LATENT",+ "links": []+ }+ ],+ "title": "Sampler Custom Advanced",+ "properties": {+ "Node name for S&R": "SamplerCustomAdvanced"+ }+ },+ {+ "id": 507,+ "type": "CFGGuider",+ "pos": [+ 956.9532525294051,+ 731.865461371432+ ],+ "size": [+ 270,+ 98+ ],+ "flags": {},+ "order": 18,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "model",+ "name": "model",+ "type": "MODEL",+ "link": 908+ },+ {+ "localized_name": "positive",+ "name": "positive",+ "type": "CONDITIONING",+ "link": 909+ },+ {+ "localized_name": "negative",+ "name": "negative",+ "type": "CONDITIONING",+ "link": 910+ },+ {+ "localized_name": "cfg",+ "name": "cfg",+ "type": "FLOAT",+ "widget": {+ "name": "cfg"+ },+ "link": 911+ }+ ],+ "outputs": [+ {+ "localized_name": "GUIDER",+ "name": "GUIDER",+ "type": "GUIDER",+ "links": [+ 912+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "CFGGuider"+ },+ "widgets_values": [+ 8+ ],+ "widgets_values_named": {+ "cfg": 8+ }+ }+ ],+ "groups": [+ {+ "id": 34,+ "title": "Models",+ "bounding": [+ -200,+ 300,+ 530,+ 590+ ],+ "color": "#3f789e",+ "flags": {}+ },+ {+ "id": 35,+ "title": "Image Size",+ "bounding": [+ -200,+ 920,+ 530,+ 250+ ],+ "color": "#3f789e",+ "flags": {}+ },+ {+ "id": 36,+ "title": "Conditioning",+ "bounding": [+ 360,+ 300,+ 530.8552941790844,+ 871.7338850953031+ ],+ "color": "#3f789e",+ "flags": {}+ },+ {+ "id": 37,+ "title": "Sampling",+ "bounding": [+ 924.1133558908087,+ 299.72738075964855,+ 633.5751735791238,+ 874.5578559968081+ ],+ "color": "#3f789e",+ "flags": {}+ },+ {+ "id": 38,+ "title": "Prompt Enhancer",+ "bounding": [+ -200,+ -560,+ 1750,+ 830+ ],+ "color": "#3f789e",+ "flags": {}+ }+ ],+ "links": [+ {+ "id": 649,+ "origin_id": 454,+ "origin_slot": 0,+ "target_id": 457,+ "target_slot": 1,+ "type": "VAE"+ },+ {+ "id": 650,+ "origin_id": 457,+ "origin_slot": 0,+ "target_id": -20,+ "target_slot": 0,+ "type": "IMAGE"+ },+ {+ "id": 684,+ "origin_id": 456,+ "origin_slot": 0,+ "target_id": 468,+ "target_slot": 1,+ "type": "LATENT"+ },+ {+ "id": 688,+ "origin_id": 451,+ "origin_slot": 0,+ "target_id": 469,+ "target_slot": 0,+ "type": "MODEL"+ },+ {+ "id": 724,+ "origin_id": 474,+ "origin_slot": 2,+ "target_id": 468,+ "target_slot": 0,+ "type": "LATENT"+ },+ {+ "id": 791,+ "origin_id": 484,+ "origin_slot": 0,+ "target_id": 480,+ "target_slot": 0,+ "type": "STRING"+ },+ {+ "id": 806,+ "origin_id": 500,+ "origin_slot": 0,+ "target_id": 484,+ "target_slot": 1,+ "type": "STRING"+ },+ {+ "id": 739,+ "origin_id": -10,+ "origin_slot": 1,+ "target_id": 484,+ "target_slot": 0,+ "type": "STRING"+ },+ {+ "id": 741,+ "origin_id": -10,+ "origin_slot": 2,+ "target_id": 484,+ "target_slot": 2,+ "type": "BOOLEAN"+ },+ {+ "id": 904,+ "origin_id": 504,+ "origin_slot": 0,+ "target_id": 505,+ "target_slot": 0,+ "type": "NOISE"+ },+ {+ "id": 905,+ "origin_id": 503,+ "origin_slot": 0,+ "target_id": 505,+ "target_slot": 2,+ "type": "SAMPLER"+ },+ {+ "id": 906,+ "origin_id": 502,+ "origin_slot": 0,+ "target_id": 505,+ "target_slot": 3,+ "type": "SIGMAS"+ },+ {+ "id": 907,+ "origin_id": 505,+ "origin_slot": 0,+ "target_id": 457,+ "target_slot": 0,+ "type": "LATENT"+ },+ {+ "id": 908,+ "origin_id": 469,+ "origin_slot": 0,+ "target_id": 507,+ "target_slot": 0,+ "type": "MODEL"+ },+ {+ "id": 909,+ "origin_id": 474,+ "origin_slot": 0,+ "target_id": 507,+ "target_slot": 1,+ "type": "CONDITIONING"+ },+ {+ "id": 910,+ "origin_id": 474,+ "origin_slot": 1,+ "target_id": 507,+ "target_slot": 2,+ "type": "CONDITIONING"+ },+ {+ "id": 911,+ "origin_id": -10,+ "origin_slot": 6,+ "target_id": 507,+ "target_slot": 3,+ "type": "FLOAT"+ },+ {+ "id": 912,+ "origin_id": 507,+ "origin_slot": 0,+ "target_id": 505,+ "target_slot": 1,+ "type": "GUIDER"+ },+ {+ "id": 913,+ "origin_id": 468,+ "origin_slot": 0,+ "target_id": 505,+ "target_slot": 4,+ "type": "LATENT"+ },+ {+ "id": 703,+ "origin_id": -10,+ "origin_slot": 7,+ "target_id": 468,+ "target_slot": 2,+ "type": "BOOLEAN"+ },+ {+ "id": 660,+ "origin_id": -10,+ "origin_slot": 8,+ "target_id": 456,+ "target_slot": 0,+ "type": "INT"+ },+ {+ "id": 661,+ "origin_id": -10,+ "origin_slot": 9,+ "target_id": 456,+ "target_slot": 1,+ "type": "INT"+ },+ {+ "id": 915,+ "origin_id": -10,+ "origin_slot": 10,+ "target_id": 503,+ "target_slot": 0,+ "type": "COMBO"+ },+ {+ "id": 914,+ "origin_id": -10,+ "origin_slot": 11,+ "target_id": 504,+ "target_slot": 0,+ "type": "INT"+ },+ {+ "id": 663,+ "origin_id": -10,+ "origin_slot": 12,+ "target_id": 451,+ "target_slot": 0,+ "type": "COMBO"+ },+ {+ "id": 664,+ "origin_id": -10,+ "origin_slot": 13,+ "target_id": 453,+ "target_slot": 0,+ "type": "COMBO"+ },+ {+ "id": 665,+ "origin_id": -10,+ "origin_slot": 14,+ "target_id": 454,+ "target_slot": 0,+ "type": "COMBO"+ },+ {+ "id": 729,+ "origin_id": -10,+ "origin_slot": 15,+ "target_id": 469,+ "target_slot": 1,+ "type": "COMBO"+ },+ {+ "id": 730,+ "origin_id": -10,+ "origin_slot": 16,+ "target_id": 469,+ "target_slot": 2,+ "type": "COMBO"+ },+ {+ "id": 746,+ "origin_id": -10,+ "origin_slot": 17,+ "target_id": 477,+ "target_slot": 0,+ "type": "COMBO"+ },+ {+ "id": 721,+ "origin_id": 453,+ "origin_slot": 0,+ "target_id": 474,+ "target_slot": 0,+ "type": "CLIP"+ },+ {+ "id": 710,+ "origin_id": -10,+ "origin_slot": 18,+ "target_id": 474,+ "target_slot": 1,+ "type": "IMAGE"+ },+ {+ "id": 720,+ "origin_id": 454,+ "origin_slot": 0,+ "target_id": 474,+ "target_slot": 2,+ "type": "VAE"+ },+ {+ "id": 743,+ "origin_id": 480,+ "origin_slot": 0,+ "target_id": 474,+ "target_slot": 3,+ "type": "STRING"+ },+ {+ "id": 727,+ "origin_id": -10,+ "origin_slot": 5,+ "target_id": 474,+ "target_slot": 4,+ "type": "STRING"+ },+ {+ "id": 725,+ "origin_id": -10,+ "origin_slot": 0,+ "target_id": 474,+ "target_slot": 5,+ "type": "INT"+ },+ {+ "id": 711,+ "origin_id": -10,+ "origin_slot": 19,+ "target_id": 474,+ "target_slot": 8,+ "type": "IMAGE"+ },+ {+ "id": 712,+ "origin_id": -10,+ "origin_slot": 20,+ "target_id": 474,+ "target_slot": 9,+ "type": "IMAGE"+ },+ {+ "id": 713,+ "origin_id": -10,+ "origin_slot": 21,+ "target_id": 474,+ "target_slot": 10,+ "type": "IMAGE"+ },+ {+ "id": 714,+ "origin_id": -10,+ "origin_slot": 22,+ "target_id": 474,+ "target_slot": 11,+ "type": "IMAGE"+ },+ {+ "id": 715,+ "origin_id": -10,+ "origin_slot": 23,+ "target_id": 474,+ "target_slot": 12,+ "type": "IMAGE"+ },+ {+ "id": 716,+ "origin_id": -10,+ "origin_slot": 24,+ "target_id": 474,+ "target_slot": 13,+ "type": "IMAGE"+ },+ {+ "id": 717,+ "origin_id": -10,+ "origin_slot": 25,+ "target_id": 474,+ "target_slot": 14,+ "type": "IMAGE"+ },+ {+ "id": 718,+ "origin_id": -10,+ "origin_slot": 26,+ "target_id": 474,+ "target_slot": 15,+ "type": "IMAGE"+ },+ {+ "id": 719,+ "origin_id": -10,+ "origin_slot": 27,+ "target_id": 474,+ "target_slot": 16,+ "type": "IMAGE"+ },+ {+ "id": 750,+ "origin_id": -10,+ "origin_slot": 18,+ "target_id": 485,+ "target_slot": 0,+ "type": "IMAGE"+ },+ {+ "id": 779,+ "origin_id": -10,+ "origin_slot": 19,+ "target_id": 485,+ "target_slot": 1,+ "type": "IMAGE"+ },+ {+ "id": 780,+ "origin_id": -10,+ "origin_slot": 20,+ "target_id": 485,+ "target_slot": 2,+ "type": "IMAGE"+ },+ {+ "id": 781,+ "origin_id": -10,+ "origin_slot": 21,+ "target_id": 485,+ "target_slot": 3,+ "type": "IMAGE"+ },+ {+ "id": 782,+ "origin_id": -10,+ "origin_slot": 22,+ "target_id": 485,+ "target_slot": 4,+ "type": "IMAGE"+ },+ {+ "id": 783,+ "origin_id": -10,+ "origin_slot": 23,+ "target_id": 485,+ "target_slot": 5,+ "type": "IMAGE"+ },+ {+ "id": 784,+ "origin_id": -10,+ "origin_slot": 24,+ "target_id": 485,+ "target_slot": 6,+ "type": "IMAGE"+ },+ {+ "id": 785,+ "origin_id": -10,+ "origin_slot": 25,+ "target_id": 485,+ "target_slot": 7,+ "type": "IMAGE"+ },+ {+ "id": 786,+ "origin_id": -10,+ "origin_slot": 26,+ "target_id": 485,+ "target_slot": 8,+ "type": "IMAGE"+ },+ {+ "id": 787,+ "origin_id": -10,+ "origin_slot": 27,+ "target_id": 485,+ "target_slot": 9,+ "type": "IMAGE"+ },+ {+ "id": 800,+ "origin_id": 477,+ "origin_slot": 0,+ "target_id": 500,+ "target_slot": 0,+ "type": "CLIP"+ },+ {+ "id": 801,+ "origin_id": 485,+ "origin_slot": 0,+ "target_id": 500,+ "target_slot": 1,+ "type": "IMAGE"+ },+ {+ "id": 901,+ "origin_id": 479,+ "origin_slot": 0,+ "target_id": 500,+ "target_slot": 4,+ "type": "STRING"+ },+ {+ "id": 802,+ "origin_id": -10,+ "origin_slot": 1,+ "target_id": 500,+ "target_slot": 5,+ "type": "STRING"+ },+ {+ "id": 903,+ "origin_id": -10,+ "origin_slot": 4,+ "target_id": 500,+ "target_slot": 6,+ "type": "INT"+ },+ {+ "id": 804,+ "origin_id": -10,+ "origin_slot": 11,+ "target_id": 500,+ "target_slot": 7,+ "type": "INT"+ },+ {+ "id": 902,+ "origin_id": -10,+ "origin_slot": 3,+ "target_id": 500,+ "target_slot": 8,+ "type": "BOOLEAN"+ }+ ],+ "extra": {}+ }+ ]+ },+ "config": {},+ "extra": {+ "ds": {+ "scale": 0.4559674823113218,+ "offset": [+ 465.27254975856295,+ -1691.3529593002877+ ]+ },+ "frontendVersion": "1.55.14",+ "VHS_latentpreview": false,+ "VHS_latentpreviewrate": 0,+ "VHS_MetadataImage": true,+ "VHS_KeepIntermediate": true+ },+ "version": 0.4+}\ No newline at end of filediff --git a/src/api/__tests__/fixtures/comfy-ui/templates/image_qwen_image_2_1_turbo_t2i.json b/src/api/__tests__/fixtures/comfy-ui/templates/image_qwen_image_2_1_turbo_t2i.jsonnew file mode 100644index 00000000..973ae16c--- /dev/null+++ b/src/api/__tests__/fixtures/comfy-ui/templates/image_qwen_image_2_1_turbo_t2i.json@@ -0,0 +1,1930 @@+{+ "id": "54bb395d-3e60-4c94-b525-85523901575b",+ "revision": 0,+ "last_node_id": 490,+ "last_link_id": 728,+ "nodes": [+ {+ "id": 13,+ "type": "ResolutionSelector",+ "pos": [+ 584.0491078848647,+ 2771.518116188138+ ],+ "size": [+ 300,+ 190+ ],+ "flags": {},+ "order": 0,+ "mode": 0,+ "showAdvanced": false,+ "inputs": [],+ "outputs": [+ {+ "name": "width",+ "type": "INT",+ "links": [+ 670+ ]+ },+ {+ "name": "height",+ "type": "INT",+ "links": [+ 671+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "ResolutionSelector"+ },+ "widgets_values": [+ "1:1 (Square)",+ 1,+ 8+ ],+ "widgets_values_named": {+ "aspect_ratio": "1:1 (Square)",+ "megapixels": 1,+ "multiple": 8+ }+ },+ {+ "id": 459,+ "type": "c291ceec-b98f-4751-9d0b-7bc288f27b30",+ "pos": [+ 920,+ 2470+ ],+ "size": [+ 410,+ 610+ ],+ "flags": {},+ "order": 4,+ "mode": 0,+ "inputs": [+ {+ "label": "positive_prompt",+ "name": "prompt",+ "type": "STRING",+ "widget": {+ "name": "prompt"+ },+ "link": null+ },+ {+ "label": "refine_prompt",+ "name": "switch",+ "type": "BOOLEAN",+ "widget": {+ "name": "switch"+ },+ "link": null+ },+ {+ "label": "thinking_mode",+ "name": "thinking",+ "shape": 7,+ "type": "BOOLEAN",+ "widget": {+ "name": "thinking"+ },+ "link": null+ },+ {+ "name": "width",+ "type": "INT",+ "widget": {+ "name": "width"+ },+ "link": 670+ },+ {+ "name": "height",+ "type": "INT",+ "widget": {+ "name": "height"+ },+ "link": 671+ },+ {+ "label": "sampler",+ "name": "scheduler",+ "type": "COMBO",+ "widget": {+ "name": "scheduler"+ },+ "link": null+ },+ {+ "label": "PE_model",+ "name": "clip_name_1",+ "type": "COMBO",+ "widget": {+ "name": "clip_name_1"+ },+ "link": null+ },+ {+ "label": "cache_device",+ "name": "device",+ "type": "COMBO",+ "widget": {+ "name": "device"+ },+ "link": null+ },+ {+ "label": "dtype",+ "name": "dtype_1",+ "type": "COMBO",+ "widget": {+ "name": "dtype_1"+ },+ "link": null+ }+ ],+ "outputs": [+ {+ "name": "IMAGE",+ "type": "IMAGE",+ "links": [+ 672+ ]+ }+ ],+ "properties": {+ "previewExposures": []+ },+ "widgets_values": [+ "Underground techno event poster: black background, a two-line headline in heavy white grotesque capitals where the first line reads \"QWEN IMAGE\" and the second line reads \"2.1 TURBO\", both lines the same very large size and each spanning the full poster width edge to edge, stacked tightly one above the other in the upper half, the decimal point in \"2.1\" rendered as a clearly visible full-size square dot, a scattered pile of overlapping black-and-white halftone portrait photos showing a mixed cast of different people, an elderly man, a young woman, a child and a bearded man among them, arranged in two loose rows across the lower half, every face is razor sharp and crisply in focus with fine detailed halftone dots, high micro-contrast, thin white grid lines, small fluorescent orange accent shapes, two-colour risograph print texture, square 1:1 poster format, both headline lines equally prominent, spelling exactly correct letter by letter, no other readable words, no watermark",+ false,+ false,+ 4096,+ "",+ 1024,+ 1024,+ "euler",+ 447606998181262,+ "qwen_image_2.1_turbo_int8_convrot.safetensors",+ "qwen3vl_8b_int8_convrot.safetensors",+ "qwen_image_2.1_vae_bf16.safetensors",+ "qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",+ "auto",+ "default"+ ],+ "widgets_values_named": {+ "prompt": "Underground techno event poster: black background, a two-line headline in heavy white grotesque capitals where the first line reads \"QWEN IMAGE\" and the second line reads \"2.1 TURBO\", both lines the same very large size and each spanning the full poster width edge to edge, stacked tightly one above the other in the upper half, the decimal point in \"2.1\" rendered as a clearly visible full-size square dot, a scattered pile of overlapping black-and-white halftone portrait photos showing a mixed cast of different people, an elderly man, a young woman, a child and a bearded man among them, arranged in two loose rows across the lower half, every face is razor sharp and crisply in focus with fine detailed halftone dots, high micro-contrast, thin white grid lines, small fluorescent orange accent shapes, two-colour risograph print texture, square 1:1 poster format, both headline lines equally prominent, spelling exactly correct letter by letter, no other readable words, no watermark",+ "switch": false,+ "thinking": false,+ "max_length": 4096,+ "negative_prompt": "",+ "width": 1024,+ "height": 1024,+ "scheduler": "euler",+ "seed": 447606998181262,+ "unet_name": "qwen_image_2.1_turbo_int8_convrot.safetensors",+ "clip_name": "qwen3vl_8b_int8_convrot.safetensors",+ "vae_name": "qwen_image_2.1_vae_bf16.safetensors",+ "clip_name_1": "qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",+ "device": "auto",+ "dtype_1": "default"+ }+ },+ {+ "id": 461,+ "type": "SaveImageAdvanced",+ "pos": [+ 1830,+ 2470+ ],+ "size": [+ 850,+ 610+ ],+ "flags": {},+ "order": 5,+ "mode": 0,+ "inputs": [+ {+ "name": "images",+ "type": "IMAGE",+ "link": 672+ }+ ],+ "outputs": [+ {+ "name": "images",+ "type": "IMAGE",+ "links": []+ }+ ],+ "properties": {},+ "widgets_values": [+ "Qwen_image_2.1",+ "png",+ "8-bit",+ "sRGB"+ ],+ "widgets_values_named": {+ "filename_prefix": "Qwen_image_2.1",+ "format": "png",+ "format.bit_depth": "8-bit",+ "format.input_color_space": "sRGB"+ }+ },+ {+ "id": 463,+ "type": "MarkdownNote",+ "pos": [+ -350,+ 2470+ ],+ "size": [+ 420,+ 620+ ],+ "flags": {},+ "order": 1,+ "mode": 0,+ "inputs": [],+ "outputs": [],+ "title": "Note: Model links",+ "properties": {},+ "widgets_values": [+ "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Model Links\n\n- [Hugging Face:Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1)\n- [ModelScope:Comfy-Org/Qwen-Image-2.1](https://modelscope.cn/models/Comfy-Org/Qwen-Image-2.1)\n\n**diffusion_models**\n\n- [qwen_image_2.1_turbo_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_turbo_bf16.safetensors) (13.25 GB)\n- [qwen_image_2.1_turbo_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_turbo_int8_convrot.safetensors) (6.76 GB)\n\n**text_encoders**\n\n- [qwen3vl_8b_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors) (8.71 GB)\n- [qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors) (8.82 GB)\n\n**vae**\n\n- [qwen_image_2.1_vae_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors) (644.2 MB)\n\n\n## Model Storage Location\n\n```\n📂 ComfyUI/\n├── 📂 models/\n│ ├── 📂 diffusion_models/\n│ │ ├── qwen_image_2.1_turbo_bf16.safetensors\n│ │ └── qwen_image_2.1_turbo_int8_convrot.safetensors\n│ ├── 📂 text_encoders/\n│ │ ├── qwen3vl_8b_int8_convrot.safetensors\n│ │ └── qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors\n│ └── 📂 vae/\n│ └── qwen_image_2.1_vae_bf16.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"+ ],+ "widgets_values_named": {+ "text": "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Model Links\n\n- [Hugging Face:Comfy-Org/Qwen-Image-2.1](https://huggingface.co/Comfy-Org/Qwen-Image-2.1)\n- [ModelScope:Comfy-Org/Qwen-Image-2.1](https://modelscope.cn/models/Comfy-Org/Qwen-Image-2.1)\n\n**diffusion_models**\n\n- [qwen_image_2.1_turbo_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_turbo_bf16.safetensors) (13.25 GB)\n- [qwen_image_2.1_turbo_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_turbo_int8_convrot.safetensors) (6.76 GB)\n\n**text_encoders**\n\n- [qwen3vl_8b_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors) (8.71 GB)\n- [qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors) (8.82 GB)\n\n**vae**\n\n- [qwen_image_2.1_vae_bf16.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors) (644.2 MB)\n\n\n## Model Storage Location\n\n```\n📂 ComfyUI/\n├── 📂 models/\n│ ├── 📂 diffusion_models/\n│ │ ├── qwen_image_2.1_turbo_bf16.safetensors\n│ │ └── qwen_image_2.1_turbo_int8_convrot.safetensors\n│ ├── 📂 text_encoders/\n│ │ ├── qwen3vl_8b_int8_convrot.safetensors\n│ │ └── qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors\n│ └── 📂 vae/\n│ └── qwen_image_2.1_vae_bf16.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"+ },+ "color": "#222",+ "bgcolor": "#000"+ },+ {+ "id": 468,+ "type": "MarkdownNote",+ "pos": [+ 100,+ 2470+ ],+ "size": [+ 420,+ 220+ ],+ "flags": {},+ "order": 2,+ "mode": 0,+ "inputs": [],+ "outputs": [],+ "title": "Note: Usage",+ "properties": {},+ "widgets_values": [+ "## Size\nQwen Image 2.1 has native 2K (2048*2048) support for direct output.\n\nOutput size comes from ResolutionSelector (width/height). Default is 1 megapixel (1024*1024). For native 2K, set 1:1 and 4 megapixels (2048*2048). Prefer multiples of 32.\n\n## Transparent Image\n\nTo generate a transparent image, wrap the prompt like this and replace the middle with the subject:\n\n---\nThis is an RGBA format image with transparency. `[your description]`. The image has an alpha channel and a transparent background.\n\n---\nSave as PNG to keep the alpha channel.\n\n## Parameters\n\n- prompt: what to generate. For RGBA, see Note: transparent.\n- negative_prompt: unused while cfg is 1.\n- cfg: keep 1 for the Qwen Image 2.1 official path. Raise it only if you use a negative prompt.\n- steps: this template runs the Turbo checkpoint, which is distilled for **8 steps**; the schedule is fixed in the ManualSigmas node (`1.0, 0.978453, 0.95418, 0.926626, 0.89508, 0.845148, 0.704534, 0.414568, 0`) and is what makes 8 steps enough. Raise the step count only together with a different schedule. The full Qwen Image 2.1 base model instead needs about 40-50 steps with euler.\n"+ ],+ "widgets_values_named": {+ "text": "## Size\nQwen Image 2.1 has native 2K (2048*2048) support for direct output.\n\nOutput size comes from ResolutionSelector (width/height). Default is 1 megapixel (1024*1024). For native 2K, set 1:1 and 4 megapixels (2048*2048). Prefer multiples of 32.\n\n## Transparent Image\n\nTo generate a transparent image, wrap the prompt like this and replace the middle with the subject:\n\n---\nThis is an RGBA format image with transparency. `[your description]`. The image has an alpha channel and a transparent background.\n\n---\nSave as PNG to keep the alpha channel.\n\n## Parameters\n\n- prompt: what to generate. For RGBA, see Note: transparent.\n- negative_prompt: unused while cfg is 1.\n- cfg: keep 1 for the Qwen Image 2.1 official path. Raise it only if you use a negative prompt.\n- steps: this template runs the Turbo checkpoint, which is distilled for **8 steps**; the schedule is fixed in the ManualSigmas node (`1.0, 0.978453, 0.95418, 0.926626, 0.89508, 0.845148, 0.704534, 0.414568, 0`) and is what makes 8 steps enough. Raise the step count only together with a different schedule. The full Qwen Image 2.1 base model instead needs about 40-50 steps with euler.\n"+ },+ "color": "#222",+ "bgcolor": "#000"+ },+ {+ "id": 483,+ "type": "MarkdownNote",+ "pos": [+ 1350,+ 2590+ ],+ "size": [+ 420,+ 480+ ],+ "flags": {},+ "order": 3,+ "mode": 0,+ "inputs": [],+ "outputs": [],+ "title": "Note: PE",+ "properties": {},+ "widgets_values": [+ "## Prompt Enhancer\n\nThe prompt enhancer rewrites your prompt with the Qwen 3.5 prompt enhancer model before the image model sees it. These settings follow the official prompt enhancer release, and the ones you are most likely to change are exposed on the node.\n\n- `refine_prompt`: on runs the rewrite and feeds it to the image model, off passes your prompt through as written. On gives the image model a fuller prompt and usually better results; off skips the rewrite pass and the run finishes faster. This template starts with it off.\n- `thinking_mode`: turn this on together with the enhancer. The checkpoint was trained with a reasoning block and loses quality without it.\n- `max_length`: the token budget for the reasoning block plus the rewritten prompt, 4096 here. The official setting is 16256; this template caps it lower so a single rewrite cannot run for many minutes.\n- `sampling_mode`: the sampling values live inside the subgraph. They follow the official ones: `temperature` 1.0, `top_p` 0.95, `top_k` 20, `min_p` 0, `presence_penalty` 1.5, `repetition_penalty` 1.0.\n\nThe enhancer checkpoint and its system prompt live inside the subgraph."+ ],+ "widgets_values_named": {+ "text": "## Prompt Enhancer\n\nThe prompt enhancer rewrites your prompt with the Qwen 3.5 prompt enhancer model before the image model sees it. These settings follow the official prompt enhancer release, and the ones you are most likely to change are exposed on the node.\n\n- `refine_prompt`: on runs the rewrite and feeds it to the image model, off passes your prompt through as written. On gives the image model a fuller prompt and usually better results; off skips the rewrite pass and the run finishes faster. This template starts with it off.\n- `thinking_mode`: turn this on together with the enhancer. The checkpoint was trained with a reasoning block and loses quality without it.\n- `max_length`: the token budget for the reasoning block plus the rewritten prompt, 4096 here. The official setting is 16256; this template caps it lower so a single rewrite cannot run for many minutes.\n- `sampling_mode`: the sampling values live inside the subgraph. They follow the official ones: `temperature` 1.0, `top_p` 0.95, `top_k` 20, `min_p` 0, `presence_penalty` 1.5, `repetition_penalty` 1.0.\n\nThe enhancer checkpoint and its system prompt live inside the subgraph."+ },+ "color": "#222",+ "bgcolor": "#000"+ }+ ],+ "links": [+ [+ 672,+ 459,+ 0,+ 461,+ 0,+ "IMAGE"+ ],+ [+ 670,+ 13,+ 0,+ 459,+ 3,+ "INT"+ ],+ [+ 671,+ 13,+ 1,+ 459,+ 4,+ "INT"+ ]+ ],+ "groups": [],+ "definitions": {+ "subgraphs": [+ {+ "id": "c291ceec-b98f-4751-9d0b-7bc288f27b30",+ "version": 1,+ "state": {+ "lastGroupId": 38,+ "lastNodeId": 490,+ "lastLinkId": 728,+ "lastRerouteId": 9+ },+ "revision": 0,+ "config": {},+ "name": "Text to Image (Qwen Image 2.1)",+ "inputNode": {+ "id": -10,+ "bounding": [+ -660,+ 610,+ 143.044921875,+ 348+ ]+ },+ "outputNode": {+ "id": -20,+ "bounding": [+ 1960,+ 640,+ 128,+ 68+ ]+ },+ "inputs": [+ {+ "id": "6a73de3b-f4cd-43a4-9076-76648c6902f0",+ "name": "prompt",+ "type": "STRING",+ "linkIds": [+ 684,+ 711+ ],+ "localized_name": "prompt",+ "label": "positive_prompt",+ "pos": [+ -540.955078125,+ 634+ ]+ },+ {+ "id": "140602e4-2e82-49b4-b1d6-afa99d79a475",+ "name": "switch",+ "type": "BOOLEAN",+ "linkIds": [+ 688+ ],+ "label": "refine_prompt",+ "pos": [+ -540.955078125,+ 654+ ]+ },+ {+ "id": "e80f9a8b-0a83-40c8-ac0f-cc0bc633ed26",+ "name": "thinking",+ "type": "BOOLEAN",+ "linkIds": [+ 695+ ],+ "label": "thinking_mode",+ "pos": [+ -540.955078125,+ 674+ ]+ },+ {+ "id": "728d8016-b3b6-4b71-abe0-3fb23e5e96fa",+ "name": "max_length",+ "type": "INT",+ "linkIds": [+ 713+ ],+ "pos": [+ -540.955078125,+ 694+ ]+ },+ {+ "id": "d4c1377f-7fbc-4519-b83c-9a3b9c2de104",+ "name": "negative_prompt",+ "type": "STRING",+ "linkIds": [+ 657+ ],+ "pos": [+ -540.955078125,+ 714+ ]+ },+ {+ "id": "91c96cf8-057b-4da2-b71e-305541a3527e",+ "name": "width",+ "type": "INT",+ "linkIds": [+ 660+ ],+ "localized_name": "width",+ "pos": [+ -540.955078125,+ 734+ ]+ },+ {+ "id": "661cc520-6bd0-4925-90ec-cecaa188b57d",+ "name": "height",+ "type": "INT",+ "linkIds": [+ 661+ ],+ "localized_name": "height",+ "pos": [+ -540.955078125,+ 754+ ]+ },+ {+ "id": "9f0e91b8-5a4a-4f5a-a2a4-4ddc180df0fd",+ "name": "scheduler",+ "type": "COMBO",+ "linkIds": [+ 728+ ],+ "label": "sampler",+ "pos": [+ -540.955078125,+ 774+ ]+ },+ {+ "id": "977ce57d-3764-491c-8d2d-543754cfbaf1",+ "name": "seed",+ "type": "INT",+ "linkIds": [+ 697+ ],+ "pos": [+ -540.955078125,+ 794+ ]+ },+ {+ "id": "143494fb-a40e-423f-be3b-ecc808b408b0",+ "name": "unet_name",+ "type": "COMBO",+ "linkIds": [+ 663+ ],+ "pos": [+ -540.955078125,+ 814+ ]+ },+ {+ "id": "d8528289-e121-45ed-9c31-e6370ce4ba5e",+ "name": "clip_name",+ "type": "COMBO",+ "linkIds": [+ 664+ ],+ "pos": [+ -540.955078125,+ 834+ ]+ },+ {+ "id": "f03d1fb0-d592-4997-b55e-e7a2549c36e5",+ "name": "vae_name",+ "type": "COMBO",+ "linkIds": [+ 665+ ],+ "pos": [+ -540.955078125,+ 854+ ]+ },+ {+ "id": "e12b2532-5fcd-4f34-9ddd-71df7e5021c5",+ "name": "clip_name_1",+ "type": "COMBO",+ "linkIds": [+ 696+ ],+ "label": "PE_model",+ "pos": [+ -540.955078125,+ 874+ ]+ },+ {+ "id": "d2597afa-78fa-49f2-96cb-5fda1a3b9eee",+ "name": "device",+ "type": "COMBO",+ "linkIds": [+ 722+ ],+ "label": "cache_device",+ "pos": [+ -540.955078125,+ 894+ ]+ },+ {+ "id": "ef25ddbe-1463-4c53-9065-93aa867e77ab",+ "name": "dtype_1",+ "type": "COMBO",+ "linkIds": [+ 723+ ],+ "label": "dtype",+ "pos": [+ -540.955078125,+ 914+ ]+ }+ ],+ "outputs": [+ {+ "id": "f6f3effc-0961-4c17-b52c-a77c16ca6aa4",+ "name": "IMAGE",+ "type": "IMAGE",+ "linkIds": [+ 650+ ],+ "localized_name": "IMAGE",+ "pos": [+ 1984,+ 664+ ]+ }+ ],+ "widgets": [],+ "nodes": [+ {+ "id": 451,+ "type": "UNETLoader",+ "pos": [+ -190,+ 410+ ],+ "size": [+ 510,+ 90+ ],+ "flags": {},+ "order": 4,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "unet_name",+ "name": "unet_name",+ "type": "COMBO",+ "widget": {+ "name": "unet_name"+ },+ "link": 663+ }+ ],+ "outputs": [+ {+ "localized_name": "MODEL",+ "name": "MODEL",+ "type": "MODEL",+ "links": [+ 721+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "UNETLoader",+ "models": [+ {+ "name": "qwen_image_2.1_turbo_int8_convrot.safetensors",+ "url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_turbo_int8_convrot.safetensors",+ "directory": "diffusion_models"+ }+ ]+ },+ "widgets_values": [+ "qwen_image_2.1_turbo_int8_convrot.safetensors",+ "default"+ ],+ "widgets_values_named": {+ "unet_name": "qwen_image_2.1_turbo_int8_convrot.safetensors",+ "weight_dtype": "default"+ }+ },+ {+ "id": 452,+ "type": "TextEncodeQwenImage21",+ "pos": [+ 401.97702219705513,+ 586.653578265677+ ],+ "size": [+ 355.7457007437866,+ 181.4947103430324+ ],+ "flags": {},+ "order": 5,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "clip",+ "name": "clip",+ "type": "CLIP",+ "link": 647+ },+ {+ "localized_name": "image_1",+ "name": "images.image_1",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "localized_name": "vae",+ "name": "vae",+ "shape": 7,+ "type": "VAE",+ "link": null+ },+ {+ "localized_name": "prompt",+ "name": "prompt",+ "type": "STRING",+ "widget": {+ "name": "prompt"+ },+ "link": 687+ },+ {+ "localized_name": "negative_prompt",+ "name": "negative_prompt",+ "type": "STRING",+ "widget": {+ "name": "negative_prompt"+ },+ "link": 657+ }+ ],+ "outputs": [+ {+ "localized_name": "positive",+ "name": "positive",+ "type": "CONDITIONING",+ "links": [+ 724+ ]+ },+ {+ "localized_name": "negative",+ "name": "negative",+ "type": "CONDITIONING",+ "links": [+ 725+ ]+ },+ {+ "localized_name": "latent",+ "name": "latent",+ "type": "LATENT",+ "links": null+ }+ ],+ "properties": {+ "Node name for S&R": "TextEncodeQwenImage21"+ },+ "widgets_values": [+ "",+ "",+ 1024+ ],+ "widgets_values_named": {+ "prompt": "",+ "negative_prompt": "",+ "resolution": 1024+ }+ },+ {+ "id": 453,+ "type": "CLIPLoader",+ "pos": [+ -190,+ 570+ ],+ "size": [+ 510,+ 120+ ],+ "flags": {},+ "order": 6,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "clip_name",+ "name": "clip_name",+ "type": "COMBO",+ "widget": {+ "name": "clip_name"+ },+ "link": 664+ }+ ],+ "outputs": [+ {+ "localized_name": "CLIP",+ "name": "CLIP",+ "type": "CLIP",+ "links": [+ 647+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "CLIPLoader",+ "models": [+ {+ "name": "qwen3vl_8b_int8_convrot.safetensors",+ "url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors",+ "directory": "text_encoders"+ }+ ]+ },+ "widgets_values": [+ "qwen3vl_8b_int8_convrot.safetensors",+ "qwen_image",+ "default"+ ],+ "widgets_values_named": {+ "clip_name": "qwen3vl_8b_int8_convrot.safetensors",+ "type": "qwen_image",+ "device": "default"+ }+ },+ {+ "id": 454,+ "type": "VAELoader",+ "pos": [+ -190,+ 770+ ],+ "size": [+ 510,+ 70+ ],+ "flags": {},+ "order": 7,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "vae_name",+ "name": "vae_name",+ "type": "COMBO",+ "widget": {+ "name": "vae_name"+ },+ "link": 665+ }+ ],+ "outputs": [+ {+ "localized_name": "VAE",+ "name": "VAE",+ "type": "VAE",+ "links": [+ 649+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "VAELoader",+ "models": [+ {+ "name": "qwen_image_2.1_vae_bf16.safetensors",+ "url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors",+ "directory": "vae"+ }+ ]+ },+ "widgets_values": [+ "qwen_image_2.1_vae_bf16.safetensors"+ ],+ "widgets_values_named": {+ "vae_name": "qwen_image_2.1_vae_bf16.safetensors"+ }+ },+ {+ "id": 456,+ "type": "EmptyLatentImage",+ "pos": [+ -70,+ 1010+ ],+ "size": [+ 300,+ 120+ ],+ "flags": {},+ "order": 8,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "width",+ "name": "width",+ "type": "INT",+ "widget": {+ "name": "width"+ },+ "link": 660+ },+ {+ "localized_name": "height",+ "name": "height",+ "type": "INT",+ "widget": {+ "name": "height"+ },+ "link": 661+ }+ ],+ "outputs": [+ {+ "localized_name": "LATENT",+ "name": "LATENT",+ "type": "LATENT",+ "links": [+ 726+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "EmptyLatentImage"+ },+ "widgets_values": [+ 1024,+ 1024,+ 1+ ],+ "widgets_values_named": {+ "width": 1024,+ "height": 1024,+ "batch_size": 1+ }+ },+ {+ "id": 457,+ "type": "VAEDecode",+ "pos": [+ 1620,+ 660+ ],+ "size": [+ 230,+ 60+ ],+ "flags": {},+ "order": 9,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "samples",+ "name": "samples",+ "type": "LATENT",+ "link": 720+ },+ {+ "localized_name": "vae",+ "name": "vae",+ "type": "VAE",+ "link": 649+ }+ ],+ "outputs": [+ {+ "localized_name": "IMAGE",+ "name": "IMAGE",+ "type": "IMAGE",+ "links": [+ 650+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "VAEDecode"+ }+ },+ {+ "id": 471,+ "type": "TextGenerate",+ "pos": [+ 470,+ -420+ ],+ "size": [+ 400,+ 460+ ],+ "flags": {},+ "order": 10,+ "mode": 0,+ "showAdvanced": true,+ "inputs": [+ {+ "localized_name": "clip",+ "name": "clip",+ "type": "CLIP",+ "link": 681+ },+ {+ "localized_name": "image",+ "name": "image",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "localized_name": "video",+ "name": "video",+ "shape": 7,+ "type": "IMAGE",+ "link": null+ },+ {+ "localized_name": "audio",+ "name": "audio",+ "shape": 7,+ "type": "AUDIO",+ "link": null+ },+ {+ "localized_name": "system_prompt",+ "name": "system_prompt",+ "shape": 7,+ "type": "STRING",+ "link": 709+ },+ {+ "localized_name": "prompt",+ "name": "prompt",+ "type": "STRING",+ "widget": {+ "name": "prompt"+ },+ "link": 711+ },+ {+ "localized_name": "max_length",+ "name": "max_length",+ "type": "INT",+ "widget": {+ "name": "max_length"+ },+ "link": 713+ },+ {+ "localized_name": "seed",+ "name": "sampling_mode.seed",+ "type": "INT",+ "widget": {+ "name": "sampling_mode.seed"+ },+ "link": 697+ },+ {+ "localized_name": "thinking",+ "name": "thinking",+ "shape": 7,+ "type": "BOOLEAN",+ "widget": {+ "name": "thinking"+ },+ "link": 695+ }+ ],+ "outputs": [+ {+ "localized_name": "generated_text",+ "name": "generated_text",+ "type": "STRING",+ "links": [+ 712+ ]+ },+ {+ "localized_name": "thinking",+ "name": "thinking",+ "type": "STRING",+ "links": null+ }+ ],+ "properties": {+ "Node name for S&R": "TextGenerate"+ },+ "widgets_values": [+ "",+ 4096,+ "on",+ 1,+ 20,+ 0.95,+ 0,+ 1,+ 0,+ 1.5,+ true,+ true,+ "auto"+ ],+ "widgets_values_named": {+ "prompt": "",+ "max_length": 4096,+ "sampling_mode": "on",+ "sampling_mode.temperature": 1,+ "sampling_mode.top_k": 20,+ "sampling_mode.top_p": 0.95,+ "sampling_mode.min_p": 0,+ "sampling_mode.repetition_penalty": 1,+ "sampling_mode.seed": 0,+ "sampling_mode.presence_penalty": 1.5,+ "thinking": true,+ "use_default_template": true,+ "mtp": "auto"+ }+ },+ {+ "id": 472,+ "type": "PreviewAny",+ "pos": [+ 990,+ -250+ ],+ "size": [+ 470,+ 430+ ],+ "flags": {},+ "order": 11,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "source",+ "name": "source",+ "type": "*",+ "link": 686+ }+ ],+ "outputs": [+ {+ "localized_name": "STRING",+ "name": "STRING",+ "type": "STRING",+ "links": [+ 687+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "PreviewAny"+ },+ "widgets_values": [],+ "widgets_values_named": {}+ },+ {+ "id": 473,+ "type": "CLIPLoader",+ "pos": [+ -180,+ -420+ ],+ "size": [+ 530,+ 120+ ],+ "flags": {},+ "order": 12,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "clip_name",+ "name": "clip_name",+ "type": "COMBO",+ "widget": {+ "name": "clip_name"+ },+ "link": 696+ }+ ],+ "outputs": [+ {+ "localized_name": "CLIP",+ "name": "CLIP",+ "type": "CLIP",+ "links": [+ 681+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "CLIPLoader",+ "models": [+ {+ "name": "qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",+ "url": "https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",+ "directory": "text_encoders"+ }+ ]+ },+ "widgets_values": [+ "qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",+ "stable_diffusion",+ "default"+ ],+ "widgets_values_named": {+ "clip_name": "qwen3.5_9b_qwen_image_2.1_pe_t2i.int8_convrot.safetensors",+ "type": "stable_diffusion",+ "device": "default"+ }+ },+ {+ "id": 474,+ "type": "ComfySwitchNode",+ "pos": [+ 990,+ -420+ ],+ "size": [+ 270,+ 80+ ],+ "flags": {},+ "order": 13,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "on_false",+ "name": "on_false",+ "shape": 7,+ "type": "STRING",+ "link": 684+ },+ {+ "localized_name": "on_true",+ "name": "on_true",+ "shape": 7,+ "type": "STRING",+ "link": 712+ },+ {+ "localized_name": "switch",+ "name": "switch",+ "type": "BOOLEAN",+ "widget": {+ "name": "switch"+ },+ "link": 688+ }+ ],+ "outputs": [+ {+ "localized_name": "output",+ "name": "output",+ "type": "STRING",+ "links": [+ 686+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "ComfySwitchNode"+ },+ "widgets_values": [+ false+ ],+ "widgets_values_named": {+ "switch": false+ }+ },+ {+ "id": 475,+ "type": "PrimitiveStringMultiline",+ "pos": [+ -180,+ -240+ ],+ "size": [+ 530,+ 270+ ],+ "flags": {},+ "order": 0,+ "mode": 0,+ "inputs": [],+ "outputs": [+ {+ "localized_name": "STRING",+ "name": "STRING",+ "type": "STRING",+ "links": [+ 709+ ]+ }+ ],+ "title": "Text (System Prompt)",+ "properties": {+ "Node name for S&R": "PrimitiveStringMultiline"+ },+ "widgets_values": [+ "# Image Prompt Rewriting Expert\n\nYou turn a user's image request into one long English paragraph that describes the\nfinished image as if you were looking at it, plus the aspect ratio it should be\nrendered at. You are not talking to the user and not talking to a renderer: you are\nan observer reporting what is in the frame.\n\nWork through the eight steps below in order. Each step commits one decision; later\nsteps never revise an earlier one.\n\n## Step 1 — Read the brief and split it in two\n\nList what the user has fixed and what they have left open.\n\nFixed, and it must survive into your description unchanged: every string of text\nthey want shown, every named object, every count, every stated colour, every stated\nposition, and the aspect ratio if they gave one. Copy their text strings character\nfor character, in their own script, including punctuation and spacing.\n\nA third thing they may give you is an instruction about the job rather than about the\npicture — \"use double quotes\", \"no hard-edged blocks\", \"4K, no noise\", \"make sure the\ntext is sharp\". That is not content. Obey it silently where it applies and never echo\nit: the description states what is in the frame, never what must be done.\n\nOpen, and you must decide it: everything they did not mention. A three-word request\nand a three-hundred-word request both become a description of the same size, so a\nshort brief means you are inventing most of the frame, not writing less.\n\n## Step 2 — Fix the frame\n\nDecide the orientation from the subject, then pick the ratio.\n\nIf the user states a ratio, use it. Otherwise: `3:2` for anything horizontal and\n`2:3` for anything vertical — these are the two defaults and cover most images.\nUse `1:1` for a square badge, icon, album cover or single centred emblem, `16:9`\nfor a wide cinematic or presentation frame, `1:2` or `9:16` for a phone screen or a\ntall standing banner. `3:4`, `2:1`, `21:9`, `4:3`, `9:21`, `4:5`, `3:1`, `5:4`,\n`1:3` exist but only when the subject or the user really calls for them.\n\nThe ratio lives only in the `wh_ratio` field. Never write a ratio, a resolution, or\na pixel count into the description itself.\n\n## Step 3 — Write the opening sentence\n\nOne sentence, around twenty words. Name the medium, the style, the subject, and the\nbackground or palette; usually name the orientation too:\n\n`The image is a ⟨vertical / wide / square / tall⟩ ⟨style⟩ ⟨photograph · poster · illustration · scene · portrait · infographic · close-up · graphic · page · card · sheet · logo⟩ of ⟨subject⟩, ⟨the background and its palette⟩.`\n\n`This is a …` or a bare `A vertical realistic photograph of …` work equally well. The\nmedium noun is the one part that is never omitted.\n\nThe style word goes here — realistic, photorealistic, minimalist, flat-vector,\ncinematic, watercolour, isometric, editorial, hand-drawn, 3D-rendered, retro. Name\nit once here; you may echo it in the closing sentence.\n\n## Step 4 — Inventory before you write\n\nBefore any more prose, settle two lists.\n\nEvery element that will appear, each with a place in the frame: upper-left,\nacross the top, on the far right, in the lower-third, in the centre, in front of,\nbehind, tucked into the corner. You will need eight to fourteen such positional\nphrases, about ten typically, and they must reach the corners, the edges and the\ncentre — not cluster in the middle.\n\nEvery piece of text that will be legible in the image, in reading order.\n\n## Step 5 — Walk the frame\n\nNow describe it in order. Which order depends on how the frame is filled.\n\n**If the frame is divided into regions** — a poster, a page, an interface, a layout, a\nwide scene with several things in it — walk the regions:\n\n1. The background and the surface it sits on — this comes immediately after the\n opening sentence, not at the end.\n2. The top band: headline, header bar, sky, ceiling, whatever occupies the top edge.\n3. Down and across the body of the frame: left side, then centre, then right side.\n Give each region one or two sentences.\n4. The bottom band: footer, foreground, ground plane, base row.\n\n**If one subject fills the frame** — a portrait, a close-up, a single object — walk\nthe subject instead: the background and how far it falls off, then the subject's pose\nand where it is placed in the frame, then head and face, then body and each garment or\nsurface, then what is held or touching it, then whatever little is left at the edges.\nKeep using positional phrases inside the subject — in the upper-left of the frame,\nbehind the left shoulder, along the lower edge — so the frame stays locatable.\n\nRoughly a third of your sentences should open on the positional phrase itself —\n\"On the right side of the frame, …\", \"In the upper-left corner, …\", \"Across the\nlower third, …\" — so the reader always knows where they are looking.\n\nKeep it to one paragraph. Break to a new paragraph only when the image is genuinely\nbuilt from stacked regions — panels, cards, sections, slides — and then one\nparagraph per region, each opening on where that region sits.\n\n## Step 6 — Set every piece of text\n\nSkip this step if nothing in the image is meant to be read — a third of images have\nno legible text at all, and inventing signage for them is a mistake.\n\nOtherwise, for each string from your Step 4 list, in reading order, name where it sits,\nwhat it looks like, and what it says: `a bold black headline across the top reads \"…\"`.\n\nPut the string in straight double quotes, in its own script — Chinese, Russian,\nKorean, Japanese and Arabic text stays in Chinese, Russian, Korean, Japanese and\nArabic. Give its weight, colour, case and relative size. Describe a line break as a\nsecond line rather than putting a real newline inside the string. If a mark is not meant\nto be read — distant signage, a label behind glass, dense body copy — call it\nblurred, indistinct, or too small to read rather than inventing letters. If the image contains a chart\nor a table, its axes, tick labels, legend entries, series and cell values are text\ntoo: write them out.\n\n## Step 7 — Give the lighting its own sentence\n\nEvery image has light in it, and the description always accounts for it: the source,\nits direction, its quality, and the shadows and highlights it leaves. Soft diffused\ndaylight from a window on the left, hard overhead studio light, warm low sun, flat\neven ambient light for a diagram.\n\nOnce the contents are placed, give it a sentence of its own — `The lighting is …` —\nor, if the light is what makes a particular surface look the way it does, fold it into\nthat surface's sentence. Either way it is stated explicitly, not left implied.\n\n## Step 8 — Close with the whole frame\n\nEnd on a single sentence that steps back:\n\n`The overall composition ⟨is / uses / feels⟩ …`\n\n`The composition is …`, `The overall design …`, `The overall mood …`, `The overall\npalette …` and `The image has …` are the same move. Cover balance and symmetry, the\npalette, the style, and the mood in that one sentence. Write exactly one such\nsentence — do not follow it with a second summary.\n\n## Throughout\n\n**Size.** The description runs about twenty sentences and four to five hundred words,\nroughly twenty-five words a sentence. That is the same size whether the brief was three\nwords or three hundred: a dense frame with many regions and a lot of text runs longer, a\nsingle quiet subject runs shorter, but a thin brief never buys a thin description.\n\n**Observe, don't instruct.** Present tense, third person, declarative. No \"you\", no\n\"create\", no \"make sure\", no \"the AI should\". No quality boosters — no \"masterpiece\",\n\"8K\", \"highly detailed\", \"award-winning\".\n\n**Hedge what you cannot be certain of.** An observer describing a picture says\n\"appears to be\", \"likely\", \"suggesting\", and offers a pair — \"a notebook\nor a tablet\", \"wood or dark laminate\" — when the thing is genuinely ambiguous. Do\nthis often; it is the natural register here. Be flatly definite only about what the\nuser fixed.\n\n**Name colours with a modifier, almost never bare.** Deep navy, muted olive, pale\ncream, warm terracotta, soft dusty rose, blue-grey, off-white, charcoal, brownish-\ngreen. Hex codes only if the user gave them.\n\n**Give the material, not just the noun.** Brushed metal, matte plastic, glossy\nceramic, coarse linen, weathered wood, frosted glass, grain, scuffs, condensation,\nvisible brush strokes, paper fibre.\n\n**Enumerate; never summarise.** \"Several items\" and \"various decorations\" are not\ndescriptions. Say what each thing is. Write small counts as words — three, five,\ntwelve — and if something is partly hidden, say so and describe the visible part.\n\n**People get their observable surface.** Build, posture, where they are looking,\nexpression, hair, skin tone, and each garment with its colour and material. Age is a\nlife stage or a decade — a child, a teenager, a young adult, middle-aged, elderly,\nin her thirties — never a number of years. If a face is turned away or cropped, say\nthat instead of describing it.\n\n**Objects by class, not by brand.** A silver laptop, a mirrorless camera, a compact\nhatchback — unless the user named the brand. Photographic and design vocabulary is\nwelcome: shallow depth of field, bokeh, backlit, close-up, negative space,\ngrid, drop shadow.\n\n**Everything holds together physically.** Shadows fall away from the light, reflections\nmatch what is in front of the surface, scale is consistent between neighbouring\nobjects, and a surface reacts to what sits on it. If the user asked for something\nimpossible, describe it as the image shows it and let the rest of the scene stay\ncoherent around it.\n\n## Language\n\nThe description is always in English, whatever language the request arrives in. The\nonly exception is text shown inside the image, which stays in its own script.\n\n## Output format\n\n- Return the description and nothing else: one continuous paragraph of English, in a single line\nstarting on the very first character of your reply.\n- No JSON, no braces, no key names, no labels, no headings, no markdown, no code fences, and no quotation marks around the paragraph.\n- No preamble, no acknowledgement, no explanation, no summary, no notes, no closing remarks, no questions.\n- No ratio, no resolution, no pixel count, no timestamps.\n\nYour whole reply is used as the image prompt, so every extra word you add becomes part of the image.\n"+ ],+ "widgets_values_named": {+ "value": "# Image Prompt Rewriting Expert\n\nYou turn a user's image request into one long English paragraph that describes the\nfinished image as if you were looking at it, plus the aspect ratio it should be\nrendered at. You are not talking to the user and not talking to a renderer: you are\nan observer reporting what is in the frame.\n\nWork through the eight steps below in order. Each step commits one decision; later\nsteps never revise an earlier one.\n\n## Step 1 — Read the brief and split it in two\n\nList what the user has fixed and what they have left open.\n\nFixed, and it must survive into your description unchanged: every string of text\nthey want shown, every named object, every count, every stated colour, every stated\nposition, and the aspect ratio if they gave one. Copy their text strings character\nfor character, in their own script, including punctuation and spacing.\n\nA third thing they may give you is an instruction about the job rather than about the\npicture — \"use double quotes\", \"no hard-edged blocks\", \"4K, no noise\", \"make sure the\ntext is sharp\". That is not content. Obey it silently where it applies and never echo\nit: the description states what is in the frame, never what must be done.\n\nOpen, and you must decide it: everything they did not mention. A three-word request\nand a three-hundred-word request both become a description of the same size, so a\nshort brief means you are inventing most of the frame, not writing less.\n\n## Step 2 — Fix the frame\n\nDecide the orientation from the subject, then pick the ratio.\n\nIf the user states a ratio, use it. Otherwise: `3:2` for anything horizontal and\n`2:3` for anything vertical — these are the two defaults and cover most images.\nUse `1:1` for a square badge, icon, album cover or single centred emblem, `16:9`\nfor a wide cinematic or presentation frame, `1:2` or `9:16` for a phone screen or a\ntall standing banner. `3:4`, `2:1`, `21:9`, `4:3`, `9:21`, `4:5`, `3:1`, `5:4`,\n`1:3` exist but only when the subject or the user really calls for them.\n\nThe ratio lives only in the `wh_ratio` field. Never write a ratio, a resolution, or\na pixel count into the description itself.\n\n## Step 3 — Write the opening sentence\n\nOne sentence, around twenty words. Name the medium, the style, the subject, and the\nbackground or palette; usually name the orientation too:\n\n`The image is a ⟨vertical / wide / square / tall⟩ ⟨style⟩ ⟨photograph · poster · illustration · scene · portrait · infographic · close-up · graphic · page · card · sheet · logo⟩ of ⟨subject⟩, ⟨the background and its palette⟩.`\n\n`This is a …` or a bare `A vertical realistic photograph of …` work equally well. The\nmedium noun is the one part that is never omitted.\n\nThe style word goes here — realistic, photorealistic, minimalist, flat-vector,\ncinematic, watercolour, isometric, editorial, hand-drawn, 3D-rendered, retro. Name\nit once here; you may echo it in the closing sentence.\n\n## Step 4 — Inventory before you write\n\nBefore any more prose, settle two lists.\n\nEvery element that will appear, each with a place in the frame: upper-left,\nacross the top, on the far right, in the lower-third, in the centre, in front of,\nbehind, tucked into the corner. You will need eight to fourteen such positional\nphrases, about ten typically, and they must reach the corners, the edges and the\ncentre — not cluster in the middle.\n\nEvery piece of text that will be legible in the image, in reading order.\n\n## Step 5 — Walk the frame\n\nNow describe it in order. Which order depends on how the frame is filled.\n\n**If the frame is divided into regions** — a poster, a page, an interface, a layout, a\nwide scene with several things in it — walk the regions:\n\n1. The background and the surface it sits on — this comes immediately after the\n opening sentence, not at the end.\n2. The top band: headline, header bar, sky, ceiling, whatever occupies the top edge.\n3. Down and across the body of the frame: left side, then centre, then right side.\n Give each region one or two sentences.\n4. The bottom band: footer, foreground, ground plane, base row.\n\n**If one subject fills the frame** — a portrait, a close-up, a single object — walk\nthe subject instead: the background and how far it falls off, then the subject's pose\nand where it is placed in the frame, then head and face, then body and each garment or\nsurface, then what is held or touching it, then whatever little is left at the edges.\nKeep using positional phrases inside the subject — in the upper-left of the frame,\nbehind the left shoulder, along the lower edge — so the frame stays locatable.\n\nRoughly a third of your sentences should open on the positional phrase itself —\n\"On the right side of the frame, …\", \"In the upper-left corner, …\", \"Across the\nlower third, …\" — so the reader always knows where they are looking.\n\nKeep it to one paragraph. Break to a new paragraph only when the image is genuinely\nbuilt from stacked regions — panels, cards, sections, slides — and then one\nparagraph per region, each opening on where that region sits.\n\n## Step 6 — Set every piece of text\n\nSkip this step if nothing in the image is meant to be read — a third of images have\nno legible text at all, and inventing signage for them is a mistake.\n\nOtherwise, for each string from your Step 4 list, in reading order, name where it sits,\nwhat it looks like, and what it says: `a bold black headline across the top reads \"…\"`.\n\nPut the string in straight double quotes, in its own script — Chinese, Russian,\nKorean, Japanese and Arabic text stays in Chinese, Russian, Korean, Japanese and\nArabic. Give its weight, colour, case and relative size. Describe a line break as a\nsecond line rather than putting a real newline inside the string. If a mark is not meant\nto be read — distant signage, a label behind glass, dense body copy — call it\nblurred, indistinct, or too small to read rather than inventing letters. If the image contains a chart\nor a table, its axes, tick labels, legend entries, series and cell values are text\ntoo: write them out.\n\n## Step 7 — Give the lighting its own sentence\n\nEvery image has light in it, and the description always accounts for it: the source,\nits direction, its quality, and the shadows and highlights it leaves. Soft diffused\ndaylight from a window on the left, hard overhead studio light, warm low sun, flat\neven ambient light for a diagram.\n\nOnce the contents are placed, give it a sentence of its own — `The lighting is …` —\nor, if the light is what makes a particular surface look the way it does, fold it into\nthat surface's sentence. Either way it is stated explicitly, not left implied.\n\n## Step 8 — Close with the whole frame\n\nEnd on a single sentence that steps back:\n\n`The overall composition ⟨is / uses / feels⟩ …`\n\n`The composition is …`, `The overall design …`, `The overall mood …`, `The overall\npalette …` and `The image has …` are the same move. Cover balance and symmetry, the\npalette, the style, and the mood in that one sentence. Write exactly one such\nsentence — do not follow it with a second summary.\n\n## Throughout\n\n**Size.** The description runs about twenty sentences and four to five hundred words,\nroughly twenty-five words a sentence. That is the same size whether the brief was three\nwords or three hundred: a dense frame with many regions and a lot of text runs longer, a\nsingle quiet subject runs shorter, but a thin brief never buys a thin description.\n\n**Observe, don't instruct.** Present tense, third person, declarative. No \"you\", no\n\"create\", no \"make sure\", no \"the AI should\". No quality boosters — no \"masterpiece\",\n\"8K\", \"highly detailed\", \"award-winning\".\n\n**Hedge what you cannot be certain of.** An observer describing a picture says\n\"appears to be\", \"likely\", \"suggesting\", and offers a pair — \"a notebook\nor a tablet\", \"wood or dark laminate\" — when the thing is genuinely ambiguous. Do\nthis often; it is the natural register here. Be flatly definite only about what the\nuser fixed.\n\n**Name colours with a modifier, almost never bare.** Deep navy, muted olive, pale\ncream, warm terracotta, soft dusty rose, blue-grey, off-white, charcoal, brownish-\ngreen. Hex codes only if the user gave them.\n\n**Give the material, not just the noun.** Brushed metal, matte plastic, glossy\nceramic, coarse linen, weathered wood, frosted glass, grain, scuffs, condensation,\nvisible brush strokes, paper fibre.\n\n**Enumerate; never summarise.** \"Several items\" and \"various decorations\" are not\ndescriptions. Say what each thing is. Write small counts as words — three, five,\ntwelve — and if something is partly hidden, say so and describe the visible part.\n\n**People get their observable surface.** Build, posture, where they are looking,\nexpression, hair, skin tone, and each garment with its colour and material. Age is a\nlife stage or a decade — a child, a teenager, a young adult, middle-aged, elderly,\nin her thirties — never a number of years. If a face is turned away or cropped, say\nthat instead of describing it.\n\n**Objects by class, not by brand.** A silver laptop, a mirrorless camera, a compact\nhatchback — unless the user named the brand. Photographic and design vocabulary is\nwelcome: shallow depth of field, bokeh, backlit, close-up, negative space,\ngrid, drop shadow.\n\n**Everything holds together physically.** Shadows fall away from the light, reflections\nmatch what is in front of the surface, scale is consistent between neighbouring\nobjects, and a surface reacts to what sits on it. If the user asked for something\nimpossible, describe it as the image shows it and let the rest of the scene stay\ncoherent around it.\n\n## Language\n\nThe description is always in English, whatever language the request arrives in. The\nonly exception is text shown inside the image, which stays in its own script.\n\n## Output format\n\n- Return the description and nothing else: one continuous paragraph of English, in a single line\nstarting on the very first character of your reply.\n- No JSON, no braces, no key names, no labels, no headings, no markdown, no code fences, and no quotation marks around the paragraph.\n- No preamble, no acknowledgement, no explanation, no summary, no notes, no closing remarks, no questions.\n- No ratio, no resolution, no pixel count, no timestamps.\n\nYour whole reply is used as the image prompt, so every extra word you add becomes part of the image.\n"+ }+ },+ {+ "id": 484,+ "type": "ManualSigmas",+ "pos": [+ 921.7446995331134,+ 1039.5134150377687+ ],+ "size": [+ 418.9732421875,+ 58+ ],+ "flags": {},+ "order": 1,+ "mode": 0,+ "inputs": [],+ "outputs": [+ {+ "localized_name": "SIGMAS",+ "name": "SIGMAS",+ "type": "SIGMAS",+ "links": [+ 718+ ]+ }+ ],+ "title": "Manual Sigmas (Qwen-Image-2.1-Turbo 8-step schedule)",+ "properties": {+ "Node name for S&R": "ManualSigmas"+ },+ "widgets_values": [+ "1.0, 0.978453, 0.95418, 0.926626, 0.89508, 0.845148, 0.704534, 0.414568, 0"+ ],+ "widgets_values_named": {+ "sigmas": "1.0, 0.978453, 0.95418, 0.926626, 0.89508, 0.845148, 0.704534, 0.414568, 0"+ }+ },+ {+ "id": 486,+ "type": "SamplerCustomAdvanced",+ "pos": [+ 1249.1324593958066,+ 636.0729010945772+ ],+ "size": [+ 220.2388671875,+ 106+ ],+ "flags": {},+ "order": 14,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "noise",+ "name": "noise",+ "type": "NOISE",+ "link": 715+ },+ {+ "localized_name": "guider",+ "name": "guider",+ "type": "GUIDER",+ "link": 716+ },+ {+ "localized_name": "sampler",+ "name": "sampler",+ "type": "SAMPLER",+ "link": 717+ },+ {+ "localized_name": "sigmas",+ "name": "sigmas",+ "type": "SIGMAS",+ "link": 718+ },+ {+ "localized_name": "latent_image",+ "name": "latent_image",+ "type": "LATENT",+ "link": 726+ }+ ],+ "outputs": [+ {+ "localized_name": "output",+ "name": "output",+ "type": "LATENT",+ "links": [+ 720+ ]+ },+ {+ "localized_name": "denoised_output",+ "name": "denoised_output",+ "type": "LATENT",+ "links": []+ }+ ],+ "title": "Sampler Custom Advanced",+ "properties": {+ "Node name for S&R": "SamplerCustomAdvanced"+ }+ },+ {+ "id": 487,+ "type": "KSamplerSelect",+ "pos": [+ 921.7446995331134,+ 918.5134150377687+ ],+ "size": [+ 270,+ 58+ ],+ "flags": {},+ "order": 2,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "sampler_name",+ "name": "sampler_name",+ "type": "COMBO",+ "widget": {+ "name": "sampler_name"+ },+ "link": 728+ }+ ],+ "outputs": [+ {+ "localized_name": "SAMPLER",+ "name": "SAMPLER",+ "type": "SAMPLER",+ "links": [+ 717+ ]+ }+ ],+ "title": "KSampler Select (euler)",+ "properties": {+ "Node name for S&R": "KSamplerSelect"+ },+ "widgets_values": [+ "euler"+ ],+ "widgets_values_named": {+ "sampler_name": "euler"+ }+ },+ {+ "id": 488,+ "type": "RandomNoise",+ "pos": [+ 921.7446995331134,+ 612.5134150377687+ ],+ "size": [+ 270,+ 82+ ],+ "flags": {},+ "order": 3,+ "mode": 0,+ "inputs": [],+ "outputs": [+ {+ "localized_name": "NOISE",+ "name": "NOISE",+ "type": "NOISE",+ "links": [+ 715+ ]+ }+ ],+ "title": "Random Noise",+ "properties": {+ "Node name for S&R": "RandomNoise"+ },+ "widgets_values": [+ 531123706903762,+ "randomize"+ ],+ "widgets_values_named": {+ "noise_seed": 531123706903762,+ "control_after_generate": "randomize"+ }+ },+ {+ "id": 489,+ "type": "CFGGuider",+ "pos": [+ 921.7446995331134,+ 757.5134150377687+ ],+ "size": [+ 270,+ 98+ ],+ "flags": {},+ "order": 15,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "model",+ "name": "model",+ "type": "MODEL",+ "link": 719+ },+ {+ "localized_name": "positive",+ "name": "positive",+ "type": "CONDITIONING",+ "link": 724+ },+ {+ "localized_name": "negative",+ "name": "negative",+ "type": "CONDITIONING",+ "link": 725+ }+ ],+ "outputs": [+ {+ "localized_name": "GUIDER",+ "name": "GUIDER",+ "type": "GUIDER",+ "links": [+ 716+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "CFGGuider"+ },+ "widgets_values": [+ 1+ ],+ "widgets_values_named": {+ "cfg": 1+ }+ },+ {+ "id": 490,+ "type": "QwenImage21Cache",+ "pos": [+ 926.1059484577547,+ 395.65408740404223+ ],+ "size": [+ 270,+ 90+ ],+ "flags": {},+ "order": 16,+ "mode": 0,+ "inputs": [+ {+ "localized_name": "model",+ "name": "model",+ "type": "MODEL",+ "link": 721+ },+ {+ "localized_name": "device",+ "name": "device",+ "type": "COMBO",+ "widget": {+ "name": "device"+ },+ "link": 722+ },+ {+ "localized_name": "dtype",+ "name": "dtype",+ "type": "COMBO",+ "widget": {+ "name": "dtype"+ },+ "link": 723+ }+ ],+ "outputs": [+ {+ "localized_name": "MODEL",+ "name": "MODEL",+ "type": "MODEL",+ "links": [+ 719+ ]+ }+ ],+ "properties": {+ "Node name for S&R": "QwenImage21Cache"+ },+ "widgets_values": [+ "auto",+ "default"+ ],+ "widgets_values_named": {+ "device": "auto",+ "dtype": "default"+ }+ }+ ],+ "groups": [+ {+ "id": 34,+ "title": "Models",+ "bounding": [+ -200,+ 300,+ 530,+ 590+ ],+ "color": "#3f789e",+ "flags": {}+ },+ {+ "id": 35,+ "title": "Image Size",+ "bounding": [+ -200,+ 920,+ 530,+ 250+ ],+ "color": "#3f789e",+ "flags": {}+ },+ {+ "id": 36,+ "title": "Conditioning",+ "bounding": [+ 360,+ 300,+ 471.4209056304643,+ 870.1714561956576+ ],+ "color": "#3f789e",+ "flags": {}+ },+ {+ "id": 37,+ "title": "Sampling",+ "bounding": [+ 861.9202661027128,+ 300.91976326348265,+ 693.1268974821711,+ 868.7423168092026+ ],+ "color": "#3f789e",+ "flags": {}+ },+ {+ "id": 38,+ "title": "Prompt Enhancer",+ "bounding": [+ -200,+ -500,+ 1760,+ 770+ ],+ "color": "#3f789e",+ "flags": {}+ }+ ],+ "links": [+ {+ "id": 647,+ "origin_id": 453,+ "origin_slot": 0,+ "target_id": 452,+ "target_slot": 0,+ "type": "CLIP"+ },+ {+ "id": 649,+ "origin_id": 454,+ "origin_slot": 0,+ "target_id": 457,+ "target_slot": 1,+ "type": "VAE"+ },+ {+ "id": 650,+ "origin_id": 457,+ "origin_slot": 0,+ "target_id": -20,+ "target_slot": 0,+ "type": "IMAGE"+ },+ {+ "id": 686,+ "origin_id": 474,+ "origin_slot": 0,+ "target_id": 472,+ "target_slot": 0,+ "type": "STRING"+ },+ {+ "id": 687,+ "origin_id": 472,+ "origin_slot": 0,+ "target_id": 452,+ "target_slot": 3,+ "type": "STRING"+ },+ {+ "id": 712,+ "origin_id": 471,+ "origin_slot": 0,+ "target_id": 474,+ "target_slot": 1,+ "type": "STRING"+ },+ {+ "id": 684,+ "origin_id": -10,+ "origin_slot": 0,+ "target_id": 474,+ "target_slot": 0,+ "type": "STRING"+ },+ {+ "id": 688,+ "origin_id": -10,+ "origin_slot": 1,+ "target_id": 474,+ "target_slot": 2,+ "type": "BOOLEAN"+ },+ {+ "id": 657,+ "origin_id": -10,+ "origin_slot": 4,+ "target_id": 452,+ "target_slot": 4,+ "type": "STRING"+ },+ {+ "id": 681,+ "origin_id": 473,+ "origin_slot": 0,+ "target_id": 471,+ "target_slot": 0,+ "type": "CLIP"+ },+ {+ "id": 709,+ "origin_id": 475,+ "origin_slot": 0,+ "target_id": 471,+ "target_slot": 4,+ "type": "STRING"+ },+ {+ "id": 711,+ "origin_id": -10,+ "origin_slot": 0,+ "target_id": 471,+ "target_slot": 5,+ "type": "STRING"+ },+ {+ "id": 713,+ "origin_id": -10,+ "origin_slot": 3,+ "target_id": 471,+ "target_slot": 6,+ "type": "INT"+ },+ {+ "id": 695,+ "origin_id": -10,+ "origin_slot": 2,+ "target_id": 471,+ "target_slot": 8,+ "type": "BOOLEAN"+ },+ {+ "id": 715,+ "origin_id": 488,+ "origin_slot": 0,+ "target_id": 486,+ "target_slot": 0,+ "type": "NOISE"+ },+ {+ "id": 716,+ "origin_id": 489,+ "origin_slot": 0,+ "target_id": 486,+ "target_slot": 1,+ "type": "GUIDER"+ },+ {+ "id": 717,+ "origin_id": 487,+ "origin_slot": 0,+ "target_id": 486,+ "target_slot": 2,+ "type": "SAMPLER"+ },+ {+ "id": 718,+ "origin_id": 484,+ "origin_slot": 0,+ "target_id": 486,+ "target_slot": 3,+ "type": "SIGMAS"+ },+ {+ "id": 719,+ "origin_id": 490,+ "origin_slot": 0,+ "target_id": 489,+ "target_slot": 0,+ "type": "MODEL"+ },+ {+ "id": 720,+ "origin_id": 486,+ "origin_slot": 0,+ "target_id": 457,+ "target_slot": 0,+ "type": "LATENT"+ },+ {+ "id": 721,+ "origin_id": 451,+ "origin_slot": 0,+ "target_id": 490,+ "target_slot": 0,+ "type": "MODEL"+ },+ {+ "id": 724,+ "origin_id": 452,+ "origin_slot": 0,+ "target_id": 489,+ "target_slot": 1,+ "type": "CONDITIONING"+ },+ {+ "id": 725,+ "origin_id": 452,+ "origin_slot": 1,+ "target_id": 489,+ "target_slot": 2,+ "type": "CONDITIONING"+ },+ {+ "id": 726,+ "origin_id": 456,+ "origin_slot": 0,+ "target_id": 486,+ "target_slot": 4,+ "type": "LATENT"+ },+ {+ "id": 660,+ "origin_id": -10,+ "origin_slot": 5,+ "target_id": 456,+ "target_slot": 0,+ "type": "INT"+ },+ {+ "id": 661,+ "origin_id": -10,+ "origin_slot": 6,+ "target_id": 456,+ "target_slot": 1,+ "type": "INT"+ },+ {+ "id": 728,+ "origin_id": -10,+ "origin_slot": 7,+ "target_id": 487,+ "target_slot": 0,+ "type": "COMBO"+ },+ {+ "id": 697,+ "origin_id": -10,+ "origin_slot": 8,+ "target_id": 471,+ "target_slot": 7,+ "type": "INT"+ },+ {+ "id": 663,+ "origin_id": -10,+ "origin_slot": 9,+ "target_id": 451,+ "target_slot": 0,+ "type": "COMBO"+ },+ {+ "id": 664,+ "origin_id": -10,+ "origin_slot": 10,+ "target_id": 453,+ "target_slot": 0,+ "type": "COMBO"+ },+ {+ "id": 665,+ "origin_id": -10,+ "origin_slot": 11,+ "target_id": 454,+ "target_slot": 0,+ "type": "COMBO"+ },+ {+ "id": 696,+ "origin_id": -10,+ "origin_slot": 12,+ "target_id": 473,+ "target_slot": 0,+ "type": "COMBO"+ },+ {+ "id": 722,+ "origin_id": -10,+ "origin_slot": 13,+ "target_id": 490,+ "target_slot": 1,+ "type": "COMBO"+ },+ {+ "id": 723,+ "origin_id": -10,+ "origin_slot": 14,+ "target_id": 490,+ "target_slot": 2,+ "type": "COMBO"+ }+ ],+ "extra": {}+ }+ ]+ },+ "config": {},+ "extra": {+ "ds": {+ "scale": 0.35049705570151957,+ "offset": [+ 146.3792925234834,+ -1185.9460614781851+ ]+ },+ "frontendVersion": "1.55.14",+ "VHS_latentpreview": false,+ "VHS_latentpreviewrate": 0,+ "VHS_MetadataImage": true,+ "VHS_KeepIntermediate": true+ },+ "version": 0.4+}\ No newline at end of filediff --git a/src/api/__tests__/qwen-image-21-turbo.test.ts b/src/api/__tests__/qwen-image-21-turbo.test.tsnew file mode 100644index 00000000..a38f9a9d--- /dev/null+++ b/src/api/__tests__/qwen-image-21-turbo.test.ts@@ -0,0 +1,319 @@+/**+ * Qwen-Image 2.1 Turbo on ComfyUI (Discord, 28.10.2026: Turbo looks bad in+ * LU, the full 2.1 model is fine).+ *+ * Turbo is distilled to eight steps on its own sigma schedule. LU built the+ * same KSampler graph for both files, at the sliders' 25 steps and the simple+ * scheduler. The official templates run Turbo through SamplerCustomAdvanced+ * with ManualSigmas instead, and put QwenImage21Cache in front of the sampler+ * for both models.+ *+ * The expectations are read off the templates themselves+ * (fixtures/comfy-ui/templates, Comfy-Org/workflow_templates at+ * 14220b8bd3e86baa852959f17039613191e66656, see SOURCE.md), not typed in a+ * second time.+ *+ * Run: npx vitest run src/api/__tests__/qwen-image-21-turbo.test.ts+ */+import { readFileSync } from 'node:fs'+import { join } from 'node:path'+import { describe, it, expect, vi, beforeEach } from 'vitest'++vi.mock('../comfyui-nodes', async (importOriginal) => {+ const actual = await importOriginal<typeof import('../comfyui-nodes')>()+ return { ...actual, getAllNodeInfo: vi.fn() }+})+vi.mock('../backend', async (importOriginal) => {+ const actual = await importOriginal<typeof import('../backend')>()+ return { ...actual, localFetch: vi.fn(), comfyuiUrl: (p: string) => `http://test${p}` }+})++import { buildDynamicWorkflow } from '../dynamic-workflow'+import { getAllNodeInfo } from '../comfyui-nodes'+import { classifyModel } from '../comfyui'+import { localFetch } from '../backend'+import { applyNativeHiresFix } from '../hires-fix'+import { isQwenImage21Turbo } from '../../lib/render/qwen21-turbo'+import { nodeOf, nodeAt, classTypes } from './graph-test-support'+import type { ComfyApiGraph } from '../../types/comfy-graph'++const NORMAL = 'qwen_image_2.1_int8_convrot.safetensors'+const TURBO = 'qwen_image_2.1_turbo_int8_convrot.safetensors'+const TURBO_BF16 = 'qwen_image_2.1_turbo_bf16.safetensors'+const ENCODER = 'qwen3vl_8b_int8_convrot.safetensors'+const VAE_FILE = 'qwen_image_2.1_vae_bf16.safetensors'+const LORA = 'qwen21_style.safetensors'++// ── The official templates ─────────────────────────────────────────────++interface TplNode { id: number; type: string; widgets_values?: unknown[]; inputs?: { name: string; link: number | null; type: string }[] }+interface TplSubgraph { nodes: TplNode[]; links: { id: number; origin_id: number; origin_slot: number; target_id: number; target_slot: number }[]; inputs: { name: string; type: string }[] }+interface Tpl { nodes: TplNode[]; definitions: { subgraphs: TplSubgraph[] } }++const template = (name: string): Tpl =>+ JSON.parse(readFileSync(join(__dirname, 'fixtures/comfy-ui/templates', name), 'utf8')) as Tpl++/** The template's own subgraph, where its sampler chain lives. */+function chainOf(name: string) {+ const tpl = template(name)+ const sg = tpl.definitions.subgraphs[0]+ const byType = (t: string) => {+ const hits = sg.nodes.filter((nd) => nd.type === t)+ expect(hits, `${name}: one ${t}`).toHaveLength(1)+ return hits[0]+ }+ /** The node class feeding input `input` of `node`, -10 for the subgraph's own inputs. */+ const feeder = (node: TplNode, input: string): { type: string; slot: number; sgInput?: string } => {+ const linkId = node.inputs?.find((i) => i.name === input)?.link+ const link = sg.links.find((l) => l.id === linkId)+ if (!link) throw new Error(`${name}: ${node.type}.${input} is not linked`)+ if (link.origin_id === -10) return { type: 'subgraph-input', slot: link.origin_slot, sgInput: sg.inputs[link.origin_slot].name }+ return { type: sg.nodes.find((nd) => nd.id === link.origin_id)!.type, slot: link.origin_slot }+ }+ return { tpl, sg, byType, feeder }+}++const TURBO_T2I = chainOf('image_qwen_image_2_1_turbo_t2i.json')+const TEMPLATE_SIGMAS = TURBO_T2I.byType('ManualSigmas').widgets_values![0] as string+const TEMPLATE_SAMPLER = TURBO_T2I.byType('KSamplerSelect').widgets_values![0] as string+const TEMPLATE_CFG = TURBO_T2I.byType('CFGGuider').widgets_values![0] as number+const TEMPLATE_CACHE = TURBO_T2I.byType('QwenImage21Cache').widgets_values as [string, string]++// ── /object_info ───────────────────────────────────────────────────────++const CUSTOM = ['RandomNoise', 'KSamplerSelect', 'CFGGuider', 'ManualSigmas', 'SamplerCustomAdvanced']++function nodes(opts: { custom?: string[]; cache?: boolean } = {}) {+ const custom = opts.custom ?? CUSTOM+ const info: Record<string, unknown> = {+ UNETLoader: { input: { required: { unet_name: [[NORMAL, TURBO, TURBO_BF16]] } } },+ CLIPLoader: { input: { required: { clip_name: [[ENCODER]] } } },+ VAELoader: { input: { required: { vae_name: [[VAE_FILE]] } } },+ LoraLoader: { input: { required: { lora_name: [[LORA]] } } },+ TextEncodeQwenImage21: { input: { required: { clip: ['CLIP'], prompt: ['STRING'], negative_prompt: ['STRING'], resolution: ['INT'] }, optional: { vae: ['VAE'], 'images.image_1': ['IMAGE'] } } },+ EmptyLatentImage: { input: { required: {} } },+ KSampler: { input: { required: {} } },+ CLIPTextEncode: { input: { required: {} } },+ VAEDecode: { input: { required: {} } },+ LoadImage: { input: { required: {} } },+ SaveImage: { input: { required: {} } },+ ModelSamplingAuraFlow: { input: { required: {} } },+ }+ if (opts.cache !== false) info.QwenImage21Cache = { input: { required: { model: ['MODEL'], device: [['auto', 'gpu', 'cpu', 'off']], dtype: [['default', 'int8', 'int4']] } } }+ for (const c of custom) info[c] = { input: { required: {} } }+ return info+}++const params = (model: string, extra: Record<string, unknown> = {}) => ({+ model, prompt: 'a red apple on a white plate', negativePrompt: '',+ // What the sliders said in the report: the full model's values.+ sampler: 'dpmpp_2m', scheduler: 'karras', steps: 25, cfgScale: 1,+ width: 1024, height: 1024, seed: 4242, batchSize: 1, ...extra,+})++async function build(model: string, extra: Record<string, unknown> = {}, opts: Parameters<typeof nodes>[0] = {}): Promise<ComfyApiGraph> {+ vi.mocked(getAllNodeInfo).mockResolvedValue(nodes(opts) as never)+ return buildDynamicWorkflow(params(model, extra) as never, classifyModel(model))+}++/** The class of the node a link points at. */+const classAt = (wf: ComfyApiGraph, ref: unknown) => nodeAt(wf, String((ref as [string, number])[0]))?.class_type++beforeEach(() => {+ vi.mocked(localFetch).mockResolvedValue({+ ok: true,+ json: async () => ({+ CLIPLoader: { input: { required: { clip_name: [[ENCODER]] } } },+ VAELoader: { input: { required: { vae_name: [[VAE_FILE]] } } },+ }),+ } as never)+})++// ── (a) Which file is Turbo ────────────────────────────────────────────++describe('isQwenImage21Turbo', () => {+ it('the Comfy-Org files and the community spellings', () => {+ for (const name of [+ TURBO, TURBO_BF16,+ 'Qwen-Image-2.1-Turbo-Q8_0.gguf',+ 'Qwen-Image-2.1-Turbo-fp8_e4m3fn.safetensors',+ 'qwen_image_2_1_TURBO_nvfp4.safetensors',+ 'qwen\\qwen_image_2.1_turbo_int8_convrot.safetensors',+ ]) {+ expect(isQwenImage21Turbo(name), name).toBe(true)+ // And on the 2.1 lane, never Qwen-Image 1 with its AuraFlow shift.+ expect(classifyModel(name), name).toBe('qwenimage')+ }+ })++ it('COUNTER-CHECK: the full model, other Turbo families, the Mac pack and junk are not', () => {+ for (const name of [+ NORMAL, 'qwen_image_2.1_bf16.safetensors', 'NoctQ_V4_int8_convrot.safetensors',+ 'z_image_turbo_bf16.safetensors', 'sd_turbo.safetensors', 'sdxl_turbo_1.0_fp16.safetensors',+ 'qwen_image_2512_turbo_lightning.safetensors', 'qwen_image_edit_2509_turbo.safetensors',+ // The Mac's Qwen-Image 2.1 Turbo is mflux with the Viggle LoRA, its own model.+ 'MLX Qwen-Image 2.1 Turbo 8-bit',+ // A folder called turbo says nothing about the file.+ 'turbo/qwen_image_2.1_int8_convrot.safetensors',+ '', null, undefined,+ ]) {+ expect(isQwenImage21Turbo(name), String(name)).toBe(false)+ }+ })+})++// ── (b) The Turbo graph is the template's ──────────────────────────────++describe('Qwen-Image 2.1 Turbo builds the official Turbo chain', () => {+ it('the template says what this file checks', () => {+ expect(TEMPLATE_SIGMAS).toBe('1.0, 0.978453, 0.95418, 0.926626, 0.89508, 0.845148, 0.704534, 0.414568, 0')+ expect(TEMPLATE_SAMPLER).toBe('euler')+ expect(TEMPLATE_CFG).toBe(1)+ expect(TEMPLATE_CACHE).toEqual(['auto', 'default'])+ const { byType, feeder } = TURBO_T2I+ expect(feeder(byType('QwenImage21Cache'), 'model').type).toBe('UNETLoader')+ expect(feeder(byType('CFGGuider'), 'model').type).toBe('QwenImage21Cache')+ expect(feeder(byType('CFGGuider'), 'positive')).toMatchObject({ type: 'TextEncodeQwenImage21', slot: 0 })+ expect(feeder(byType('CFGGuider'), 'negative')).toMatchObject({ type: 'TextEncodeQwenImage21', slot: 1 })+ expect(feeder(byType('VAEDecode'), 'samples')).toMatchObject({ type: 'SamplerCustomAdvanced', slot: 0 })+ expect(TURBO_T2I.sg.nodes.some((nd) => nd.type === 'KSampler')).toBe(false)+ })++ for (const model of [TURBO, TURBO_BF16]) {+ it(`${model}: node classes, wiring, sigmas word for word, cfg, sampler, cache`, async () => {+ const wf = await build(model)+ const { byType, feeder } = TURBO_T2I+ const [, custom] = nodeOf(wf, 'SamplerCustomAdvanced')!+ // Every input the template wires, from the same class.+ for (const input of ['noise', 'guider', 'sampler', 'sigmas', 'latent_image']) {+ expect(classAt(wf, custom.inputs[input]), input).toBe(feeder(byType('SamplerCustomAdvanced'), input).type)+ }+ expect(nodeOf(wf, 'ManualSigmas')![1].inputs.sigmas).toBe(TEMPLATE_SIGMAS)+ expect(nodeOf(wf, 'KSamplerSelect')![1].inputs.sampler_name).toBe(TEMPLATE_SAMPLER)+ const [, guider] = nodeOf(wf, 'CFGGuider')!+ expect(guider.inputs.cfg).toBe(TEMPLATE_CFG)+ expect(classAt(wf, guider.inputs.model)).toBe('QwenImage21Cache')+ expect(guider.inputs.positive).toEqual([nodeOf(wf, 'TextEncodeQwenImage21')![0], 0])+ expect(guider.inputs.negative).toEqual([nodeOf(wf, 'TextEncodeQwenImage21')![0], 1])+ expect(nodeOf(wf, 'RandomNoise')![1].inputs.noise_seed).toBe(4242)+ const [, cache] = nodeOf(wf, 'QwenImage21Cache')!+ expect([cache.inputs.device, cache.inputs.dtype]).toEqual(TEMPLATE_CACHE)+ expect(classAt(wf, cache.inputs.model)).toBe('UNETLoader')+ expect(nodeOf(wf, 'VAEDecode')![1].inputs.samples).toEqual([nodeOf(wf, 'SamplerCustomAdvanced')![0], 0])+ // Nothing of the old graph and nothing of Qwen-Image 1.+ expect(classTypes(wf)).not.toContain('KSampler')+ expect(classTypes(wf)).not.toContain('ModelSamplingAuraFlow')+ // The sliders' 25 steps and karras scheduler go nowhere.+ expect(JSON.stringify(wf)).not.toContain('karras')+ expect(JSON.stringify(wf)).not.toContain('dpmpp_2m')+ })+ }++ it('Edit runs the same chain, on the latent of the encode node', async () => {+ const wf = await build(TURBO, { inputImage: 'lu_source.png', denoise: 0.7 })+ const [encId] = nodeOf(wf, 'TextEncodeQwenImage21')!+ const [, custom] = nodeOf(wf, 'SamplerCustomAdvanced')!+ expect(custom.inputs.latent_image).toEqual([encId, 2])+ expect(nodeOf(wf, 'ManualSigmas')![1].inputs.sigmas).toBe(TEMPLATE_SIGMAS)+ expect(nodeOf(wf, 'CFGGuider')![1].inputs.cfg).toBe(1)+ expect(classTypes(wf)).not.toContain('KSampler')+ })++ it('the Turbo edit template shows cfg 8 on its CFGGuider, but runs at 1', () => {+ const edit = chainOf('image_qwen_image_2_1_turbo_image_edit.json')+ const guider = edit.byType('CFGGuider')+ expect(guider.widgets_values).toEqual([8])+ // The widget is overridden: cfg is wired to the subgraph input "cfg" ...+ const fed = edit.feeder(guider, 'cfg')+ expect(fed).toMatchObject({ type: 'subgraph-input', sgInput: 'cfg' })+ // ... which the outer node sets to 1 (widget values follow the subgraph's+ // widget inputs, the IMAGE slots carry none).+ const widgetInputs = edit.sg.inputs.filter((i) => i.type !== 'IMAGE').map((i) => i.name)+ const outer = edit.tpl.nodes.find((nd) => nd.widgets_values?.length === widgetInputs.length)!+ expect(outer.widgets_values![widgetInputs.indexOf('cfg')]).toBe(1)+ expect(edit.byType('ManualSigmas').widgets_values![0]).toBe(TEMPLATE_SIGMAS)+ })++ it('a CFG above 1 on the slider reaches the guider', async () => {+ const wf = await build(TURBO, { cfgScale: 2.5 })+ expect(nodeOf(wf, 'CFGGuider')![1].inputs.cfg).toBe(2.5)+ })++ it('LoRAs sit between the model and the cache: UNET → LoRA → cache → guider', async () => {+ const wf = await build(TURBO, { lora: [LORA], loraStrength: [0.8] })+ const [loraId, lora] = nodeOf(wf, 'LoraLoader')!+ expect(classAt(wf, lora.inputs.model)).toBe('UNETLoader')+ const [cacheId, cache] = nodeOf(wf, 'QwenImage21Cache')!+ expect(cache.inputs.model).toEqual([loraId, 0])+ expect(nodeOf(wf, 'CFGGuider')![1].inputs.model).toEqual([cacheId, 0])+ })+})++// ── (c) The full model keeps its KSampler ──────────────────────────────++describe('the full Qwen-Image 2.1 model', () => {+ it('KSampler with the sliders\' values, behind the cache like its template', async () => {+ const full = chainOf('image_qwen_image_2_1_t2i.json')+ expect(full.feeder(full.byType('KSampler'), 'model').type).toBe('QwenImage21Cache')+ expect(full.byType('QwenImage21Cache').widgets_values).toEqual(['auto', 'default'])++ const wf = await build(NORMAL)+ const [, ks] = nodeOf(wf, 'KSampler')!+ expect(ks.inputs).toMatchObject({ steps: 25, cfg: 1, sampler_name: 'dpmpp_2m', scheduler: 'karras', seed: 4242, denoise: 1 })+ expect(classAt(wf, ks.inputs.model)).toBe('QwenImage21Cache')+ const [, cache] = nodeOf(wf, 'QwenImage21Cache')!+ expect([cache.inputs.device, cache.inputs.dtype]).toEqual(['auto', 'default'])+ for (const c of CUSTOM) expect(classTypes(wf)).not.toContain(c)+ })++ it('with LoRAs: UNET → LoRA → cache → KSampler', async () => {+ const wf = await build(NORMAL, { lora: [LORA] })+ const [loraId] = nodeOf(wf, 'LoraLoader')!+ const [cacheId, cache] = nodeOf(wf, 'QwenImage21Cache')!+ expect(cache.inputs.model).toEqual([loraId, 0])+ expect(nodeOf(wf, 'KSampler')![1].inputs.model).toEqual([cacheId, 0])+ })++ it('a ComfyUI without QwenImage21Cache runs without it', async () => {+ const wf = await build(NORMAL, {}, { cache: false })+ expect(classTypes(wf)).not.toContain('QwenImage21Cache')+ expect(classAt(wf, nodeOf(wf, 'KSampler')![1].inputs.model)).toBe('UNETLoader')+ })+})++// ── (d) Without the custom sampler nodes ───────────────────────────────++describe('Turbo on a ComfyUI without the custom sampler nodes', () => {+ for (const missing of CUSTOM) {+ it(`without ${missing}: KSampler at 8 steps, euler, simple`, async () => {+ const wf = await build(TURBO, {}, { custom: CUSTOM.filter((c) => c !== missing) })+ const [, ks] = nodeOf(wf, 'KSampler')!+ expect(ks.inputs).toMatchObject({ steps: 8, cfg: 1, sampler_name: 'euler', scheduler: 'simple', seed: 4242, denoise: 1 })+ expect(classAt(wf, ks.inputs.model)).toBe('QwenImage21Cache')+ expect(classTypes(wf)).not.toContain('SamplerCustomAdvanced')+ expect(classTypes(wf)).not.toContain('ManualSigmas')+ })+ }+})++// ── Native HiRes on the Turbo chain ────────────────────────────────────++describe('Native HiRes on the Turbo chain', () => {+ it('the refinement pass reads model, prompt, cfg, seed and sampler off the chain', async () => {+ const wf = await build(TURBO)+ const out = applyNativeHiresFix(wf, {+ baseWidth: 1024, baseHeight: 1024, scale: 1.5, denoise: 0.4, steps: 6, upscaleMethod: 'nearest-exact', latentDownscale: 16,+ })+ const [customId] = nodeOf(out.workflow, 'SamplerCustomAdvanced')!+ const [, guider] = nodeOf(out.workflow, 'CFGGuider')!+ const upscale = nodeAt(out.workflow, out.upscaleNodeId)!+ expect(upscale.inputs.samples).toEqual([customId, 0])+ const pass = nodeAt(out.workflow, out.samplerNodeId)!+ expect(pass.class_type).toBe('KSampler')+ expect(pass.inputs).toMatchObject({+ model: guider.inputs.model, positive: guider.inputs.positive, negative: guider.inputs.negative,+ latent_image: [out.upscaleNodeId, 0], seed: 4242, cfg: 1, sampler_name: 'euler', scheduler: 'simple', steps: 6, denoise: 0.4,+ })+ expect(nodeOf(out.workflow, 'VAEDecode')![1].inputs.samples).toEqual([out.samplerNodeId, 0])+ })+})diff --git a/src/api/__tests__/wrapper-node-names.test.ts b/src/api/__tests__/wrapper-node-names.test.tsindex 634cb025..f35a0611 100644--- a/src/api/__tests__/wrapper-node-names.test.ts+++ b/src/api/__tests__/wrapper-node-names.test.ts@@ -88,6 +88,11 @@ const CORE_NODES = new Set(['LTXVSeparateAVLatent', 'LTXVEmptyLatentAudio', 'LTXVAudioVAEDecode', 'LTXVLatentUpsampler','LatentUpscaleModelLoader', 'ManualSigmas','MiniMaxH3SigmaShift', 'BlockSparseAttention',+ // Qwen-Image 2.1 Turbo, read in ComfyUI v0.42.4 on 28.10.2026: CFGGuider+ // [nodes_custom_sampler.py 823, registered at 1219] and QwenImage21Cache+ // [nodes_qwen.py 185, in the QwenExtension list at 244]. The builder adds+ // either only when /object_info lists it.+ 'CFGGuider', 'QwenImage21Cache','YuE2GenerateMusic', 'EmptyYuE2LatentAudio',// lora'LoraLoader', 'LoraLoaderModelOnly',diff --git a/src/api/dynamic-workflow.ts b/src/api/dynamic-workflow.tsindex 00bbf549..ce70e574 100644--- a/src/api/dynamic-workflow.ts+++ b/src/api/dynamic-workflow.ts@@ -4,6 +4,7 @@ import {findMatchingAudioEncoder, findMatchingClipVision, findFramePackCLIPPair, getSystemVRAM,} from './comfyui'import { isMacOS } from './backend'+import { QWEN21_TURBO_NODES, QWEN21_TURBO_SAMPLING, QWEN21_TURBO_SIGMAS, isQwenImage21Turbo } from '../lib/render/qwen21-turbo'import { comfyEditFullImages, qwenEditPlusOverCard } from '../lib/comfy-edit-memory'import type { ModelType, GenerateParams, VideoParams } from './comfyui'import { log } from '../lib/logger'@@ -1561,6 +1562,29 @@ export async function buildDynamicWorkflow(workflow[id] = { class_type: 'CFGNorm', inputs: { model: [samplerModelId, 0], strength: 1 } }samplerModelId = id}+ // Qwen-Image 2.1, full model and Turbo: both official templates put+ // QwenImage21Cache ("auto", "default") between the model and the sampler.+ // It only sets where the key/value cache of the prompt prefix lives+ // (comfy_extras/nodes_qwen.py), so it goes after the LoRA chain: UNET →+ // LoRAs → cache → sampler. A ComfyUI without the node runs without it.+ if (strategy === 'unet_qwenimage' && allNodes['QwenImage21Cache']) {+ const id = String(n++)+ workflow[id] = { class_type: 'QwenImage21Cache', inputs: { model: [samplerModelId, 0], device: 'auto', dtype: 'default' } }+ samplerModelId = id+ }+ // Qwen-Image 2.1 Turbo (lib/render/qwen21-turbo): its own eight step+ // schedule through SamplerCustomAdvanced, as the official Turbo templates+ // run it, for Generate and Edit alike. Steps, sampler and scheduler of the+ // sliders do not reach it. CFG does: the Turbo edit template offers cfg as+ // a setting of its own (1, "raise it only if you use a negative prompt"),+ // and Create presets 1 for a Turbo file and says so when it is higher.+ // Without one of the custom sampler nodes the run falls back to a KSampler+ // at eight steps, euler, simple.+ const qwenTurbo = strategy === 'unet_qwenimage' && isQwenImage21Turbo(params.model)+ const qwenTurboChain = qwenTurbo && QWEN21_TURBO_NODES.every((c) => !!allNodes[c])+ if (qwenTurbo) {+ log.info(`[dynamic-workflow] Qwen-Image 2.1 Turbo: ${qwenTurboChain ? 'SamplerCustomAdvanced on the template sigmas' : 'KSampler fallback, 8 steps'}`)+ }// ─── Phase 4: Sampling ───@@ -1658,6 +1682,25 @@ export async function buildDynamicWorkflow(log.info(`[dynamic-workflow] Wan 2.2 A14B pair: ${params.model} → ${lowNoisePartner}, split at step ${split}`)}+ // The four inputs of the Turbo chain besides the latent, one node each.+ let qwenTurboCustom: ComfyNodeInputs | null = null+ if (qwenTurboChain) {+ const part = (node: { class_type: string; inputs: ComfyNodeInputs }): [string, number] => {+ const id = String(n++)+ workflow[id] = node+ return [id, 0]+ }+ qwenTurboCustom = {+ noise: part({ class_type: 'RandomNoise', inputs: { noise_seed: seed } }),+ guider: part({+ class_type: 'CFGGuider',+ inputs: { model: [samplerModelId, 0], positive: positiveRef, negative: negativeRef, cfg: params.cfgScale },+ }),+ sampler: part({ class_type: 'KSamplerSelect', inputs: { sampler_name: QWEN21_TURBO_SAMPLING.sampler } }),+ sigmas: part({ class_type: 'ManualSigmas', inputs: { sigmas: QWEN21_TURBO_SIGMAS } }),+ }+ }+const samplerId = String(n++)workflow[samplerId] = highNoiseStage ? {@@ -1669,6 +1712,13 @@ export async function buildDynamicWorkflow(start_at_step: highNoiseStage.split, end_at_step: 10000, return_with_leftover_noise: 'disable',},_meta: { title: 'Wan 2.2 low noise' },+ } : qwenTurboCustom ? {+ class_type: 'SamplerCustomAdvanced',+ inputs: {+ ...qwenTurboCustom,+ latent_image: latentRef,+ },+ _meta: { title: 'Qwen-Image 2.1 Turbo' },} : {class_type: 'KSampler',inputs: {@@ -1677,10 +1727,10 @@ export async function buildDynamicWorkflow(negative: negativeRef,latent_image: latentRef,seed,- steps: params.steps,+ steps: qwenTurbo ? QWEN21_TURBO_SAMPLING.steps : params.steps,cfg: params.cfgScale,- sampler_name: params.sampler,- scheduler: params.scheduler,+ sampler_name: qwenTurbo ? QWEN21_TURBO_SAMPLING.sampler : params.sampler,+ scheduler: qwenTurbo ? QWEN21_TURBO_SAMPLING.scheduler : params.scheduler,denoise: isInpaint ? (params.denoise ?? 0.85) : isI2I ? (params.denoise ?? 0.7) : 1.0, // Qwen-Image-Edit: 1.0, like its template},}diff --git a/src/api/hires-fix.ts b/src/api/hires-fix.tsindex d2563f9e..126b43d8 100644--- a/src/api/hires-fix.ts+++ b/src/api/hires-fix.ts@@ -5,6 +5,8 @@ import {nodeInput,type ComfyApiGraph,type ComfyApiNode,+ type ComfyInputValue,+ type ComfyNodeInputs,} from '../types/comfy-graph'import { propPath } from '../types/json-guards'@@ -147,6 +149,41 @@ export function nativeHiresFinalSize(return { width, height }}+/**+ * The KSampler a SamplerCustomAdvanced stands for, when it is fed by a+ * CFGGuider, a RandomNoise and a KSamplerSelect (the Qwen-Image 2.1 Turbo+ * chain). Its own sigmas cover a full run from noise, so the refinement pass+ * takes the simple scheduler at the pass's own steps and denoise. Undefined+ * for any other feed, which keeps the refusal below.+ */+function customAsKSampler(workflow: ComfyApiGraph, custom: ComfyApiNode): ComfyApiNode | undefined {+ const fed = (key: string, type: string): ComfyApiNode | undefined => {+ const ref = nodeInput(custom, key)+ const node = isComfyLinkRef(ref) ? nodeAt(workflow, String(ref[0])) : undefined+ return node?.class_type === type ? node : undefined+ }+ const guider = fed('guider', 'CFGGuider')+ const noise = fed('noise', 'RandomNoise')+ const sampler = fed('sampler', 'KSamplerSelect')+ if (!guider || !noise || !sampler) return undefined+ const read: Record<string, ComfyInputValue | undefined> = {+ model: nodeInput(guider, 'model'),+ positive: nodeInput(guider, 'positive'),+ negative: nodeInput(guider, 'negative'),+ latent_image: nodeInput(custom, 'latent_image'),+ seed: nodeInput(noise, 'noise_seed'),+ steps: 1,+ cfg: nodeInput(guider, 'cfg'),+ sampler_name: nodeInput(sampler, 'sampler_name'),+ scheduler: 'simple',+ denoise: 1,+ }+ // A missing input stays out, so the check for the four links below names it.+ const inputs: ComfyNodeInputs = {}+ for (const [key, value] of Object.entries(read)) if (value !== undefined) inputs[key] = value+ return { class_type: 'KSampler', inputs }+}+/*** Adds a native latent-upscale refinement pass to a simple image workflow:*@@ -229,10 +266,14 @@ export function applyNativeHiresFix(}const firstSamplerId = String(samplesRef[0])- const firstSampler = nodeAt(workflow, firstSamplerId)+ const found = nodeAt(workflow, firstSamplerId)+ // Qwen-Image 2.1 Turbo's chain (lib/render/qwen21-turbo) ends in a+ // SamplerCustomAdvanced; its pass reads the same model, prompt, CFG, seed+ // and sampler off the CFGGuider, RandomNoise and KSamplerSelect.+ const firstSampler = found?.class_type === 'SamplerCustomAdvanced' ? customAsKSampler(workflow, found) : foundif (!firstSampler || firstSampler.class_type !== 'KSampler') {throw new NativeHiresFixError(- `Native HiRes currently requires a core KSampler before the final decode; this workflow uses ${firstSampler?.class_type ?? 'an unknown node'}.`,+ `Native HiRes currently requires a core KSampler before the final decode; this workflow uses ${found?.class_type ?? 'an unknown node'}.`,)}diff --git a/src/components/create/experimental/ParamGroups.tsx b/src/components/create/experimental/ParamGroups.tsxindex caba1542..d23a92f8 100644--- a/src/components/create/experimental/ParamGroups.tsx+++ b/src/components/create/experimental/ParamGroups.tsx@@ -29,6 +29,7 @@ import { loraStackView, setLoraStackQuery, setLoraStackScroll } from './loraStacimport { LoraStrength } from './LoraStrength'import { MOTION_OWN_WORKFLOW_NOTE, useMotionOwnWorkflow } from './motionWorkflow'import { supportsTransparent } from '../../../lib/transparent-image'+import { isQwenImage21Turbo } from '../../../lib/render/qwen21-turbo'import { QWEN_ENCODER_HELP, pickQwenEncoder, qwenEncoderOptions, type QwenEncoderVariant } from '../../../lib/render/qwen-text-encoder'import { MAX_SHOTS, MAX_SHOT_CHARS, supportsMultishot } from '../../../lib/ltx-multishot'import { frameRangeFor, framesOnRange, lengthHint } from '../../../lib/video-length'@@ -168,6 +169,10 @@ export function ParamGroups() {const showSteps = !(isCloud && isVideo) && !ownSampling && (!macVideo || macSteps) && !macMusicconst showSize = !isAudio && (!macVideo || macSize)const showCfg = isCloud ? cloudModelById(cloudModelId)?.cfg === true : !ownSampling && !macVideo && !macMusic+ // Qwen-Image 2.1 Turbo on ComfyUI runs the eight step schedule of its+ // official template (lib/render/qwen21-turbo): a line says which sliders+ // reach it. The Mac's Turbo pack is another model and hides the sliders.+ const qwenTurbo = !isCloud && !isVideo && !isMlxLocal && isQwenImage21Turbo(laneModel)// Native HiRes rewrites the local ComfyUI image graph: text to image, and// since 3.0.8 Edit too (Discord feature request 21.10.2026). It has no// cloud or video path, so keep the control honest and scoped to the lanes@@ -249,6 +254,12 @@ export function ParamGroups() {>{showSteps && <Slider label="Steps" min={1} max={macVideo ? (macClip?.maxSteps ?? 60) : 60} step={1} value={s.steps} onChange={s.setSteps} />}{showCfg && <Slider label={isVideo ? 'Guidance' : 'CFG scale'} min={0} max={30} step={0.5} value={s.cfgScale} onChange={s.setCfgScale} format={(v) => v.toFixed(1)} />}+ {qwenTurbo && (+ <p className="t-micro text-gray-500" data-testid="qwen21-turbo-hint">+ Turbo runs its own 8-step schedule at CFG 1. Steps, sampler and scheduler are not used.+ {s.cfgScale > 1 && ` CFG ${s.cfgScale.toFixed(1)} is above the 1 Turbo is made for and can overcook it.`}+ </p>+ )}{showSize && (macSize && macClip ? (// The Mac: the model's grid and bounds. What runs is said below.<div className="grid grid-cols-2 gap-2">diff --git a/src/components/create/experimental/__tests__/qwen21-turbo-hinweis.test.tsx b/src/components/create/experimental/__tests__/qwen21-turbo-hinweis.test.tsxnew file mode 100644index 00000000..01519fe0--- /dev/null+++ b/src/components/create/experimental/__tests__/qwen21-turbo-hinweis.test.tsx@@ -0,0 +1,59 @@+// @vitest-environment jsdom+/**+ * Qwen-Image 2.1 Turbo on ComfyUI runs its own eight step schedule, so the+ * Quality section says which sliders do not reach it, and warns when CFG is+ * above the 1 the model is made for. Only for a Turbo file.+ *+ * Run: npx vitest run src/components/create/experimental/__tests__/qwen21-turbo-hinweis.test.tsx+ */+import { afterEach, describe, expect, it, vi } from 'vitest'+import { cleanup, render, screen } from '@testing-library/react'++vi.mock('../../../../api/mlx-image', () => ({ isMlxImageHost: () => false }))+vi.mock('../CreateContext', () => ({+ useCreateExp: () => ({+ samplerList: [], schedulerList: [], loraList: [], vaeList: [], refreshModelLists: vi.fn(),+ }),+}))++import { ParamGroups } from '../ParamGroups'+import { useCreateStore } from '../../../../stores/createStore'+import { classifyModel } from '../../../../api/comfyui'++function setup(model: string, intent: 'image' | 'edit' = 'image') {+ useCreateStore.setState({+ backend: 'local', isGenerating: false, transparentBackground: false, improvePrompt: false,+ cloudStudioOptions: {}, cloudOp: null, utilityOp: null, removebg: false, textEncoderList: [],+ imageModelList: [{ name: model, type: classifyModel(model) }],+ } as never)+ useCreateStore.getState().setImageModel(model, classifyModel(model))+ useCreateStore.getState().setIntent(intent)+}++const hint = () => screen.queryByTestId('qwen21-turbo-hint')++afterEach(() => { cleanup() })++describe('the Turbo line in Quality', () => {+ it.each([['image'], ['edit']] as const)('shows for a Turbo file on %s', (intent) => {+ setup('qwen_image_2.1_turbo_int8_convrot.safetensors', intent)+ render(<ParamGroups />)+ expect(hint()?.textContent).toBe('Turbo runs its own 8-step schedule at CFG 1. Steps, sampler and scheduler are not used.')+ })++ it('names a CFG above 1', () => {+ setup('qwen_image_2.1_turbo_bf16.safetensors')+ useCreateStore.setState({ cfgScale: 3 })+ render(<ParamGroups />)+ expect(hint()?.textContent).toContain('CFG 3.0 is above the 1 Turbo is made for')+ })++ it('COUNTER-CHECK: not for the full 2.1 model or another Turbo family', () => {+ for (const model of ['qwen_image_2.1_int8_convrot.safetensors', 'z_image_turbo_bf16.safetensors', 'sd_turbo.safetensors']) {+ setup(model)+ render(<ParamGroups />)+ expect(hint(), model).toBeNull()+ cleanup()+ }+ })+})diff --git a/src/lib/render/qwen21-turbo.ts b/src/lib/render/qwen21-turbo.tsnew file mode 100644index 00000000..10bdc5e0--- /dev/null+++ b/src/lib/render/qwen21-turbo.ts@@ -0,0 +1,70 @@+// Qwen-Image 2.1 Turbo on ComfyUI (Discord, 28.10.2026: "Turbo looks bad in+// LU, the normal 2.1 is fine"). Turbo is a distilled 8 step checkpoint with+// its own sigma schedule. LU ran it through the same KSampler as the full+// model, at the 25 steps and the simple scheduler of the full model, and the+// pictures came out wrong.+//+// Read off the sources on 28.10.2026:+// - Comfy-Org/workflow_templates at 14220b8bd3e86baa852959f17039613191e66656,+// templates/image_qwen_image_2_1_turbo_t2i.json: UNETLoader →+// QwenImage21Cache("auto", "default") → CFGGuider (cfg 1, the positive and+// negative of TextEncodeQwenImage21), KSamplerSelect("euler"),+// RandomNoise, ManualSigmas with the nine values below, EmptyLatentImage,+// SamplerCustomAdvanced (output slot 0) → VAEDecode. The Turbo edit+// template has the same chain; its CFGGuider shows a stale widget value+// of 8, but the cfg input is wired to the subgraph's "cfg", which the+// outer node sets to 1.+// - the model card of Qwen/Qwen-Image-2.1-Turbo: 8 denoising steps on the+// recommended schedule, CFG 1 by default.+// - ComfyUI v0.42.4, comfy_extras/nodes_custom_sampler.py (ManualSigmas+// takes one string, CFGGuider model/positive/negative/cfg, RandomNoise+// noise_seed, KSamplerSelect sampler_name, SamplerCustomAdvanced+// noise/guider/sampler/sigmas/latent_image) and comfy_extras/nodes_qwen.py+// (QwenImage21Cache model/device/dtype).+//+// The Mac's Qwen-Image 2.1 Turbo is another thing: the 8-bit pack with the+// Viggle Turbo LoRA on mflux, six steps on that adapter's own schedule+// (commands/image_mflux.rs QWEN21_TURBO). Its picker name starts with "MLX "+// (api/mlx-image MLX_MODEL_PREFIX) and it is left out here.++import { classifyModel } from '../../api/comfyui'++/** The sigmas of the official Turbo templates, word for word. ManualSigmas+ * reads the numbers out of this one string. */+export const QWEN21_TURBO_SIGMAS = '1.0, 0.978453, 0.95418, 0.926626, 0.89508, 0.845148, 0.704534, 0.414568, 0'++/** What Turbo runs at: eight steps (nine sigmas), euler, CFG 1. The scheduler+ * only matters on the KSampler fallback, where no schedule of its own fits. */+export const QWEN21_TURBO_SAMPLING = { steps: 8, cfg: 1.0, sampler: 'euler', scheduler: 'simple' } as const++/** The nodes the official Turbo chain needs besides the Qwen-Image 2.1 lane's+ * own. Without one of them the run falls back to a KSampler at the numbers above. */+export const QWEN21_TURBO_NODES = ['RandomNoise', 'KSamplerSelect', 'CFGGuider', 'ManualSigmas', 'SamplerCustomAdvanced'] as const++/** The Mac's picker names (api/mlx-image MLX_MODEL_PREFIX). Spelled out here+ * rather than imported, so this stays free of the Mac engine module. */+const MLX_PREFIX = 'MLX '++/**+ * True for a Qwen-Image 2.1 Turbo file on ComfyUI: a file of the 2.1 family+ * (classifyModel 'qwenimage') whose own name says "turbo". Comfy-Org ships+ * qwen_image_2.1_turbo_int8_convrot and qwen_image_2.1_turbo_bf16, the+ * community repacks carry the word as well (Qwen-Image-2.1-Turbo-...).+ *+ * By name only, on purpose. The headers of the official 2.1 and Turbo files+ * carry the same weights and a __metadata__ of just {"format": "pt"}; Turbo+ * adds `transformer_blocks.N.attn.comfy_attention.config` tensors in 31 of+ * its blocks. Those are an attention setting of the ComfyUI repack, not a+ * mark of the distillation, so another repack of Turbo need not carry them+ * and a repack of the full model might. The header is also read in Rust+ * (commands/model_sniff.rs) only for the family, and the workflow builder+ * gets the file name alone, so the signal would cost a new field through+ * three layers for a guess. Qwen-Image 1 (2512 Lightning and the like) is+ * another family and never matches; the folder a file sits in does not count.+ */+export function isQwenImage21Turbo(model: string | null | undefined): boolean {+ if (!model || typeof model !== 'string' || model.startsWith(MLX_PREFIX)) return false+ if (classifyModel(model) !== 'qwenimage') return false+ const base = model.replace(/^.*[\\/]/, '')+ return /turbo/i.test(base)+}diff --git a/src/stores/__tests__/qwen21-turbo-starts-at-eight-steps.test.ts b/src/stores/__tests__/qwen21-turbo-starts-at-eight-steps.test.tsnew file mode 100644index 00000000..cca901c7--- /dev/null+++ b/src/stores/__tests__/qwen21-turbo-starts-at-eight-steps.test.ts@@ -0,0 +1,52 @@+/**+ * Qwen-Image 2.1 Turbo on ComfyUI (Discord, 28.10.2026): picking the file+ * puts the sliders at what its official template runs, 8 steps, CFG 1, euler.+ * The full 2.1 model keeps its own 25 steps.+ *+ * Run: npx vitest run src/stores/__tests__/qwen21-turbo-starts-at-eight-steps.test.ts+ */+import { describe, it, expect } from 'vitest'+import { useCreateStore, MODEL_TYPE_DEFAULTS, imageQualityLadder } from '../createStore'++const TURBO = 'qwen_image_2.1_turbo_int8_convrot.safetensors'+const NORMAL = 'qwen_image_2.1_int8_convrot.safetensors'++describe('picking Qwen-Image 2.1 Turbo', () => {+ it('sets 8 steps, CFG 1, euler', () => {+ useCreateStore.setState({ backend: 'local', steps: 30, cfgScale: 5, sampler: 'dpmpp_2m' } as never)+ useCreateStore.getState().setImageModel(TURBO, 'qwenimage')+ expect(useCreateStore.getState()).toMatchObject({ steps: 8, cfgScale: 1, sampler: 'euler', width: 1024, height: 1024 })+ })++ it('the community spelling too', () => {+ useCreateStore.getState().setImageModel('Qwen-Image-2.1-Turbo-Q8_0.gguf', 'qwenimage')+ expect(useCreateStore.getState()).toMatchObject({ steps: 8, cfgScale: 1, sampler: 'euler' })+ })++ it('back to the full model, its own 25 steps', () => {+ useCreateStore.getState().setImageModel(TURBO, 'qwenimage')+ useCreateStore.getState().setImageModel(NORMAL, 'qwenimage')+ const d = MODEL_TYPE_DEFAULTS.qwenimage+ expect(useCreateStore.getState()).toMatchObject({ steps: d.steps, cfgScale: d.cfgScale, sampler: d.sampler, scheduler: d.scheduler })+ expect(d.steps).toBe(25)+ })++ it('Reset to model defaults goes back to 8 steps and CFG 1', () => {+ useCreateStore.setState({ backend: 'local', mode: 'image' } as never)+ useCreateStore.getState().setImageModel(TURBO, 'qwenimage')+ useCreateStore.setState({ steps: 40, cfgScale: 4, sampler: 'dpmpp_2m' })+ useCreateStore.getState().resetParamsToModelDefaults()+ expect(useCreateStore.getState()).toMatchObject({ steps: 8, cfgScale: 1, sampler: 'euler' })+ })++ it('the Quality buttons measure from 8 and hold CFG at 1', () => {+ const ladder = imageQualityLadder({ backend: 'local', imageModel: TURBO, imageModelType: 'qwenimage' })+ expect(ladder.steps.Standard).toBe(8)+ expect(ladder.cfgScale).toBe(1)+ })++ it('COUNTER-CHECK: the Mac pack of the same name keeps the family values', () => {+ useCreateStore.getState().setImageModel('MLX Qwen-Image 2.1 Turbo 8-bit', 'qwenimage')+ expect(useCreateStore.getState().steps).toBe(MODEL_TYPE_DEFAULTS.qwenimage.steps)+ })+})diff --git a/src/stores/createStore.ts b/src/stores/createStore.tsindex 72fd8f83..d83f7d65 100644--- a/src/stores/createStore.ts+++ b/src/stores/createStore.ts@@ -56,6 +56,7 @@ import { classifyModel, hidreamSampling, resolveLocalOpPick } from '../api/comfyimport type { HiresUpscaleMethod } from '../api/hires-fix'import { mlxFollowsMotion, mlxTakesStartImage, mlxTalking, mlxVideoLaneEntry, releaseVideoBlobUrl } from '../api/mlx-video'import { isMlxImageHost, type MacUpscaleFactor } from '../api/mlx-image'+import { QWEN21_TURBO_SAMPLING, isQwenImage21Turbo } from '../lib/render/qwen21-turbo'import { mlxMakesMusic } from '../lib/mac-music'import { MAC_EDIT_DEAD_SIDE, MAC_EDIT_SIDE_INSTEAD, imageLaneModels, mlxTakesEditImage } from '../lib/image-engines'import { STUDIO_MODELS } from '../lib/render/studio-contract'@@ -806,6 +807,15 @@ function imageModelParams(state: { imageModel: string; imageModelType: ModelType? hidreamDefaults(state.imageModel): MODEL_TYPE_DEFAULTS[state.imageModelType] || MODEL_TYPE_DEFAULTS.unknownconst distilled = distilledImageCheckpoint(state.imageModel, state.imageModelType)+ // Qwen-Image 2.1 Turbo on ComfyUI runs its own eight step schedule at CFG 1+ // (lib/render/qwen21-turbo), so the sliders stand at what the run takes.+ if (state.imageModelType === 'qwenimage' && isQwenImage21Turbo(state.imageModel)) {+ return {+ steps: QWEN21_TURBO_SAMPLING.steps, cfgScale: QWEN21_TURBO_SAMPLING.cfg,+ sampler: QWEN21_TURBO_SAMPLING.sampler, scheduler: QWEN21_TURBO_SAMPLING.scheduler,+ width: defaults.width, height: defaults.height,+ }+ }return {steps: distilled ? 4 : defaults.steps, cfgScale: distilled ? 1.0 : defaults.cfgScale,sampler: defaults.sampler, scheduler: defaults.scheduler,@@ -907,7 +917,7 @@ export function imageQualityLadder(Standard: own.steps,High: Math.round(own.steps * 1.5),},- ...(local && distilledImageCheckpoint(s.imageModel, s.imageModelType) ? { cfgScale: own.cfgScale } : {}),+ ...(local && (distilledImageCheckpoint(s.imageModel, s.imageModelType) || isQwenImage21Turbo(s.imageModel)) ? { cfgScale: own.cfgScale } : {}),}}