ComfyPilotComfyPilot
工作流 / 图像 / Mage-Flow-Edit Turbo: 图像编辑
Mage-Flow-Edit Turbo: 图像编辑

Mage-Flow-Edit Turbo: 图像编辑

Mage-Flow-Edit Turbo: Image Edit

使用参考照片和文本指令,通过Mage-Flow-Edit Turbo模型编辑图像,这是一个精简的4B参数模型,仅需4步即可生成结果。它接受1-3张参考图像和文本提示词作为输入,然后输出符合您指令的编辑后图像。非常适合快速风格迁移、背景替换和交互式照片编辑会话。

图像 5 个节点 1 个输入 21 次使用 ComfyUI ≥ 0.29.0 ComfyUI 44 KB

下载工作流 JSON 查看官方来源

下载后把文件拖进 ComfyUI 窗口即可打开。

需要的权重

这个工作流引用了 3 个权重文件,其中 3 个能在本站模型库里找到。

mage_flow_edit_turbo_int8_convrot.safetensors 在模型库查看
mage_flow_vae_bf16.safetensors 在模型库查看
qwen3vl_4b_bf16.safetensors 在模型库查看

节点构成

MarkdownNote × 2
LoadImage × 1
SaveImageAdvanced × 1
d069257b-0abc-4d5a-9a19-579e0fe5bd8d × 1

官方标注的模型

Mage-Flow

工作流 JSON

和上面「下载工作流 JSON」是同一份文件。

1{
2 "id": "e13112f7-3d09-4ae1-9e84-633a0627d945",
3 "revision": 0,
4 "last_node_id": 31,
5 "last_link_id": 62,
6 "nodes": [
7 {
8 "id": 7,
9 "type": "LoadImage",
10 "pos": [
11 -2180,
12 300
13 ],
14 "size": [
15 510,
16 800
17 ],
18 "flags": [],
19 "order": 0,
20 "mode": 0,
21 "inputs": [],
22 "outputs": [
23 {
24 "name": "IMAGE",
25 "type": "IMAGE",
26 "links": [
27 13
28 ]
29 },
30 {
31 "name": "MASK",
32 "type": "MASK",
33 "links": null
34 }
35 ],
36 "properties": {
37 "Node name for S&R": "LoadImage"
38 },
39 "widgets_values": [
40 "hot_air_balloons_rising.png",
41 "image"
42 ]
43 },
44 {
45 "id": 10,
46 "type": "SaveImageAdvanced",
47 "pos": [
48 -1100,
49 300
50 ],
51 "size": [
52 700,
53 144
54 ],
55 "flags": [],
56 "order": 4,
57 "mode": 0,
58 "showAdvanced": false,
59 "inputs": [
60 {
61 "name": "images",
62 "type": "IMAGE",
63 "link": 14
64 }
65 ],
66 "outputs": [
67 {
68 "name": "images",
69 "type": "IMAGE",
70 "links": []
71 }
72 ],
73 "properties": {
74 "Node name for S&R": "SaveImageAdvanced"
75 },
76 "widgets_values": [
77 "Mage_flow_edit_turbo",
78 "png",
79 "8-bit",
80 "sRGB"
81 ]
82 },
83 {
84 "id": 12,
85 "type": "d069257b-0abc-4d5a-9a19-579e0fe5bd8d",
86 "pos": [
87 -1630,
88 300
89 ],
90 "size": [
91 490,
92 800
93 ],
94 "flags": [],
95 "order": 3,
96 "mode": 0,
97 "inputs": [
98 {
99 "label": "image_1",
100 "name": "images.image_1",
101 "type": "IMAGE",
102 "link": 13
103 },
104 {
105 "label": "resize_input_image",
106 "name": "switch",
107 "type": "BOOLEAN",
108 "widget": {
109 "name": "switch"
110 },
111 "link": null
112 },
113 {
114 "label": "target_megapixels",
115 "name": "resize_type.megapixels",
116 "type": "FLOAT",
117 "widget": {
118 "name": "resize_type.megapixels"
119 },
120 "link": null
121 },
122 {
123 "label": "width",
124 "name": "value",
125 "type": "INT",
126 "widget": {
127 "name": "value"
128 },
129 "link": null
130 },
131 {
132 "label": "height",
133 "name": "value_1",
134 "type": "INT",
135 "widget": {
136 "name": "value_1"
137 },
138 "link": null
139 },
140 {
141 "label": "match_input_size",
142 "name": "value_2",
143 "type": "BOOLEAN",
144 "widget": {
145 "name": "value_2"
146 },
147 "link": null
148 },
149 {
150 "label": "image_2",
151 "name": "images.image_2",
152 "shape": 7,
153 "type": "IMAGE",
154 "link": null
155 },
156 {
157 "label": "image_3",
158 "name": "images.image_3",
159 "shape": 7,
160 "type": "IMAGE",
161 "link": null
162 }
163 ],
164 "outputs": [
165 {
166 "name": "IMAGE",
167 "type": "IMAGE",
168 "links": [
169 14
170 ]
171 }
172 ],
173 "properties": {
174 "proxyWidgets": [
175 [
176 "5",
177 "prompt"
178 ],
179 [
180 "6",
181 "seed"
182 ],
183 [
184 "19",
185 "value"
186 ],
187 [
188 "31",
189 "megapixels"
190 ],
191 [
192 "20",
193 "value"
194 ],
195 [
196 "21",
197 "value"
198 ],
199 [
200 "18",
201 "value"
202 ],
203 [
204 "1",
205 "unet_name"
206 ],
207 [
208 "3",
209 "clip_name"
210 ],
211 [
212 "4",
213 "vae_name"
214 ]
215 ],
216 "previewExposures": [
217 {
218 "name": "$$canvas-image-preview",
219 "sourceNodeId": "6",
220 "sourcePreviewName": "$$canvas-image-preview"
221 }
222 ]
223 },
224 "widgets_values": []
225 },
226 {
227 "id": 23,
228 "type": "MarkdownNote",
229 "pos": [
230 -3180,
231 300
232 ],
233 "size": [
234 960,
235 1380
236 ],
237 "flags": [],
238 "order": 1,
239 "mode": 0,
240 "inputs": [],
241 "outputs": [],
242 "title": "Note: Mage-Flow-Edit",
243 "properties": [],
244 "widgets_values": [
245 "# Mage-Flow-Edit\n\n**Mage-Flow-Edit** is Microsoft's 4B instruction-based image editing model (Mage-VAE + Native-Resolution DiT + Qwen3-VL). It supports background replacement, style/lighting changes, localized content edits, restoration, and multi-reference editing (1–3 refs recommended).\n\n## Links\n\n- **Mage project:** https://github.com/microsoft/Mage\n- **ComfyUI integration PR:** https://github.com/Comfy-Org/ComfyUI/pull/15026\n\n## Resolution limits\n\n| Item | Value |\n|------|-------|\n| Output range | **512 – 2048** px per side (native-resolution training range) |\n| Alignment | Width & height must be a **multiple of 16** (VAE downsamples 16×) |\n| Aspect ratio | Any; extreme **4:1** supported (e.g. `2048×512`) |\n| Reference input | No hard pixel cap; resized to the target output size |\n| VL conditioning | Reference long edge capped at **384px** internally |\n\n**Recommendations:** use **1024** longest side for everyday tests; **1536–2048** for higher quality. Avoid exceeding **2048** — quality and stability drop outside the training distribution.\n\n## Workflow parameters\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| `prompt` | — | Edit instruction (English recommended). State what to keep, then what to change. |\n| `seed` | randomize | Fixed seed for reproducibility |\n| `resize_input_image` | true | Pre-scale the reference image before editing |\n| `target_megapixels` | 1.0 | Target area in megapixels when resizing (~1.0 ≈ 1024×1024) |\n| `match_input_size` | true | Output size follows the (resized) reference; if false, use `width` / `height` |\n| `width` / `height` | 1024 | Manual output size (only when `match_input_size` = false); step 16 |\n\n### Size logic\n\n1. `resize_input_image = true` → scale input to `target_megapixels` first\n2. `match_input_size = true` → output matches processed reference dimensions\n3. `match_input_size = false` → output uses manual `width` × `height`\n\n## Models (BF16)\n\n- `mage_flow_edit_bf16.safetensors` — edit DiT\n- `qwen3vl_4b_bf16.safetensors` — Qwen3-VL encoder (type: mage)\n- `mage_flow_vae_bf16.safetensors` — Mage-VAE"
246 ],
247 "color": "#222",
248 "bgcolor": "#000"
249 },
250 {
251 "id": 25,
252 "type": "MarkdownNote",
253 "pos": [
254 -4080,
255 300
256 ],
257 "size": [
258 870,
259 1360
260 ],
261 "flags": [],
262 "order": 2,
263 "mode": 0,
264 "inputs": [],
265 "outputs": [],
266 "title": "Model Links",
267 "properties": [],
268 "widgets_values": [
269 "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Model Links\n\n- [Hugging Face:Comfy-Org/Mage-Flow](https://huggingface.co/Comfy-Org/Mage-Flow)\n\n**ModelScope mirrors** (alternative repo location)\n\n- [ModelScope:Comfy-Org/Mage-Flow](https://modelscope.cn/models/Comfy-Org/Mage-Flow)\n\n**diffusion_models**\n\n- [mage_flow_edit_turbo_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/Mage-Flow/resolve/main/diffusion_models/mage_flow_edit_turbo_int8_convrot.safetensors) (3.87 GB)\n- [mage_flow_edit_turbo_bf16.safetensors](https://huggingface.co/Comfy-Org/Mage-Flow/resolve/main/diffusion_models/mage_flow_edit_turbo_bf16.safetensors) (7.67 GB)\n\n**text_encoders**\n\n- [qwen3vl_4b_bf16.safetensors](https://huggingface.co/Comfy-Org/Mage-Flow/resolve/main/text_encoders/qwen3vl_4b_bf16.safetensors) (8.27 GB)\n\n**vae**\n\n- [mage_flow_vae_bf16.safetensors](https://huggingface.co/Comfy-Org/Mage-Flow/resolve/main/vae/mage_flow_vae_bf16.safetensors) (329.1 MB)\n\n## Model Storage Location\n\n```\n📂 ComfyUI/\n├── 📂 models/\n│ ├── 📂 diffusion_models/\n│ │ └── mage_flow_edit_turbo_int8_convrot.safetensors\n│ ├── 📂 text_encoders/\n│ │ └── qwen3vl_4b_bf16.safetensors\n│ └── 📂 vae/\n│ └── mage_flow_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"
270 ],
271 "color": "#222",
272 "bgcolor": "#000"
273 }
274 ],
275 "links": [
276 [
277 13,
278 7,
279 0,
280 12,
281 0,
282 "IMAGE"
283 ],
284 [
285 14,
286 12,
287 0,
288 10,
289 0,
290 "IMAGE"
291 ]
292 ],
293 "groups": [],
294 "definitions": {
295 "subgraphs": [
296 {
297 "id": "d069257b-0abc-4d5a-9a19-579e0fe5bd8d",
298 "version": 1,
299 "state": {
300 "lastGroupId": 6,
301 "lastNodeId": 31,
302 "lastLinkId": 62,
303 "lastRerouteId": 0
304 },
305 "revision": 0,
306 "config": [],
307 "name": "Image Edit (Mage-Flow-Edit Turbo)",
308 "inputNode": {
309 "id": -10,
310 "bounding": [
311 -2400,
312 520,
313 156.6328125,
314 308
315 ]
316 },
317 "outputNode": {
318 "id": -20,
319 "bounding": [
320 640,
321 -190,
322 128,
323 68
324 ]
325 },
326 "inputs": [
327 {
328 "id": "76720c46-896e-4592-914b-f218eb50feb3",
329 "name": "images.image_1",
330 "type": "IMAGE",
331 "linkIds": [
332 26,
333 60
334 ],
335 "localized_name": "images.image_1",
336 "label": "image_1",
337 "shape": 7,
338 "pos": [
339 -2267.3671875,
340 544
341 ]
342 },
343 {
344 "id": "f96438af-739b-459f-9bfe-4667beca6d65",
345 "name": "prompt",
346 "type": "STRING",
347 "linkIds": [
348 16
349 ],
350 "pos": [
351 -2267.3671875,
352 564
353 ]
354 },
355 {
356 "id": "7a9e4c4e-6d5e-4c26-8717-de5ad1da3c9e",
357 "name": "seed",
358 "type": "INT",
359 "linkIds": [
360 19
361 ],
362 "pos": [
363 -2267.3671875,
364 584
365 ]
366 },
367 {
368 "id": "eb770531-4aa1-453c-a988-5976527e70c1",
369 "name": "switch",
370 "type": "BOOLEAN",
371 "linkIds": [
372 39
373 ],
374 "label": "resize_input_image",
375 "pos": [
376 -2267.3671875,
377 604
378 ]
379 },
380 {
381 "id": "b074698a-f08c-45df-b858-6c4aa73d44ea",
382 "name": "resize_type.megapixels",
383 "type": "FLOAT",
384 "linkIds": [
385 58
386 ],
387 "label": "target_megapixels",
388 "pos": [
389 -2267.3671875,
390 624
391 ]
392 },
393 {
394 "id": "f8e7a2a3-63d4-4fd6-8bbe-3bbc302616a6",
395 "name": "value",
396 "type": "INT",
397 "linkIds": [
398 50
399 ],
400 "label": "width",
401 "pos": [
402 -2267.3671875,
403 644
404 ]
405 },
406 {
407 "id": "dc02d218-a0ca-4032-bfbb-ec6038e9581d",
408 "name": "value_1",
409 "type": "INT",
410 "linkIds": [
411 51
412 ],
413 "label": "height",
414 "pos": [
415 -2267.3671875,
416 664
417 ]
418 },
419 {
420 "id": "76487312-8123-400f-a225-abf6caf65b57",
421 "name": "value_2",
422 "type": "BOOLEAN",
423 "linkIds": [
424 52
425 ],
426 "label": "match_input_size",
427 "pos": [
428 -2267.3671875,
429 684
430 ]
431 },
432 {
433 "id": "a50dd6d8-6e61-45bc-b804-862f00bd59d5",
434 "name": "unet_name",
435 "type": "COMBO",
436 "linkIds": [
437 53
438 ],
439 "pos": [
440 -2267.3671875,
441 704
442 ]
443 },
444 {
445 "id": "ed39ed30-448e-4cbc-8743-13c7841c9f50",
446 "name": "clip_name",
447 "type": "COMBO",
448 "linkIds": [
449 54
450 ],
451 "pos": [
452 -2267.3671875,
453 724
454 ]
455 },
456 {
457 "id": "8fb2d359-2b68-4a57-a374-be2da66b8d0e",
458 "name": "vae_name",
459 "type": "COMBO",
460 "linkIds": [
461 55
462 ],
463 "pos": [
464 -2267.3671875,
465 744
466 ]
467 },
468 {
469 "id": "b067eb4a-8cf7-455d-8667-5273b123ad9c",
470 "name": "images.image_2",
471 "type": "IMAGE",
472 "linkIds": [
473 61
474 ],
475 "label": "image_2",
476 "pos": [
477 -2267.3671875,
478 764
479 ]
480 },
481 {
482 "id": "7fd2dcd9-b904-4204-bc64-e08e511723e8",
483 "name": "images.image_3",
484 "type": "IMAGE",
485 "linkIds": [
486 62
487 ],
488 "label": "image_3",
489 "pos": [
490 -2267.3671875,
491 784
492 ]
493 }
494 ],
495 "outputs": [
496 {
497 "id": "c9854530-28d9-4d0f-9ecc-2163f2b3a640",
498 "name": "IMAGE",
499 "type": "IMAGE",
500 "linkIds": [
501 10
502 ],
503 "localized_name": "IMAGE",
504 "pos": [
505 664,
506 -166
507 ]
508 }
509 ],
510 "widgets": [],
511 "nodes": [
512 {
513 "id": 1,
514 "type": "UNETLoader",
515 "pos": [
516 -1640,
517 -160
518 ],
519 "size": [
520 450,
521 110
522 ],
523 "flags": [],
524 "order": 0,
525 "mode": 0,
526 "inputs": [
527 {
528 "localized_name": "unet_name",
529 "name": "unet_name",
530 "type": "COMBO",
531 "widget": {
532 "name": "unet_name"
533 },
534 "link": 53
535 }
536 ],
537 "outputs": [
538 {
539 "localized_name": "MODEL",
540 "name": "MODEL",
541 "type": "MODEL",
542 "links": [
543 9
544 ]
545 }
546 ],
547 "properties": {
548 "Node name for S&R": "UNETLoader",
549 "models": [
550 {
551 "name": "mage_flow_edit_turbo_int8_convrot.safetensors",
552 "url": "https://huggingface.co/Comfy-Org/Mage-Flow/resolve/main/diffusion_models/mage_flow_edit_turbo_int8_convrot.safetensors",
553 "directory": "diffusion_models"
554 }
555 ]
556 },
557 "widgets_values": [
558 "mage_flow_edit_turbo_int8_convrot.safetensors",
559 "default"
560 ]
561 },
562 {
563 "id": 3,
564 "type": "CLIPLoader",
565 "pos": [
566 -1640,
567 0
568 ],
569 "size": [
570 450,
571 140
572 ],
573 "flags": [],
574 "order": 1,
575 "mode": 0,
576 "inputs": [
577 {
578 "localized_name": "clip_name",
579 "name": "clip_name",
580 "type": "COMBO",
581 "widget": {
582 "name": "clip_name"
583 },
584 "link": 54
585 }
586 ],
587 "outputs": [
588 {
589 "localized_name": "CLIP",
590 "name": "CLIP",
591 "type": "CLIP",
592 "links": [
593 1
594 ]
595 }
596 ],
597 "properties": {
598 "Node name for S&R": "CLIPLoader",
599 "models": [
600 {
601 "name": "qwen3vl_4b_bf16.safetensors",
602 "url": "https://huggingface.co/Comfy-Org/Mage-Flow/resolve/main/text_encoders/qwen3vl_4b_bf16.safetensors",
603 "directory": "text_encoders"
604 }
605 ]
606 },
607 "widgets_values": [
608 "qwen3vl_4b_bf16.safetensors",
609 "mage",
610 "default"
611 ]
612 },
613 {
614 "id": 4,
615 "type": "VAELoader",
616 "pos": [
617 -1640,
618 180
619 ],
620 "size": [
621 450,
622 110
623 ],
624 "flags": [],
625 "order": 2,
626 "mode": 0,
627 "inputs": [
628 {
629 "localized_name": "vae_name",
630 "name": "vae_name",
631 "type": "COMBO",
632 "widget": {
633 "name": "vae_name"
634 },
635 "link": 55
636 }
637 ],
638 "outputs": [
639 {
640 "localized_name": "VAE",
641 "name": "VAE",
642 "type": "VAE",
643 "links": [
644 5,
645 8
646 ]
647 }
648 ],
649 "properties": {
650 "Node name for S&R": "VAELoader",
651 "models": [
652 {
653 "name": "mage_flow_vae_bf16.safetensors",
654 "url": "https://huggingface.co/Comfy-Org/Mage-Flow/resolve/main/vae/mage_flow_vae_bf16.safetensors",
655 "directory": "vae"
656 }
657 ]
658 },
659 "widgets_values": [
660 "mage_flow_vae_bf16.safetensors"
661 ]
662 },
663 {
664 "id": 5,
665 "type": "TextEncodeMageFlowEdit",
666 "pos": [
667 -1030,
668 -100
669 ],
670 "size": [
671 400,
672 360
673 ],
674 "flags": [],
675 "order": 3,
676 "mode": 0,
677 "inputs": [
678 {
679 "localized_name": "clip",
680 "name": "clip",
681 "type": "CLIP",
682 "link": 1
683 },
684 {
685 "label": "image_1",
686 "localized_name": "images.image_1",
687 "name": "images.image_1",
688 "shape": 7,
689 "type": "IMAGE",
690 "link": 27
691 },
692 {
693 "label": "image_2",
694 "localized_name": "images.image_2",
695 "name": "images.image_2",
696 "shape": 7,
697 "type": "IMAGE",
698 "link": 61
699 },
700 {
701 "label": "image_3",
702 "localized_name": "images.image_3",
703 "name": "images.image_3",
704 "shape": 7,
705 "type": "IMAGE",
706 "link": 62
707 },
708 {
709 "label": "image_4",
710 "localized_name": "images.image_4",
711 "name": "images.image_4",
712 "shape": 7,
713 "type": "IMAGE",
714 "link": null
715 },
716 {
717 "localized_name": "vae",
718 "name": "vae",
719 "shape": 7,
720 "type": "VAE",
721 "link": 5
722 },
723 {
724 "localized_name": "prompt",
725 "name": "prompt",
726 "type": "STRING",
727 "widget": {
728 "name": "prompt"
729 },
730 "link": 16
731 },
732 {
733 "localized_name": "width",
734 "name": "width",
735 "type": "INT",
736 "widget": {
737 "name": "width"
738 },
739 "link": 30
740 },
741 {
742 "localized_name": "height",
743 "name": "height",
744 "type": "INT",
745 "widget": {
746 "name": "height"
747 },
748 "link": 37
749 }
750 ],
751 "outputs": [
752 {
753 "localized_name": "positive",
754 "name": "positive",
755 "type": "CONDITIONING",
756 "links": [
757 3
758 ]
759 },
760 {
761 "localized_name": "negative",
762 "name": "negative",
763 "type": "CONDITIONING",
764 "links": [
765 4
766 ]
767 },
768 {
769 "localized_name": "latent",
770 "name": "latent",
771 "type": "LATENT",
772 "links": [
773 2
774 ]
775 }
776 ],
777 "properties": {
778 "Node name for S&R": "TextEncodeMageFlowEdit"
779 },
780 "widgets_values": [
781 "Remove all hot air balloons",
782 "",
783 0,
784 0,
785 1
786 ]
787 },
788 {
789 "id": 6,
790 "type": "KSampler",
791 "pos": [
792 -470,
793 -220
794 ],
795 "size": [
796 370,
797 610
798 ],
799 "flags": [],
800 "order": 4,
801 "mode": 0,
802 "inputs": [
803 {
804 "localized_name": "model",
805 "name": "model",
806 "type": "MODEL",
807 "link": 9
808 },
809 {
810 "localized_name": "positive",
811 "name": "positive",
812 "type": "CONDITIONING",
813 "link": 3
814 },
815 {
816 "localized_name": "negative",
817 "name": "negative",
818 "type": "CONDITIONING",
819 "link": 4
820 },
821 {
822 "localized_name": "latent_image",
823 "name": "latent_image",
824 "type": "LATENT",
825 "link": 2
826 },
827 {
828 "localized_name": "seed",
829 "name": "seed",
830 "type": "INT",
831 "widget": {
832 "name": "seed"
833 },
834 "link": 19
835 }
836 ],
837 "outputs": [
838 {
839 "localized_name": "LATENT",
840 "name": "LATENT",
841 "type": "LATENT",
842 "links": [
843 7
844 ]
845 }
846 ],
847 "properties": {
848 "Node name for S&R": "KSampler"
849 },
850 "widgets_values": [
851 478849483548042,
852 "randomize",
853 4,
854 1,
855 "euler",
856 "simple",
857 1
858 ]
859 },
860 {
861 "id": 8,
862 "type": "VAEDecode",
863 "pos": [
864 -40,
865 -220
866 ],
867 "size": [
868 230,
869 80
870 ],
871 "flags": [],
872 "order": 5,
873 "mode": 0,
874 "inputs": [
875 {
876 "localized_name": "samples",
877 "name": "samples",
878 "type": "LATENT",
879 "link": 7
880 },
881 {
882 "localized_name": "vae",
883 "name": "vae",
884 "type": "VAE",
885 "link": 8
886 }
887 ],
888 "outputs": [
889 {
890 "localized_name": "IMAGE",
891 "name": "IMAGE",
892 "type": "IMAGE",
893 "links": [
894 10
895 ]
896 }
897 ],
898 "properties": {
899 "Node name for S&R": "VAEDecode"
900 },
901 "widgets_values": []
902 },
903 {
904 "id": 14,
905 "type": "ComfySwitchNode",
906 "pos": [
907 -1630,
908 910
909 ],
910 "size": [
911 270,
912 130
913 ],
914 "flags": [],
915 "order": 6,
916 "mode": 0,
917 "inputs": [
918 {
919 "localized_name": "on_false",
920 "name": "on_false",
921 "type": "IMAGE",
922 "link": 26
923 },
924 {
925 "localized_name": "on_true",
926 "name": "on_true",
927 "type": "IMAGE",
928 "link": 59
929 },
930 {
931 "localized_name": "switch",
932 "name": "switch",
933 "type": "BOOLEAN",
934 "widget": {
935 "name": "switch"
936 },
937 "link": 38
938 }
939 ],
940 "outputs": [
941 {
942 "localized_name": "output",
943 "name": "output",
944 "type": "IMAGE",
945 "links": [
946 27,
947 29
948 ]
949 }
950 ],
951 "title": "Switch (Input Source)",
952 "properties": {
953 "Node name for S&R": "ComfySwitchNode"
954 },
955 "widgets_values": [
956 false
957 ]
958 },
959 {
960 "id": 15,
961 "type": "GetImageSize",
962 "pos": [
963 -1230,
964 850
965 ],
966 "size": [
967 230,
968 100
969 ],
970 "flags": [],
971 "order": 7,
972 "mode": 0,
973 "inputs": [
974 {
975 "localized_name": "image",
976 "name": "image",
977 "type": "IMAGE",
978 "link": 29
979 }
980 ],
981 "outputs": [
982 {
983 "localized_name": "width",
984 "name": "width",
985 "type": "INT",
986 "links": [
987 32
988 ]
989 },
990 {
991 "localized_name": "height",
992 "name": "height",
993 "type": "INT",
994 "links": [
995 33
996 ]
997 },
998 {
999 "localized_name": "batch_size",
1000 "name": "batch_size",
1001 "type": "INT",
1002 "links": null
1003 }
1004 ],
1005 "properties": {
1006 "Node name for S&R": "GetImageSize"
1007 },
1008 "widgets_values": []
1009 },
1010 {
1011 "id": 16,
1012 "type": "ComfySwitchNode",
1013 "pos": [
1014 -870,
1015 550
1016 ],
1017 "size": [
1018 270,
1019 130
1020 ],
1021 "flags": [],
1022 "order": 8,
1023 "mode": 0,
1024 "inputs": [
1025 {
1026 "localized_name": "on_false",
1027 "name": "on_false",
1028 "type": "INT",
1029 "link": 40
1030 },
1031 {
1032 "localized_name": "on_true",
1033 "name": "on_true",
1034 "type": "INT",
1035 "link": 32
1036 },
1037 {
1038 "localized_name": "switch",
1039 "name": "switch",
1040 "type": "BOOLEAN",
1041 "widget": {
1042 "name": "switch"
1043 },
1044 "link": 35
1045 }
1046 ],
1047 "outputs": [
1048 {
1049 "localized_name": "output",
1050 "name": "output",
1051 "type": "INT",
1052 "links": [
1053 30
1054 ]
1055 }
1056 ],
1057 "title": "Switch (Width)",
1058 "properties": {
1059 "Node name for S&R": "ComfySwitchNode"
1060 },
1061 "widgets_values": [
1062 false
1063 ]
1064 },
1065 {
1066 "id": 17,
1067 "type": "ComfySwitchNode",
1068 "pos": [
1069 -870,
1070 740
1071 ],
1072 "size": [
1073 270,
1074 130
1075 ],
1076 "flags": [],
1077 "order": 9,
1078 "mode": 0,
1079 "inputs": [
1080 {
1081 "localized_name": "on_false",
1082 "name": "on_false",
1083 "type": "INT",
1084 "link": 41
1085 },
1086 {
1087 "localized_name": "on_true",
1088 "name": "on_true",
1089 "type": "INT",
1090 "link": 33
1091 },
1092 {
1093 "localized_name": "switch",
1094 "name": "switch",
1095 "type": "BOOLEAN",
1096 "widget": {
1097 "name": "switch"
1098 },
1099 "link": 36
1100 }
1101 ],
1102 "outputs": [
1103 {
1104 "localized_name": "output",
1105 "name": "output",
1106 "type": "INT",
1107 "links": [
1108 37
1109 ]
1110 }
1111 ],
1112 "title": "Switch (Height)",
1113 "properties": {
1114 "Node name for S&R": "ComfySwitchNode"
1115 },
1116 "widgets_values": [
1117 false
1118 ]
1119 },
1120 {
1121 "id": 18,
1122 "type": "PrimitiveBoolean",
1123 "pos": [
1124 -1220,
1125 1000
1126 ],
1127 "size": [
1128 250,
1129 90
1130 ],
1131 "flags": [],
1132 "order": 10,
1133 "mode": 0,
1134 "inputs": [
1135 {
1136 "localized_name": "value",
1137 "name": "value",
1138 "type": "BOOLEAN",
1139 "widget": {
1140 "name": "value"
1141 },
1142 "link": 52
1143 }
1144 ],
1145 "outputs": [
1146 {
1147 "localized_name": "BOOLEAN",
1148 "name": "BOOLEAN",
1149 "type": "BOOLEAN",
1150 "links": [
1151 35,
1152 36
1153 ]
1154 }
1155 ],
1156 "title": "Boolean (Match Input Size)",
1157 "properties": {
1158 "Node name for S&R": "PrimitiveBoolean"
1159 },
1160 "widgets_values": [
1161 true
1162 ],
1163 "color": "#322",
1164 "bgcolor": "#533"
1165 },
1166 {
1167 "id": 19,
1168 "type": "PrimitiveBoolean",
1169 "pos": [
1170 -1630,
1171 770
1172 ],
1173 "size": [
1174 270,
1175 80
1176 ],
1177 "flags": [],
1178 "order": 11,
1179 "mode": 0,
1180 "inputs": [
1181 {
1182 "localized_name": "value",
1183 "name": "value",
1184 "type": "BOOLEAN",
1185 "widget": {
1186 "name": "value"
1187 },
1188 "link": 39
1189 }
1190 ],
1191 "outputs": [
1192 {
1193 "localized_name": "BOOLEAN",
1194 "name": "BOOLEAN",
1195 "type": "BOOLEAN",
1196 "links": [
1197 38
1198 ]
1199 }
1200 ],
1201 "title": "Boolean (Resize Input Image)",
1202 "properties": {
1203 "Node name for S&R": "PrimitiveBoolean"
1204 },
1205 "widgets_values": [
1206 true
1207 ],
1208 "color": "#322",
1209 "bgcolor": "#533"
1210 },
1211 {
1212 "id": 20,
1213 "type": "PrimitiveInt",
1214 "pos": [
1215 -1250,
1216 570
1217 ],
1218 "size": [
1219 270,
1220 90
1221 ],
1222 "flags": [],
1223 "order": 12,
1224 "mode": 0,
1225 "inputs": [
1226 {
1227 "localized_name": "value",
1228 "name": "value",
1229 "type": "INT",
1230 "widget": {
1231 "name": "value"
1232 },
1233 "link": 50
1234 }
1235 ],
1236 "outputs": [
1237 {
1238 "localized_name": "INT",
1239 "name": "INT",
1240 "type": "INT",
1241 "links": [
1242 40
1243 ]
1244 }
1245 ],
1246 "title": "Int (Width)",
1247 "properties": {
1248 "Node name for S&R": "PrimitiveInt"
1249 },
1250 "widgets_values": [
1251 1024,
1252 "fixed"
1253 ]
1254 },
1255 {
1256 "id": 21,
1257 "type": "PrimitiveInt",
1258 "pos": [
1259 -1250,
1260 710
1261 ],
1262 "size": [
1263 270,
1264 90
1265 ],
1266 "flags": [],
1267 "order": 13,
1268 "mode": 0,
1269 "inputs": [
1270 {
1271 "localized_name": "value",
1272 "name": "value",
1273 "type": "INT",
1274 "widget": {
1275 "name": "value"
1276 },
1277 "link": 51
1278 }
1279 ],
1280 "outputs": [
1281 {
1282 "localized_name": "INT",
1283 "name": "INT",
1284 "type": "INT",
1285 "links": [
1286 41
1287 ]
1288 }
1289 ],
1290 "title": "Int (Height)",
1291 "properties": {
1292 "Node name for S&R": "PrimitiveInt"
1293 },
1294 "widgets_values": [
1295 1024,
1296 "fixed"
1297 ]
1298 },
1299 {
1300 "id": 31,
1301 "type": "ImageScaleToTotalPixels",
1302 "pos": [
1303 -1630,
1304 540
1305 ],
1306 "size": [
1307 280,
1308 180
1309 ],
1310 "flags": [],
1311 "order": 14,
1312 "mode": 0,
1313 "showAdvanced": true,
1314 "inputs": [
1315 {
1316 "localized_name": "image",
1317 "name": "image",
1318 "type": "IMAGE",
1319 "link": 60
1320 },
1321 {
1322 "localized_name": "megapixels",
1323 "name": "megapixels",
1324 "type": "FLOAT",
1325 "widget": {
1326 "name": "megapixels"
1327 },
1328 "link": 58
1329 }
1330 ],
1331 "outputs": [
1332 {
1333 "localized_name": "IMAGE",
1334 "name": "IMAGE",
1335 "type": "IMAGE",
1336 "links": [
1337 59
1338 ]
1339 }
1340 ],
1341 "properties": {
1342 "Node name for S&R": "ImageScaleToTotalPixels"
1343 },
1344 "widgets_values": [
1345 "nearest-exact",
1346 1,
1347 16
1348 ]
1349 }
1350 ],
1351 "groups": [
1352 {
1353 "id": 1,
1354 "title": "Models",
1355 "bounding": [
1356 -1670,
1357 -260,
1358 510,
1359 570
1360 ],
1361 "color": "#3f789e",
1362 "flags": []
1363 },
1364 {
1365 "id": 2,
1366 "title": "Resize Input Image",
1367 "bounding": [
1368 -1670,
1369 460,
1370 360,
1371 640
1372 ],
1373 "color": "#3f789e",
1374 "flags": []
1375 },
1376 {
1377 "id": 3,
1378 "title": "Get Image Size",
1379 "bounding": [
1380 -1280,
1381 460,
1382 750,
1383 640
1384 ],
1385 "color": "#3f789e",
1386 "flags": []
1387 },
1388 {
1389 "id": 4,
1390 "title": "Conditioning",
1391 "bounding": [
1392 -1130,
1393 -260,
1394 600,
1395 570
1396 ],
1397 "color": "#3f789e",
1398 "flags": []
1399 },
1400 {
1401 "id": 5,
1402 "title": "Manual Image Size",
1403 "bounding": [
1404 -1260,
1405 500,
1406 290,
1407 302
1408 ],
1409 "color": "#3f789e",
1410 "flags": []
1411 },
1412 {
1413 "id": 6,
1414 "title": "Core Pipeline",
1415 "bounding": [
1416 -1680,
1417 -300,
1418 2040,
1419 700
1420 ],
1421 "color": "#3f789e",
1422 "flags": []
1423 }
1424 ],
1425 "links": [
1426 {
1427 "id": 1,
1428 "origin_id": 3,
1429 "origin_slot": 0,
1430 "target_id": 5,
1431 "target_slot": 0,
1432 "type": "CLIP"
1433 },
1434 {
1435 "id": 5,
1436 "origin_id": 4,
1437 "origin_slot": 0,
1438 "target_id": 5,
1439 "target_slot": 5,
1440 "type": "VAE"
1441 },
1442 {
1443 "id": 9,
1444 "origin_id": 1,
1445 "origin_slot": 0,
1446 "target_id": 6,
1447 "target_slot": 0,
1448 "type": "MODEL"
1449 },
1450 {
1451 "id": 3,
1452 "origin_id": 5,
1453 "origin_slot": 0,
1454 "target_id": 6,
1455 "target_slot": 1,
1456 "type": "CONDITIONING"
1457 },
1458 {
1459 "id": 4,
1460 "origin_id": 5,
1461 "origin_slot": 1,
1462 "target_id": 6,
1463 "target_slot": 2,
1464 "type": "CONDITIONING"
1465 },
1466 {
1467 "id": 2,
1468 "origin_id": 5,
1469 "origin_slot": 2,
1470 "target_id": 6,
1471 "target_slot": 3,
1472 "type": "LATENT"
1473 },
1474 {
1475 "id": 7,
1476 "origin_id": 6,
1477 "origin_slot": 0,
1478 "target_id": 8,
1479 "target_slot": 0,
1480 "type": "LATENT"
1481 },
1482 {
1483 "id": 8,
1484 "origin_id": 4,
1485 "origin_slot": 0,
1486 "target_id": 8,
1487 "target_slot": 1,
1488 "type": "VAE"
1489 },
1490 {
1491 "id": 10,
1492 "origin_id": 8,
1493 "origin_slot": 0,
1494 "target_id": -20,
1495 "target_slot": 0,
1496 "type": "IMAGE"
1497 },
1498 {
1499 "id": 16,
1500 "origin_id": -10,
1501 "origin_slot": 1,
1502 "target_id": 5,
1503 "target_slot": 6,
1504 "type": "STRING"
1505 },
1506 {
1507 "id": 19,
1508 "origin_id": -10,
1509 "origin_slot": 2,
1510 "target_id": 6,
1511 "target_slot": 4,
1512 "type": "INT"
1513 },
1514 {
1515 "id": 26,
1516 "origin_id": -10,
1517 "origin_slot": 0,
1518 "target_id": 14,
1519 "target_slot": 0,
1520 "type": "IMAGE"
1521 },
1522 {
1523 "id": 27,
1524 "origin_id": 14,
1525 "origin_slot": 0,
1526 "target_id": 5,
1527 "target_slot": 1,
1528 "type": "IMAGE"
1529 },
1530 {
1531 "id": 29,
1532 "origin_id": 14,
1533 "origin_slot": 0,
1534 "target_id": 15,
1535 "target_slot": 0,
1536 "type": "IMAGE"
1537 },
1538 {
1539 "id": 30,
1540 "origin_id": 16,
1541 "origin_slot": 0,
1542 "target_id": 5,
1543 "target_slot": 7,
1544 "type": "INT"
1545 },
1546 {
1547 "id": 32,
1548 "origin_id": 15,
1549 "origin_slot": 0,
1550 "target_id": 16,
1551 "target_slot": 1,
1552 "type": "INT"
1553 },
1554 {
1555 "id": 33,
1556 "origin_id": 15,
1557 "origin_slot": 1,
1558 "target_id": 17,
1559 "target_slot": 1,
1560 "type": "INT"
1561 },
1562 {
1563 "id": 35,
1564 "origin_id": 18,
1565 "origin_slot": 0,
1566 "target_id": 16,
1567 "target_slot": 2,
1568 "type": "BOOLEAN"
1569 },
1570 {
1571 "id": 36,
1572 "origin_id": 18,
1573 "origin_slot": 0,
1574 "target_id": 17,
1575 "target_slot": 2,
1576 "type": "BOOLEAN"
1577 },
1578 {
1579 "id": 37,
1580 "origin_id": 17,
1581 "origin_slot": 0,
1582 "target_id": 5,
1583 "target_slot": 8,
1584 "type": "INT"
1585 },
1586 {
1587 "id": 38,
1588 "origin_id": 19,
1589 "origin_slot": 0,
1590 "target_id": 14,
1591 "target_slot": 2,
1592 "type": "BOOLEAN"
1593 },
1594 {
1595 "id": 39,
1596 "origin_id": -10,
1597 "origin_slot": 3,
1598 "target_id": 19,
1599 "target_slot": 0,
1600 "type": "BOOLEAN"
1601 },
1602 {
1603 "id": 40,
1604 "origin_id": 20,
1605 "origin_slot": 0,
1606 "target_id": 16,
1607 "target_slot": 0,
1608 "type": "INT"
1609 },
1610 {
1611 "id": 41,
1612 "origin_id": 21,
1613 "origin_slot": 0,
1614 "target_id": 17,
1615 "target_slot": 0,
1616 "type": "INT"
1617 },
1618 {
1619 "id": 50,
1620 "origin_id": -10,
1621 "origin_slot": 5,
1622 "target_id": 20,
1623 "target_slot": 0,
1624 "type": "INT"
1625 },
1626 {
1627 "id": 51,
1628 "origin_id": -10,
1629 "origin_slot": 6,
1630 "target_id": 21,
1631 "target_slot": 0,
1632 "type": "INT"
1633 },
1634 {
1635 "id": 52,
1636 "origin_id": -10,
1637 "origin_slot": 7,
1638 "target_id": 18,
1639 "target_slot": 0,
1640 "type": "BOOLEAN"
1641 },
1642 {
1643 "id": 53,
1644 "origin_id": -10,
1645 "origin_slot": 8,
1646 "target_id": 1,
1647 "target_slot": 0,
1648 "type": "COMBO"
1649 },
1650 {
1651 "id": 54,
1652 "origin_id": -10,
1653 "origin_slot": 9,
1654 "target_id": 3,
1655 "target_slot": 0,
1656 "type": "COMBO"
1657 },
1658 {
1659 "id": 55,
1660 "origin_id": -10,
1661 "origin_slot": 10,
1662 "target_id": 4,
1663 "target_slot": 0,
1664 "type": "COMBO"
1665 },
1666 {
1667 "id": 58,
1668 "origin_id": -10,
1669 "origin_slot": 4,
1670 "target_id": 31,
1671 "target_slot": 1,
1672 "type": "FLOAT"
1673 },
1674 {
1675 "id": 59,
1676 "origin_id": 31,
1677 "origin_slot": 0,
1678 "target_id": 14,
1679 "target_slot": 1,
1680 "type": "IMAGE"
1681 },
1682 {
1683 "id": 60,
1684 "origin_id": -10,
1685 "origin_slot": 0,
1686 "target_id": 31,
1687 "target_slot": 0,
1688 "type": "IMAGE"
1689 },
1690 {
1691 "id": 61,
1692 "origin_id": -10,
1693 "origin_slot": 11,
1694 "target_id": 5,
1695 "target_slot": 2,
1696 "type": "IMAGE"
1697 },
1698 {
1699 "id": 62,
1700 "origin_id": -10,
1701 "origin_slot": 12,
1702 "target_id": 5,
1703 "target_slot": 3,
1704 "type": "IMAGE"
1705 }
1706 ],
1707 "extra": []
1708 }
1709 ]
1710 },
1711 "config": [],
1712 "extra": {
1713 "frontendVersion": "1.45.21",
1714 "ds": {
1715 "scale": 1.0159962255569799,
1716 "offset": [
1717 1967.984758484749,
1718 100.89218418955282
1719 ]
1720 }
1721 },
1722 "version": 0.4
1723}