aleph65 commited on
Commit
12ad3d1
·
verified ·
1 Parent(s): cd715bd

qwen-edit-turbo-v3 rev2: upscale/downscale_input_to_max_size + upscale_output_to_selected_size toggles on both image chains (tested)

Browse files
workflows/api/qwen-edit-turbo-v3.json CHANGED
@@ -54,6 +54,24 @@
54
  "strength": 1
55
  }
56
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  "2": {
58
  "_meta": {
59
  "title": "LoRA: Lightning 4 steps"
@@ -79,38 +97,46 @@
79
  },
80
  "21": {
81
  "_meta": {
82
- "title": "Adaptive size (max 2048)"
83
  },
84
- "class_type": "QwenEditAdaptiveLongestEdge",
85
  "inputs": {
86
- "image": [
87
- "20",
88
- 0
89
- ],
90
- "max_size": 2048
91
  }
92
  },
93
  "22": {
94
  "_meta": {
95
- "title": "Output longest edge (manual)"
96
  },
97
- "class_type": "PrimitiveInt",
98
  "inputs": {
99
- "value": 1536
 
 
 
 
100
  }
101
  },
102
  "23": {
103
  "_meta": {
104
- "title": "Adaptive output size (match input)"
105
  },
106
- "class_type": "PrimitiveBoolean",
107
  "inputs": {
108
- "value": true
 
 
 
 
 
 
 
 
109
  }
110
  },
111
  "24": {
112
  "_meta": {
113
- "title": "Output size switch"
114
  },
115
  "class_type": "ComfySwitchNode",
116
  "inputs": {
@@ -119,16 +145,53 @@
119
  0
120
  ],
121
  "on_true": [
122
- "21",
123
  0
124
  ],
125
  "switch": [
126
- "23",
127
  0
128
  ]
129
  }
130
  },
131
  "25": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  "_meta": {
133
  "title": "Main image config"
134
  },
@@ -140,7 +203,7 @@
140
  ],
141
  "ref_crop": "pad",
142
  "ref_longest_edge": [
143
- "24",
144
  0
145
  ],
146
  "ref_main_image": true,
@@ -161,7 +224,22 @@
161
  "type": "qwen_image"
162
  }
163
  },
164
- "30": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
165
  "_meta": {
166
  "title": "Qwen Edit Encode (prompt here)"
167
  },
@@ -172,7 +250,7 @@
172
  0
173
  ],
174
  "configs": [
175
- "25",
176
  0
177
  ],
178
  "instruction": "Describe the key features of the input image (color, shape, size, texture, objects, background), then explain how the user's text instruction should alter or modify the image. Generate a new image that meets the user's requirements while maintaining consistency with the original input where appropriate.",
@@ -184,28 +262,28 @@
184
  ]
185
  }
186
  },
187
- "31": {
188
  "class_type": "QwenEditOutputExtractor",
189
  "inputs": {
190
  "custom_output": [
191
- "30",
192
  2
193
  ]
194
  }
195
  },
196
- "32": {
197
  "_meta": {
198
  "title": "Negative (zeroed)"
199
  },
200
  "class_type": "ConditioningZeroOut",
201
  "inputs": {
202
  "conditioning": [
203
- "30",
204
  0
205
  ]
206
  }
207
  },
208
- "33": {
209
  "class_type": "KSampler",
210
  "inputs": {
211
  "cfg": [
@@ -214,7 +292,7 @@
214
  ],
215
  "denoise": 1,
216
  "latent_image": [
217
- "30",
218
  1
219
  ],
220
  "model": [
@@ -222,11 +300,11 @@
222
  0
223
  ],
224
  "negative": [
225
- "32",
226
  0
227
  ],
228
  "positive": [
229
- "30",
230
  0
231
  ],
232
  "sampler_name": "euler",
@@ -238,17 +316,11 @@
238
  ]
239
  }
240
  },
241
- "4": {
242
- "class_type": "VAELoader",
243
- "inputs": {
244
- "vae_name": "qwen_image_vae.safetensors"
245
- }
246
- },
247
- "40": {
248
  "class_type": "VAEDecode",
249
  "inputs": {
250
  "samples": [
251
- "33",
252
  0
253
  ],
254
  "vae": [
@@ -257,42 +329,73 @@
257
  ]
258
  }
259
  },
260
- "41": {
261
  "_meta": {
262
  "title": "Remove padding"
263
  },
264
  "class_type": "CropWithPadInfo",
265
  "inputs": {
266
  "image": [
267
- "40",
268
  0
269
  ],
270
  "pad_info": [
271
- "31",
272
  0
273
  ]
274
  }
275
  },
276
- "42": {
 
 
 
 
 
 
 
 
 
277
  "_meta": {
278
- "title": "Output Scale"
279
  },
280
- "class_type": "ImageScaleBy",
 
 
 
 
 
 
 
 
 
281
  "inputs": {
282
  "image": [
283
- "41",
 
 
 
 
284
  0
285
  ],
286
- "scale_by": 1.0,
287
  "upscale_method": "lanczos"
288
  }
289
  },
290
- "43": {
291
- "class_type": "SaveImage",
 
 
 
292
  "inputs": {
293
- "filename_prefix": "qwen-edit-turbo-v3",
294
- "images": [
295
- "42",
 
 
 
 
 
 
 
296
  0
297
  ]
298
  }
@@ -306,6 +409,16 @@
306
  "value": true
307
  }
308
  },
 
 
 
 
 
 
 
 
 
 
309
  "6": {
310
  "_meta": {
311
  "title": "Model switch"
 
54
  "strength": 1
55
  }
56
  },
57
+ "15": {
58
+ "_meta": {
59
+ "title": "upscale_input_to_max_size"
60
+ },
61
+ "class_type": "PrimitiveBoolean",
62
+ "inputs": {
63
+ "value": true
64
+ }
65
+ },
66
+ "16": {
67
+ "_meta": {
68
+ "title": "downscale_input_to_max_size"
69
+ },
70
+ "class_type": "PrimitiveBoolean",
71
+ "inputs": {
72
+ "value": true
73
+ }
74
+ },
75
  "2": {
76
  "_meta": {
77
  "title": "LoRA: Lightning 4 steps"
 
97
  },
98
  "21": {
99
  "_meta": {
100
+ "title": "Input max size (main)"
101
  },
102
+ "class_type": "PrimitiveInt",
103
  "inputs": {
104
+ "value": 1536
 
 
 
 
105
  }
106
  },
107
  "22": {
108
  "_meta": {
109
+ "title": "native edge (main)"
110
  },
111
+ "class_type": "MathExpression|pysssss",
112
  "inputs": {
113
+ "a": [
114
+ "20",
115
+ 0
116
+ ],
117
+ "expression": "max(a.width, a.height)"
118
  }
119
  },
120
  "23": {
121
  "_meta": {
122
+ "title": "upscaled edge (main)"
123
  },
124
+ "class_type": "MathExpression|pysssss",
125
  "inputs": {
126
+ "a": [
127
+ "20",
128
+ 0
129
+ ],
130
+ "c": [
131
+ "21",
132
+ 0
133
+ ],
134
+ "expression": "max(a.width, a.height, c)"
135
  }
136
  },
137
  "24": {
138
  "_meta": {
139
+ "title": "apply upscale (main)"
140
  },
141
  "class_type": "ComfySwitchNode",
142
  "inputs": {
 
145
  0
146
  ],
147
  "on_true": [
148
+ "23",
149
  0
150
  ],
151
  "switch": [
152
+ "15",
153
  0
154
  ]
155
  }
156
  },
157
  "25": {
158
+ "_meta": {
159
+ "title": "downscaled edge (main)"
160
+ },
161
+ "class_type": "MathExpression|pysssss",
162
+ "inputs": {
163
+ "a": [
164
+ "24",
165
+ 0
166
+ ],
167
+ "c": [
168
+ "21",
169
+ 0
170
+ ],
171
+ "expression": "min(a, c)"
172
+ }
173
+ },
174
+ "26": {
175
+ "_meta": {
176
+ "title": "apply downscale (main)"
177
+ },
178
+ "class_type": "ComfySwitchNode",
179
+ "inputs": {
180
+ "on_false": [
181
+ "24",
182
+ 0
183
+ ],
184
+ "on_true": [
185
+ "25",
186
+ 0
187
+ ],
188
+ "switch": [
189
+ "16",
190
+ 0
191
+ ]
192
+ }
193
+ },
194
+ "27": {
195
  "_meta": {
196
  "title": "Main image config"
197
  },
 
203
  ],
204
  "ref_crop": "pad",
205
  "ref_longest_edge": [
206
+ "26",
207
  0
208
  ],
209
  "ref_main_image": true,
 
224
  "type": "qwen_image"
225
  }
226
  },
227
+ "31": {
228
+ "_meta": {
229
+ "title": "Input max size (ref 2)"
230
+ },
231
+ "class_type": "PrimitiveInt",
232
+ "inputs": {
233
+ "value": 1024
234
+ }
235
+ },
236
+ "4": {
237
+ "class_type": "VAELoader",
238
+ "inputs": {
239
+ "vae_name": "qwen_image_vae.safetensors"
240
+ }
241
+ },
242
+ "40": {
243
  "_meta": {
244
  "title": "Qwen Edit Encode (prompt here)"
245
  },
 
250
  0
251
  ],
252
  "configs": [
253
+ "27",
254
  0
255
  ],
256
  "instruction": "Describe the key features of the input image (color, shape, size, texture, objects, background), then explain how the user's text instruction should alter or modify the image. Generate a new image that meets the user's requirements while maintaining consistency with the original input where appropriate.",
 
262
  ]
263
  }
264
  },
265
+ "41": {
266
  "class_type": "QwenEditOutputExtractor",
267
  "inputs": {
268
  "custom_output": [
269
+ "40",
270
  2
271
  ]
272
  }
273
  },
274
+ "42": {
275
  "_meta": {
276
  "title": "Negative (zeroed)"
277
  },
278
  "class_type": "ConditioningZeroOut",
279
  "inputs": {
280
  "conditioning": [
281
+ "40",
282
  0
283
  ]
284
  }
285
  },
286
+ "43": {
287
  "class_type": "KSampler",
288
  "inputs": {
289
  "cfg": [
 
292
  ],
293
  "denoise": 1,
294
  "latent_image": [
295
+ "40",
296
  1
297
  ],
298
  "model": [
 
300
  0
301
  ],
302
  "negative": [
303
+ "42",
304
  0
305
  ],
306
  "positive": [
307
+ "40",
308
  0
309
  ],
310
  "sampler_name": "euler",
 
316
  ]
317
  }
318
  },
319
+ "44": {
 
 
 
 
 
 
320
  "class_type": "VAEDecode",
321
  "inputs": {
322
  "samples": [
323
+ "43",
324
  0
325
  ],
326
  "vae": [
 
329
  ]
330
  }
331
  },
332
+ "45": {
333
  "_meta": {
334
  "title": "Remove padding"
335
  },
336
  "class_type": "CropWithPadInfo",
337
  "inputs": {
338
  "image": [
339
+ "44",
340
  0
341
  ],
342
  "pad_info": [
343
+ "41",
344
  0
345
  ]
346
  }
347
  },
348
+ "46": {
349
+ "_meta": {
350
+ "title": "upscale_output_to_selected_size"
351
+ },
352
+ "class_type": "PrimitiveBoolean",
353
+ "inputs": {
354
+ "value": false
355
+ }
356
+ },
357
+ "47": {
358
  "_meta": {
359
+ "title": "Selected output size"
360
  },
361
+ "class_type": "PrimitiveInt",
362
+ "inputs": {
363
+ "value": 2048
364
+ }
365
+ },
366
+ "48": {
367
+ "_meta": {
368
+ "title": "Scale output"
369
+ },
370
+ "class_type": "ImageScaleToMaxDimension",
371
  "inputs": {
372
  "image": [
373
+ "45",
374
+ 0
375
+ ],
376
+ "largest_size": [
377
+ "47",
378
  0
379
  ],
 
380
  "upscale_method": "lanczos"
381
  }
382
  },
383
+ "49": {
384
+ "_meta": {
385
+ "title": "Output size switch"
386
+ },
387
+ "class_type": "ComfySwitchNode",
388
  "inputs": {
389
+ "on_false": [
390
+ "45",
391
+ 0
392
+ ],
393
+ "on_true": [
394
+ "48",
395
+ 0
396
+ ],
397
+ "switch": [
398
+ "46",
399
  0
400
  ]
401
  }
 
409
  "value": true
410
  }
411
  },
412
+ "50": {
413
+ "class_type": "SaveImage",
414
+ "inputs": {
415
+ "filename_prefix": "qwen-edit-turbo-v3",
416
+ "images": [
417
+ "49",
418
+ 0
419
+ ]
420
+ }
421
+ },
422
  "6": {
423
  "_meta": {
424
  "title": "Model switch"
workflows/qwen-edit-turbo-v3.json CHANGED
@@ -1,15 +1,15 @@
1
  {
2
  "id": "c7d4e8f1-2a6b-4c3d-9e0f-5b8a1d4c7e2f",
3
- "revision": 0,
4
- "last_node_id": 44,
5
- "last_link_id": 39,
6
  "nodes": [
7
  {
8
  "id": 1,
9
  "type": "UNETLoader",
10
  "pos": [
11
  -40,
12
- -560
13
  ],
14
  "size": [
15
  340,
@@ -45,14 +45,14 @@
45
  "type": "LoraLoaderModelOnly",
46
  "pos": [
47
  -40,
48
- -430
49
  ],
50
  "size": [
51
  340,
52
  82
53
  ],
54
  "flags": {},
55
- "order": 6,
56
  "mode": 0,
57
  "inputs": [
58
  {
@@ -87,14 +87,14 @@
87
  "type": "CLIPLoader",
88
  "pos": [
89
  -40,
90
- -300
91
  ],
92
  "size": [
93
  340,
94
  110
95
  ],
96
  "flags": {},
97
- "order": 1,
98
  "mode": 0,
99
  "inputs": [],
100
  "outputs": [
@@ -123,14 +123,14 @@
123
  "type": "VAELoader",
124
  "pos": [
125
  -40,
126
- -140
127
  ],
128
  "size": [
129
  340,
130
  60
131
  ],
132
  "flags": {},
133
- "order": 2,
134
  "mode": 0,
135
  "inputs": [],
136
  "outputs": [
@@ -158,14 +158,14 @@
158
  "type": "PrimitiveBoolean",
159
  "pos": [
160
  360,
161
- -560
162
  ],
163
  "size": [
164
  280,
165
  60
166
  ],
167
  "flags": {},
168
- "order": 3,
169
  "mode": 0,
170
  "inputs": [],
171
  "outputs": [
@@ -195,7 +195,7 @@
195
  "type": "ComfySwitchNode",
196
  "pos": [
197
  700,
198
- -560
199
  ],
200
  "size": [
201
  280,
@@ -249,7 +249,7 @@
249
  "type": "ComfySwitchNode",
250
  "pos": [
251
  700,
252
- -420
253
  ],
254
  "size": [
255
  280,
@@ -303,7 +303,7 @@
303
  "type": "ComfySwitchNode",
304
  "pos": [
305
  700,
306
- -280
307
  ],
308
  "size": [
309
  280,
@@ -357,14 +357,14 @@
357
  "type": "PrimitiveInt",
358
  "pos": [
359
  360,
360
- -450
361
  ],
362
  "size": [
363
  280,
364
  60
365
  ],
366
  "flags": {},
367
- "order": 4,
368
  "mode": 0,
369
  "inputs": [],
370
  "outputs": [
@@ -393,14 +393,14 @@
393
  "type": "PrimitiveInt",
394
  "pos": [
395
  360,
396
- -360
397
  ],
398
  "size": [
399
  280,
400
  60
401
  ],
402
  "flags": {},
403
- "order": 5,
404
  "mode": 0,
405
  "inputs": [],
406
  "outputs": [
@@ -429,7 +429,7 @@
429
  "type": "PrimitiveFloat",
430
  "pos": [
431
  360,
432
- -270
433
  ],
434
  "size": [
435
  280,
@@ -464,7 +464,7 @@
464
  "type": "PrimitiveFloat",
465
  "pos": [
466
  360,
467
- -180
468
  ],
469
  "size": [
470
  280,
@@ -499,7 +499,7 @@
499
  "type": "ModelSamplingAuraFlow",
500
  "pos": [
501
  1020,
502
- -560
503
  ],
504
  "size": [
505
  300,
@@ -539,7 +539,7 @@
539
  "type": "CFGNorm",
540
  "pos": [
541
  1020,
542
- -450
543
  ],
544
  "size": [
545
  300,
@@ -575,6 +575,78 @@
575
  false
576
  ]
577
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
578
  {
579
  "id": 20,
580
  "type": "LoadImage",
@@ -587,7 +659,7 @@
587
  330
588
  ],
589
  "flags": {},
590
- "order": 14,
591
  "mode": 0,
592
  "inputs": [],
593
  "outputs": [
@@ -596,8 +668,9 @@
596
  "type": "IMAGE",
597
  "slot_index": 0,
598
  "links": [
599
- 19,
600
- 20
 
601
  ]
602
  },
603
  {
@@ -619,145 +692,167 @@
619
  },
620
  {
621
  "id": 21,
622
- "type": "QwenEditAdaptiveLongestEdge",
623
  "pos": [
624
- -1180,
625
- -60
626
  ],
627
  "size": [
628
- 300,
629
  60
630
  ],
631
  "flags": {},
632
- "order": 15,
633
  "mode": 0,
634
- "inputs": [
635
- {
636
- "name": "image",
637
- "type": "IMAGE",
638
- "link": 19
639
- }
640
- ],
641
  "outputs": [
642
  {
643
- "name": "longest_edge",
644
  "type": "INT",
645
  "slot_index": 0,
646
  "links": [
647
- 21
 
648
  ]
649
  }
650
  ],
651
  "properties": {
652
- "cnr_id": "comfyui-qweneditutils",
653
- "ver": "1.0.0",
654
- "Node name for S&R": "QwenEditAdaptiveLongestEdge"
655
  },
656
  "widgets_values": [
657
- 2048
 
658
  ],
659
- "title": "Adaptive size (max 2048)"
660
  },
661
  {
662
  "id": 22,
663
- "type": "PrimitiveInt",
664
  "pos": [
665
  -1180,
666
- 60
667
  ],
668
  "size": [
669
- 300,
670
- 60
671
  ],
672
  "flags": {},
673
- "order": 16,
674
  "mode": 0,
675
- "inputs": [],
 
 
 
 
 
 
676
  "outputs": [
677
  {
678
  "name": "INT",
679
  "type": "INT",
680
  "slot_index": 0,
681
  "links": [
682
- 22
683
  ]
 
 
 
 
 
684
  }
685
  ],
686
  "properties": {
687
- "cnr_id": "comfy-core",
688
- "ver": "0.3.48",
689
- "Node name for S&R": "PrimitiveInt"
690
  },
691
  "widgets_values": [
692
- 1536,
693
- "fixed"
694
  ],
695
- "title": "Output longest edge (manual)"
696
  },
697
  {
698
  "id": 23,
699
- "type": "PrimitiveBoolean",
700
  "pos": [
701
  -1180,
702
- 170
703
  ],
704
  "size": [
705
- 300,
706
- 60
707
  ],
708
  "flags": {},
709
- "order": 17,
710
  "mode": 0,
711
- "inputs": [],
 
 
 
 
 
 
 
 
 
 
 
712
  "outputs": [
713
  {
714
- "name": "BOOLEAN",
715
- "type": "BOOLEAN",
716
  "slot_index": 0,
717
  "links": [
718
- 23
719
  ]
 
 
 
 
 
720
  }
721
  ],
722
  "properties": {
723
- "cnr_id": "comfy-core",
724
- "ver": "0.3.48",
725
- "Node name for S&R": "PrimitiveBoolean"
726
  },
727
  "widgets_values": [
728
- true
729
  ],
730
- "title": "Adaptive output size (match input)"
731
  },
732
  {
733
  "id": 24,
734
  "type": "ComfySwitchNode",
735
  "pos": [
736
- -840,
737
- 40
738
  ],
739
  "size": [
740
- 280,
741
  100
742
  ],
743
  "flags": {},
744
- "order": 18,
745
  "mode": 0,
746
  "inputs": [
747
  {
748
  "name": "on_false",
749
  "type": "INT",
750
- "link": 22
751
  },
752
  {
753
  "name": "on_true",
754
  "type": "INT",
755
- "link": 21
756
  },
757
  {
758
  "name": "switch",
759
  "type": "BOOLEAN",
760
- "link": 23,
761
  "widget": {
762
  "name": "switch"
763
  }
@@ -769,7 +864,8 @@
769
  "type": "INT",
770
  "slot_index": 0,
771
  "links": [
772
- 24
 
773
  ]
774
  }
775
  ],
@@ -781,107 +877,213 @@
781
  "widgets_values": [
782
  false
783
  ],
784
- "title": "Output size switch"
785
  },
786
  {
787
  "id": 25,
788
- "type": "QwenEditConfigPreparer",
789
  "pos": [
790
- -520,
791
- -60
792
  ],
793
  "size": [
794
- 340,
795
- 320
796
  ],
797
  "flags": {},
798
- "order": 19,
799
  "mode": 0,
800
  "inputs": [
801
  {
802
- "name": "image",
803
- "type": "IMAGE",
804
- "link": 20
805
  },
806
  {
807
- "name": "ref_longest_edge",
808
  "type": "INT",
809
- "link": 24,
810
- "widget": {
811
- "name": "ref_longest_edge"
812
- }
813
  }
814
  ],
815
  "outputs": [
816
  {
817
- "name": "configs",
818
- "type": "LIST",
819
  "slot_index": 0,
820
  "links": [
821
- 25
822
  ]
823
  },
824
  {
825
- "name": "config",
826
- "type": "ANY",
827
  "links": null
828
  }
829
  ],
830
  "properties": {
831
- "cnr_id": "comfyui-qweneditutils",
832
  "ver": "1.0.0",
833
- "Node name for S&R": "QwenEditConfigPreparer"
834
  },
835
  "widgets_values": [
836
- true,
837
- true,
838
- 1024,
839
- "pad",
840
- "lanczos",
841
- true,
842
- true,
843
- 384,
844
- "center",
845
- "bicubic"
846
  ],
847
- "title": "Main image config"
848
  },
849
  {
850
  "id": 26,
851
- "type": "LoadImage",
852
  "pos": [
853
- -1500,
854
- 380
855
  ],
856
  "size": [
857
- 270,
858
- 330
859
  ],
860
  "flags": {},
861
- "order": 20,
862
- "mode": 4,
863
- "inputs": [],
864
- "outputs": [
865
  {
866
- "name": "IMAGE",
867
- "type": "IMAGE",
868
- "slot_index": 0,
869
- "links": [
870
- 26,
871
- 27
872
- ]
873
  },
874
  {
875
- "name": "MASK",
876
- "type": "MASK",
877
- "links": null
878
- }
879
- ],
880
- "properties": {
881
- "cnr_id": "comfy-core",
882
- "ver": "0.3.48",
883
- "Node name for S&R": "LoadImage"
884
- },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
885
  "widgets_values": [
886
  "test.jpg",
887
  "image"
@@ -889,76 +1091,329 @@
889
  "title": "Reference Image 2 (optional)"
890
  },
891
  {
892
- "id": 27,
893
- "type": "QwenEditAdaptiveLongestEdge",
894
  "pos": [
895
- -1180,
896
- 380
897
  ],
898
  "size": [
899
- 300,
900
  60
901
  ],
902
  "flags": {},
903
- "order": 21,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
904
  "mode": 4,
905
  "inputs": [
906
  {
907
- "name": "image",
908
  "type": "IMAGE",
909
- "link": 26
910
  }
911
  ],
912
  "outputs": [
913
  {
914
- "name": "longest_edge",
915
  "type": "INT",
916
  "slot_index": 0,
917
  "links": [
918
- 28
919
  ]
 
 
 
 
 
920
  }
921
  ],
922
  "properties": {
923
- "cnr_id": "comfyui-qweneditutils",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
924
  "ver": "1.0.0",
925
- "Node name for S&R": "QwenEditAdaptiveLongestEdge"
926
  },
927
  "widgets_values": [
928
- 1024
929
  ],
930
- "title": "Ref 2 adaptive size"
931
  },
932
  {
933
- "id": 28,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
934
  "type": "QwenEditConfigPreparer",
935
  "pos": [
936
- -520,
937
- 380
938
  ],
939
  "size": [
940
  340,
941
  320
942
  ],
943
  "flags": {},
944
- "order": 22,
945
  "mode": 4,
946
  "inputs": [
947
  {
948
  "name": "image",
949
  "type": "IMAGE",
950
- "link": 27
951
  },
952
  {
953
  "name": "configs",
954
  "type": "LIST",
955
- "link": 25,
956
  "shape": 7
957
  },
958
  {
959
  "name": "ref_longest_edge",
960
  "type": "INT",
961
- "link": 28,
962
  "widget": {
963
  "name": "ref_longest_edge"
964
  }
@@ -970,7 +1425,7 @@
970
  "type": "LIST",
971
  "slot_index": 0,
972
  "links": [
973
- 29
974
  ]
975
  },
976
  {
@@ -999,10 +1454,10 @@
999
  "title": "Reference image 2 config"
1000
  },
1001
  {
1002
- "id": 30,
1003
  "type": "TextEncodeQwenImageEditPlusCustom_lrzjason",
1004
  "pos": [
1005
- -120,
1006
  40
1007
  ],
1008
  "size": [
@@ -1010,7 +1465,7 @@
1010
  260
1011
  ],
1012
  "flags": {},
1013
- "order": 23,
1014
  "mode": 0,
1015
  "inputs": [
1016
  {
@@ -1026,7 +1481,7 @@
1026
  {
1027
  "name": "configs",
1028
  "type": "LIST",
1029
- "link": 29
1030
  }
1031
  ],
1032
  "outputs": [
@@ -1035,8 +1490,8 @@
1035
  "type": "CONDITIONING",
1036
  "slot_index": 0,
1037
  "links": [
1038
- 30,
1039
- 31
1040
  ]
1041
  },
1042
  {
@@ -1044,7 +1499,7 @@
1044
  "type": "LATENT",
1045
  "slot_index": 1,
1046
  "links": [
1047
- 32
1048
  ]
1049
  },
1050
  {
@@ -1052,7 +1507,7 @@
1052
  "type": "ANY",
1053
  "slot_index": 2,
1054
  "links": [
1055
- 33
1056
  ]
1057
  }
1058
  ],
@@ -1069,10 +1524,10 @@
1069
  "title": "Qwen Edit Encode (prompt here)"
1070
  },
1071
  {
1072
- "id": 31,
1073
  "type": "QwenEditOutputExtractor",
1074
  "pos": [
1075
- 340,
1076
  300
1077
  ],
1078
  "size": [
@@ -1080,13 +1535,13 @@
1080
  260
1081
  ],
1082
  "flags": {},
1083
- "order": 24,
1084
  "mode": 0,
1085
  "inputs": [
1086
  {
1087
  "name": "custom_output",
1088
  "type": "ANY",
1089
- "link": 33
1090
  }
1091
  ],
1092
  "outputs": [
@@ -1095,7 +1550,7 @@
1095
  "type": "ANY",
1096
  "slot_index": 0,
1097
  "links": [
1098
- 34
1099
  ]
1100
  },
1101
  {
@@ -1157,10 +1612,10 @@
1157
  "widgets_values": []
1158
  },
1159
  {
1160
- "id": 32,
1161
  "type": "ConditioningZeroOut",
1162
  "pos": [
1163
- 340,
1164
  180
1165
  ],
1166
  "size": [
@@ -1168,13 +1623,13 @@
1168
  50
1169
  ],
1170
  "flags": {},
1171
- "order": 25,
1172
  "mode": 0,
1173
  "inputs": [
1174
  {
1175
  "name": "conditioning",
1176
  "type": "CONDITIONING",
1177
- "link": 31
1178
  }
1179
  ],
1180
  "outputs": [
@@ -1183,7 +1638,7 @@
1183
  "type": "CONDITIONING",
1184
  "slot_index": 0,
1185
  "links": [
1186
- 35
1187
  ]
1188
  }
1189
  ],
@@ -1196,7 +1651,7 @@
1196
  "title": "Negative (zeroed)"
1197
  },
1198
  {
1199
- "id": 33,
1200
  "type": "KSampler",
1201
  "pos": [
1202
  1020,
@@ -1207,7 +1662,7 @@
1207
  450
1208
  ],
1209
  "flags": {},
1210
- "order": 26,
1211
  "mode": 0,
1212
  "inputs": [
1213
  {
@@ -1218,17 +1673,17 @@
1218
  {
1219
  "name": "positive",
1220
  "type": "CONDITIONING",
1221
- "link": 30
1222
  },
1223
  {
1224
  "name": "negative",
1225
  "type": "CONDITIONING",
1226
- "link": 35
1227
  },
1228
  {
1229
  "name": "latent_image",
1230
  "type": "LATENT",
1231
- "link": 32
1232
  },
1233
  {
1234
  "name": "steps",
@@ -1249,126 +1704,248 @@
1249
  ],
1250
  "outputs": [
1251
  {
1252
- "name": "LATENT",
1253
- "type": "LATENT",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1254
  "slot_index": 0,
1255
  "links": [
1256
- 36
1257
  ]
1258
  }
1259
  ],
1260
  "properties": {
1261
  "cnr_id": "comfy-core",
1262
  "ver": "0.3.48",
1263
- "Node name for S&R": "KSampler"
1264
  },
1265
  "widgets_values": [
1266
- 42,
1267
- "randomize",
1268
- 4,
1269
- 1.0,
1270
- "euler",
1271
- "simple",
1272
- 1
1273
- ]
1274
  },
1275
  {
1276
- "id": 40,
1277
- "type": "VAEDecode",
1278
  "pos": [
1279
  1380,
1280
- -20
1281
  ],
1282
  "size": [
1283
- 210,
1284
- 50
1285
  ],
1286
  "flags": {},
1287
- "order": 27,
1288
  "mode": 0,
1289
- "inputs": [
1290
- {
1291
- "name": "samples",
1292
- "type": "LATENT",
1293
- "link": 36
1294
- },
1295
- {
1296
- "name": "vae",
1297
- "type": "VAE",
1298
- "link": 6
1299
- }
1300
- ],
1301
  "outputs": [
1302
  {
1303
- "name": "IMAGE",
1304
- "type": "IMAGE",
1305
  "slot_index": 0,
1306
  "links": [
1307
- 37
1308
  ]
1309
  }
1310
  ],
1311
  "properties": {
1312
  "cnr_id": "comfy-core",
1313
  "ver": "0.3.48",
1314
- "Node name for S&R": "VAEDecode"
1315
  },
1316
- "widgets_values": []
 
 
 
 
1317
  },
1318
  {
1319
- "id": 41,
1320
- "type": "CropWithPadInfo",
1321
  "pos": [
1322
  1380,
1323
- 80
1324
  ],
1325
  "size": [
1326
  280,
1327
- 80
1328
  ],
1329
  "flags": {},
1330
- "order": 28,
1331
  "mode": 0,
1332
  "inputs": [
1333
  {
1334
  "name": "image",
1335
  "type": "IMAGE",
1336
- "link": 37
1337
  },
1338
  {
1339
- "name": "pad_info",
1340
- "type": "ANY",
1341
- "link": 34
 
 
 
1342
  }
1343
  ],
1344
  "outputs": [
1345
  {
1346
- "name": "cropped_image",
1347
  "type": "IMAGE",
1348
  "slot_index": 0,
1349
  "links": [
1350
- 38
1351
  ]
1352
- },
1353
- {
1354
- "name": "scale_by",
1355
- "type": "FLOAT",
1356
- "links": null
1357
  }
1358
  ],
1359
  "properties": {
1360
- "cnr_id": "comfyui-qweneditutils",
1361
- "ver": "1.0.0",
1362
- "Node name for S&R": "CropWithPadInfo"
1363
  },
1364
- "widgets_values": [],
1365
- "title": "Remove padding"
 
 
 
1366
  },
1367
  {
1368
- "id": 42,
1369
- "type": "ImageScaleBy",
1370
  "pos": [
1371
- 1380,
1372
  220
1373
  ],
1374
  "size": [
@@ -1376,41 +1953,53 @@
1376
  100
1377
  ],
1378
  "flags": {},
1379
- "order": 29,
1380
  "mode": 0,
1381
  "inputs": [
1382
  {
1383
- "name": "image",
1384
  "type": "IMAGE",
1385
- "link": 38
 
 
 
 
 
 
 
 
 
 
 
 
 
1386
  }
1387
  ],
1388
  "outputs": [
1389
  {
1390
- "name": "IMAGE",
1391
  "type": "IMAGE",
1392
  "slot_index": 0,
1393
  "links": [
1394
- 39
1395
  ]
1396
  }
1397
  ],
1398
  "properties": {
1399
  "cnr_id": "comfy-core",
1400
  "ver": "0.3.48",
1401
- "Node name for S&R": "ImageScaleBy"
1402
  },
1403
  "widgets_values": [
1404
- "lanczos",
1405
- 1.0
1406
  ],
1407
- "title": "Output Scale"
1408
  },
1409
  {
1410
- "id": 43,
1411
  "type": "SaveImage",
1412
  "pos": [
1413
- 1720,
1414
  -20
1415
  ],
1416
  "size": [
@@ -1418,13 +2007,13 @@
1418
  460
1419
  ],
1420
  "flags": {},
1421
- "order": 30,
1422
  "mode": 0,
1423
  "inputs": [
1424
  {
1425
  "name": "images",
1426
  "type": "IMAGE",
1427
- "link": 39
1428
  }
1429
  ],
1430
  "outputs": [],
@@ -1438,18 +2027,18 @@
1438
  ]
1439
  },
1440
  {
1441
- "id": 44,
1442
  "type": "MarkdownNote",
1443
  "pos": [
1444
  -1500,
1445
- -560
1446
  ],
1447
  "size": [
1448
- 560,
1449
- 420
1450
  ],
1451
  "flags": {},
1452
- "order": 31,
1453
  "mode": 0,
1454
  "inputs": [],
1455
  "outputs": [],
@@ -1459,7 +2048,7 @@
1459
  "Node name for S&R": "MarkdownNote"
1460
  },
1461
  "widgets_values": [
1462
- "## Qwen Edit Turbo v3\n\n**2511 + Lightning toggle + input preprocessing + output size control** (needs [Comfyui-QwenEditUtils](https://github.com/lrzjason/Comfyui-QwenEditUtils))\n\n- **Lightning Mode** true = 4 steps / CFG 1.0 with the Lightning LoRA; false = 12 steps / CFG 3.0, no LoRA (quality run). Swap the LoRA widget to the 8-steps file + Steps (lightning) 8 for the 8-step variant.\n- **Output size**: *Adaptive output size* true = output matches input aspect/size, longest edge capped at 2048. false = uses *Output longest edge (manual)*.\n- **Reference Image 2**: bypassed by default (Ctrl+B the 3 purple nodes to enable) for multi-image edits (\"put the subject of Picture 1 in the outfit of Picture 2...\").\n- **Output Scale**: post-decode lanczos scale factor on the final image.\n- Main image uses `pad` crop; padding is removed after decode by CropWithPadInfo.\n\n**Models** (all in [aleph65/ComfyUI](https://huggingface.co/aleph65/ComfyUI))\n- diffusion_models: `qwen_image_edit_2511_bf16.safetensors`\n- text_encoders: `qwen_2.5_vl_7b.safetensors` | vae: `qwen_image_vae.safetensors`\n- loras: `Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors` (and 8steps)\n"
1463
  ],
1464
  "title": "README"
1465
  }
@@ -1493,7 +2082,7 @@
1493
  4,
1494
  3,
1495
  0,
1496
- 30,
1497
  0,
1498
  "CLIP"
1499
  ],
@@ -1501,7 +2090,7 @@
1501
  5,
1502
  4,
1503
  0,
1504
- 30,
1505
  1,
1506
  "VAE"
1507
  ],
@@ -1509,7 +2098,7 @@
1509
  6,
1510
  4,
1511
  0,
1512
- 40,
1513
  1,
1514
  "VAE"
1515
  ],
@@ -1530,250 +2119,418 @@
1530
  "BOOLEAN"
1531
  ],
1532
  [
1533
- 9,
1534
- 5,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1535
  0,
1536
- 8,
1537
- 2,
1538
- "BOOLEAN"
1539
  ],
1540
  [
1541
- 10,
1542
- 9,
1543
- 0,
1544
- 7,
1545
  0,
 
 
1546
  "INT"
1547
  ],
1548
  [
1549
- 11,
1550
- 10,
1551
  0,
1552
- 7,
1553
  1,
1554
  "INT"
1555
  ],
1556
  [
1557
- 12,
1558
- 11,
1559
  0,
1560
- 8,
1561
  0,
1562
- "FLOAT"
1563
  ],
1564
  [
1565
- 13,
1566
- 12,
1567
  0,
1568
- 8,
1569
  1,
1570
- "FLOAT"
1571
  ],
1572
  [
1573
- 14,
1574
- 6,
1575
  0,
1576
- 13,
1577
  0,
1578
- "MODEL"
1579
  ],
1580
  [
1581
- 15,
1582
- 7,
 
 
1583
  0,
1584
- 33,
1585
- 4,
1586
  "INT"
1587
  ],
1588
  [
1589
- 16,
1590
- 8,
1591
  0,
1592
- 33,
1593
- 5,
1594
- "FLOAT"
1595
  ],
1596
  [
1597
- 17,
1598
- 13,
1599
  0,
1600
- 14,
 
 
 
 
 
 
1601
  0,
1602
- "MODEL"
 
 
1603
  ],
1604
  [
1605
- 18,
1606
- 14,
1607
  0,
1608
- 33,
1609
  0,
1610
- "MODEL"
1611
  ],
1612
  [
1613
- 19,
1614
- 20,
1615
  0,
1616
- 21,
1617
  0,
1618
  "IMAGE"
1619
  ],
1620
  [
1621
- 20,
1622
- 20,
1623
  0,
1624
- 25,
1625
  0,
1626
  "IMAGE"
1627
  ],
1628
  [
1629
- 21,
1630
- 21,
1631
  0,
1632
- 24,
1633
  1,
1634
  "INT"
1635
  ],
1636
  [
1637
- 22,
1638
- 22,
1639
- 0,
1640
- 24,
1641
  0,
 
 
1642
  "INT"
1643
  ],
1644
  [
1645
- 23,
1646
- 23,
1647
  0,
1648
- 24,
1649
- 2,
1650
- "BOOLEAN"
1651
  ],
1652
  [
1653
- 24,
1654
- 24,
1655
  0,
1656
- 25,
1657
  1,
1658
  "INT"
1659
  ],
1660
  [
1661
- 25,
1662
- 25,
1663
  0,
1664
- 28,
1665
- 1,
1666
- "LIST"
1667
  ],
1668
  [
1669
- 26,
1670
- 26,
1671
  0,
1672
- 27,
1673
  0,
1674
- "IMAGE"
1675
  ],
1676
  [
1677
- 27,
1678
- 26,
1679
- 0,
1680
- 28,
1681
  0,
1682
- "IMAGE"
 
 
1683
  ],
1684
  [
1685
- 28,
1686
- 27,
1687
  0,
1688
- 28,
1689
  2,
1690
  "INT"
1691
  ],
1692
  [
1693
- 29,
1694
- 28,
1695
  0,
1696
- 30,
1697
  2,
1698
  "LIST"
1699
  ],
1700
  [
1701
- 30,
1702
- 30,
1703
  0,
1704
- 33,
1705
  1,
1706
  "CONDITIONING"
1707
  ],
1708
  [
1709
- 31,
1710
- 30,
1711
  0,
1712
- 32,
1713
  0,
1714
  "CONDITIONING"
1715
  ],
1716
  [
1717
- 32,
1718
- 30,
1719
  1,
1720
- 33,
1721
  3,
1722
  "LATENT"
1723
  ],
1724
  [
1725
- 33,
1726
- 30,
1727
  2,
1728
- 31,
1729
  0,
1730
  "ANY"
1731
  ],
1732
  [
1733
- 34,
1734
- 31,
1735
- 0,
1736
  41,
 
 
1737
  1,
1738
  "ANY"
1739
  ],
1740
  [
1741
- 35,
1742
- 32,
1743
  0,
1744
- 33,
1745
  2,
1746
  "CONDITIONING"
1747
  ],
1748
  [
1749
- 36,
1750
- 33,
1751
  0,
1752
- 40,
1753
  0,
1754
  "LATENT"
1755
  ],
1756
  [
1757
- 37,
1758
- 40,
1759
  0,
1760
- 41,
1761
  0,
1762
  "IMAGE"
1763
  ],
1764
  [
1765
- 38,
1766
- 41,
1767
  0,
1768
- 42,
1769
  0,
1770
  "IMAGE"
1771
  ],
1772
  [
1773
- 39,
1774
- 42,
1775
  0,
1776
- 43,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1777
  0,
1778
  "IMAGE"
1779
  ]
@@ -1784,9 +2541,9 @@
1784
  "title": "Models",
1785
  "bounding": [
1786
  -60,
1787
- -640,
1788
  380,
1789
- 580
1790
  ],
1791
  "color": "#3f789e",
1792
  "font_size": 24,
@@ -1797,9 +2554,9 @@
1797
  "title": "Lightning Toggle",
1798
  "bounding": [
1799
  340,
1800
- -640,
1801
  660,
1802
- 540
1803
  ],
1804
  "color": "#8A8",
1805
  "font_size": 24,
@@ -1807,37 +2564,50 @@
1807
  },
1808
  {
1809
  "id": 3,
1810
- "title": "Input + Preprocessing",
1811
  "bounding": [
1812
  -1520,
1813
- -140,
1814
- 1380,
1815
- 620
1816
  ],
1817
- "color": "#3f789e",
1818
  "font_size": 24,
1819
  "flags": {}
1820
  },
1821
  {
1822
  "id": 4,
 
 
 
 
 
 
 
 
 
 
 
 
 
1823
  "title": "Optional 2nd Reference (Ctrl+B to enable)",
1824
  "bounding": [
1825
  -1520,
1826
- 320,
1827
- 1380,
1828
- 420
1829
  ],
1830
  "color": "#a363d9",
1831
  "font_size": 24,
1832
  "flags": {}
1833
  },
1834
  {
1835
- "id": 5,
1836
  "title": "Encode",
1837
  "bounding": [
1838
- -140,
1839
  -40,
1840
- 800,
1841
  640
1842
  ],
1843
  "color": "#3f789e",
@@ -1845,13 +2615,13 @@
1845
  "flags": {}
1846
  },
1847
  {
1848
- "id": 6,
1849
  "title": "Sample + Output",
1850
  "bounding": [
1851
  1000,
1852
  -100,
1853
- 1140,
1854
- 640
1855
  ],
1856
  "color": "#b58b2a",
1857
  "font_size": 24,
 
1
  {
2
  "id": "c7d4e8f1-2a6b-4c3d-9e0f-5b8a1d4c7e2f",
3
+ "revision": 1,
4
+ "last_node_id": 51,
5
+ "last_link_id": 60,
6
  "nodes": [
7
  {
8
  "id": 1,
9
  "type": "UNETLoader",
10
  "pos": [
11
  -40,
12
+ -620
13
  ],
14
  "size": [
15
  340,
 
45
  "type": "LoraLoaderModelOnly",
46
  "pos": [
47
  -40,
48
+ -490
49
  ],
50
  "size": [
51
  340,
52
  82
53
  ],
54
  "flags": {},
55
+ "order": 1,
56
  "mode": 0,
57
  "inputs": [
58
  {
 
87
  "type": "CLIPLoader",
88
  "pos": [
89
  -40,
90
+ -360
91
  ],
92
  "size": [
93
  340,
94
  110
95
  ],
96
  "flags": {},
97
+ "order": 2,
98
  "mode": 0,
99
  "inputs": [],
100
  "outputs": [
 
123
  "type": "VAELoader",
124
  "pos": [
125
  -40,
126
+ -200
127
  ],
128
  "size": [
129
  340,
130
  60
131
  ],
132
  "flags": {},
133
+ "order": 3,
134
  "mode": 0,
135
  "inputs": [],
136
  "outputs": [
 
158
  "type": "PrimitiveBoolean",
159
  "pos": [
160
  360,
161
+ -620
162
  ],
163
  "size": [
164
  280,
165
  60
166
  ],
167
  "flags": {},
168
+ "order": 4,
169
  "mode": 0,
170
  "inputs": [],
171
  "outputs": [
 
195
  "type": "ComfySwitchNode",
196
  "pos": [
197
  700,
198
+ -620
199
  ],
200
  "size": [
201
  280,
 
249
  "type": "ComfySwitchNode",
250
  "pos": [
251
  700,
252
+ -480
253
  ],
254
  "size": [
255
  280,
 
303
  "type": "ComfySwitchNode",
304
  "pos": [
305
  700,
306
+ -340
307
  ],
308
  "size": [
309
  280,
 
357
  "type": "PrimitiveInt",
358
  "pos": [
359
  360,
360
+ -510
361
  ],
362
  "size": [
363
  280,
364
  60
365
  ],
366
  "flags": {},
367
+ "order": 5,
368
  "mode": 0,
369
  "inputs": [],
370
  "outputs": [
 
393
  "type": "PrimitiveInt",
394
  "pos": [
395
  360,
396
+ -420
397
  ],
398
  "size": [
399
  280,
400
  60
401
  ],
402
  "flags": {},
403
+ "order": 6,
404
  "mode": 0,
405
  "inputs": [],
406
  "outputs": [
 
429
  "type": "PrimitiveFloat",
430
  "pos": [
431
  360,
432
+ -330
433
  ],
434
  "size": [
435
  280,
 
464
  "type": "PrimitiveFloat",
465
  "pos": [
466
  360,
467
+ -240
468
  ],
469
  "size": [
470
  280,
 
499
  "type": "ModelSamplingAuraFlow",
500
  "pos": [
501
  1020,
502
+ -620
503
  ],
504
  "size": [
505
  300,
 
539
  "type": "CFGNorm",
540
  "pos": [
541
  1020,
542
+ -510
543
  ],
544
  "size": [
545
  300,
 
575
  false
576
  ]
577
  },
578
+ {
579
+ "id": 15,
580
+ "type": "PrimitiveBoolean",
581
+ "pos": [
582
+ -1500,
583
+ -280
584
+ ],
585
+ "size": [
586
+ 340,
587
+ 60
588
+ ],
589
+ "flags": {},
590
+ "order": 14,
591
+ "mode": 0,
592
+ "inputs": [],
593
+ "outputs": [
594
+ {
595
+ "name": "BOOLEAN",
596
+ "type": "BOOLEAN",
597
+ "slot_index": 0,
598
+ "links": [
599
+ 19,
600
+ 20
601
+ ]
602
+ }
603
+ ],
604
+ "properties": {
605
+ "cnr_id": "comfy-core",
606
+ "ver": "0.3.48",
607
+ "Node name for S&R": "PrimitiveBoolean"
608
+ },
609
+ "widgets_values": [
610
+ true
611
+ ],
612
+ "title": "upscale_input_to_max_size"
613
+ },
614
+ {
615
+ "id": 16,
616
+ "type": "PrimitiveBoolean",
617
+ "pos": [
618
+ -1500,
619
+ -180
620
+ ],
621
+ "size": [
622
+ 340,
623
+ 60
624
+ ],
625
+ "flags": {},
626
+ "order": 15,
627
+ "mode": 0,
628
+ "inputs": [],
629
+ "outputs": [
630
+ {
631
+ "name": "BOOLEAN",
632
+ "type": "BOOLEAN",
633
+ "slot_index": 0,
634
+ "links": [
635
+ 21,
636
+ 22
637
+ ]
638
+ }
639
+ ],
640
+ "properties": {
641
+ "cnr_id": "comfy-core",
642
+ "ver": "0.3.48",
643
+ "Node name for S&R": "PrimitiveBoolean"
644
+ },
645
+ "widgets_values": [
646
+ true
647
+ ],
648
+ "title": "downscale_input_to_max_size"
649
+ },
650
  {
651
  "id": 20,
652
  "type": "LoadImage",
 
659
  330
660
  ],
661
  "flags": {},
662
+ "order": 16,
663
  "mode": 0,
664
  "inputs": [],
665
  "outputs": [
 
668
  "type": "IMAGE",
669
  "slot_index": 0,
670
  "links": [
671
+ 23,
672
+ 24,
673
+ 25
674
  ]
675
  },
676
  {
 
692
  },
693
  {
694
  "id": 21,
695
+ "type": "PrimitiveInt",
696
  "pos": [
697
+ -1500,
698
+ 320
699
  ],
700
  "size": [
701
+ 270,
702
  60
703
  ],
704
  "flags": {},
705
+ "order": 17,
706
  "mode": 0,
707
+ "inputs": [],
 
 
 
 
 
 
708
  "outputs": [
709
  {
710
+ "name": "INT",
711
  "type": "INT",
712
  "slot_index": 0,
713
  "links": [
714
+ 26,
715
+ 27
716
  ]
717
  }
718
  ],
719
  "properties": {
720
+ "cnr_id": "comfy-core",
721
+ "ver": "0.3.48",
722
+ "Node name for S&R": "PrimitiveInt"
723
  },
724
  "widgets_values": [
725
+ 1536,
726
+ "fixed"
727
  ],
728
+ "title": "Input max size (main)"
729
  },
730
  {
731
  "id": 22,
732
+ "type": "MathExpression|pysssss",
733
  "pos": [
734
  -1180,
735
+ -60
736
  ],
737
  "size": [
738
+ 260,
739
+ 120
740
  ],
741
  "flags": {},
742
+ "order": 18,
743
  "mode": 0,
744
+ "inputs": [
745
+ {
746
+ "name": "a",
747
+ "type": "IMAGE",
748
+ "link": 23
749
+ }
750
+ ],
751
  "outputs": [
752
  {
753
  "name": "INT",
754
  "type": "INT",
755
  "slot_index": 0,
756
  "links": [
757
+ 28
758
  ]
759
+ },
760
+ {
761
+ "name": "FLOAT",
762
+ "type": "FLOAT",
763
+ "links": null
764
  }
765
  ],
766
  "properties": {
767
+ "cnr_id": "comfyui-custom-scripts",
768
+ "ver": "1.0.0",
769
+ "Node name for S&R": "MathExpression|pysssss"
770
  },
771
  "widgets_values": [
772
+ "max(a.width, a.height)"
 
773
  ],
774
+ "title": "native edge (main)"
775
  },
776
  {
777
  "id": 23,
778
+ "type": "MathExpression|pysssss",
779
  "pos": [
780
  -1180,
781
+ 100
782
  ],
783
  "size": [
784
+ 260,
785
+ 120
786
  ],
787
  "flags": {},
788
+ "order": 19,
789
  "mode": 0,
790
+ "inputs": [
791
+ {
792
+ "name": "a",
793
+ "type": "IMAGE",
794
+ "link": 24
795
+ },
796
+ {
797
+ "name": "c",
798
+ "type": "INT",
799
+ "link": 26
800
+ }
801
+ ],
802
  "outputs": [
803
  {
804
+ "name": "INT",
805
+ "type": "INT",
806
  "slot_index": 0,
807
  "links": [
808
+ 29
809
  ]
810
+ },
811
+ {
812
+ "name": "FLOAT",
813
+ "type": "FLOAT",
814
+ "links": null
815
  }
816
  ],
817
  "properties": {
818
+ "cnr_id": "comfyui-custom-scripts",
819
+ "ver": "1.0.0",
820
+ "Node name for S&R": "MathExpression|pysssss"
821
  },
822
  "widgets_values": [
823
+ "max(a.width, a.height, c)"
824
  ],
825
+ "title": "upscaled edge (main)"
826
  },
827
  {
828
  "id": 24,
829
  "type": "ComfySwitchNode",
830
  "pos": [
831
+ -880,
832
+ -20
833
  ],
834
  "size": [
835
+ 260,
836
  100
837
  ],
838
  "flags": {},
839
+ "order": 20,
840
  "mode": 0,
841
  "inputs": [
842
  {
843
  "name": "on_false",
844
  "type": "INT",
845
+ "link": 28
846
  },
847
  {
848
  "name": "on_true",
849
  "type": "INT",
850
+ "link": 29
851
  },
852
  {
853
  "name": "switch",
854
  "type": "BOOLEAN",
855
+ "link": 19,
856
  "widget": {
857
  "name": "switch"
858
  }
 
864
  "type": "INT",
865
  "slot_index": 0,
866
  "links": [
867
+ 30,
868
+ 31
869
  ]
870
  }
871
  ],
 
877
  "widgets_values": [
878
  false
879
  ],
880
+ "title": "apply upscale (main)"
881
  },
882
  {
883
  "id": 25,
884
+ "type": "MathExpression|pysssss",
885
  "pos": [
886
+ -880,
887
+ 130
888
  ],
889
  "size": [
890
+ 260,
891
+ 120
892
  ],
893
  "flags": {},
894
+ "order": 21,
895
  "mode": 0,
896
  "inputs": [
897
  {
898
+ "name": "a",
899
+ "type": "INT",
900
+ "link": 30
901
  },
902
  {
903
+ "name": "c",
904
  "type": "INT",
905
+ "link": 27
 
 
 
906
  }
907
  ],
908
  "outputs": [
909
  {
910
+ "name": "INT",
911
+ "type": "INT",
912
  "slot_index": 0,
913
  "links": [
914
+ 32
915
  ]
916
  },
917
  {
918
+ "name": "FLOAT",
919
+ "type": "FLOAT",
920
  "links": null
921
  }
922
  ],
923
  "properties": {
924
+ "cnr_id": "comfyui-custom-scripts",
925
  "ver": "1.0.0",
926
+ "Node name for S&R": "MathExpression|pysssss"
927
  },
928
  "widgets_values": [
929
+ "min(a, c)"
 
 
 
 
 
 
 
 
 
930
  ],
931
+ "title": "downscaled edge (main)"
932
  },
933
  {
934
  "id": 26,
935
+ "type": "ComfySwitchNode",
936
  "pos": [
937
+ -580,
938
+ -20
939
  ],
940
  "size": [
941
+ 260,
942
+ 100
943
  ],
944
  "flags": {},
945
+ "order": 22,
946
+ "mode": 0,
947
+ "inputs": [
 
948
  {
949
+ "name": "on_false",
950
+ "type": "INT",
951
+ "link": 31
 
 
 
 
952
  },
953
  {
954
+ "name": "on_true",
955
+ "type": "INT",
956
+ "link": 32
957
+ },
958
+ {
959
+ "name": "switch",
960
+ "type": "BOOLEAN",
961
+ "link": 21,
962
+ "widget": {
963
+ "name": "switch"
964
+ }
965
+ }
966
+ ],
967
+ "outputs": [
968
+ {
969
+ "name": "output",
970
+ "type": "INT",
971
+ "slot_index": 0,
972
+ "links": [
973
+ 33
974
+ ]
975
+ }
976
+ ],
977
+ "properties": {
978
+ "cnr_id": "comfy-core",
979
+ "ver": "0.3.48",
980
+ "Node name for S&R": "ComfySwitchNode"
981
+ },
982
+ "widgets_values": [
983
+ false
984
+ ],
985
+ "title": "apply downscale (main)"
986
+ },
987
+ {
988
+ "id": 27,
989
+ "type": "QwenEditConfigPreparer",
990
+ "pos": [
991
+ -280,
992
+ -60
993
+ ],
994
+ "size": [
995
+ 340,
996
+ 320
997
+ ],
998
+ "flags": {},
999
+ "order": 23,
1000
+ "mode": 0,
1001
+ "inputs": [
1002
+ {
1003
+ "name": "image",
1004
+ "type": "IMAGE",
1005
+ "link": 25
1006
+ },
1007
+ {
1008
+ "name": "ref_longest_edge",
1009
+ "type": "INT",
1010
+ "link": 33,
1011
+ "widget": {
1012
+ "name": "ref_longest_edge"
1013
+ }
1014
+ }
1015
+ ],
1016
+ "outputs": [
1017
+ {
1018
+ "name": "configs",
1019
+ "type": "LIST",
1020
+ "slot_index": 0,
1021
+ "links": [
1022
+ 34
1023
+ ]
1024
+ },
1025
+ {
1026
+ "name": "config",
1027
+ "type": "ANY",
1028
+ "links": null
1029
+ }
1030
+ ],
1031
+ "properties": {
1032
+ "cnr_id": "comfyui-qweneditutils",
1033
+ "ver": "1.0.0",
1034
+ "Node name for S&R": "QwenEditConfigPreparer"
1035
+ },
1036
+ "widgets_values": [
1037
+ true,
1038
+ true,
1039
+ 1536,
1040
+ "pad",
1041
+ "lanczos",
1042
+ true,
1043
+ true,
1044
+ 384,
1045
+ "center",
1046
+ "bicubic"
1047
+ ],
1048
+ "title": "Main image config"
1049
+ },
1050
+ {
1051
+ "id": 30,
1052
+ "type": "LoadImage",
1053
+ "pos": [
1054
+ -1500,
1055
+ 460
1056
+ ],
1057
+ "size": [
1058
+ 270,
1059
+ 330
1060
+ ],
1061
+ "flags": {},
1062
+ "order": 24,
1063
+ "mode": 4,
1064
+ "inputs": [],
1065
+ "outputs": [
1066
+ {
1067
+ "name": "IMAGE",
1068
+ "type": "IMAGE",
1069
+ "slot_index": 0,
1070
+ "links": [
1071
+ 35,
1072
+ 36,
1073
+ 37
1074
+ ]
1075
+ },
1076
+ {
1077
+ "name": "MASK",
1078
+ "type": "MASK",
1079
+ "links": null
1080
+ }
1081
+ ],
1082
+ "properties": {
1083
+ "cnr_id": "comfy-core",
1084
+ "ver": "0.3.48",
1085
+ "Node name for S&R": "LoadImage"
1086
+ },
1087
  "widgets_values": [
1088
  "test.jpg",
1089
  "image"
 
1091
  "title": "Reference Image 2 (optional)"
1092
  },
1093
  {
1094
+ "id": 31,
1095
+ "type": "PrimitiveInt",
1096
  "pos": [
1097
+ -1500,
1098
+ 840
1099
  ],
1100
  "size": [
1101
+ 270,
1102
  60
1103
  ],
1104
  "flags": {},
1105
+ "order": 25,
1106
+ "mode": 0,
1107
+ "inputs": [],
1108
+ "outputs": [
1109
+ {
1110
+ "name": "INT",
1111
+ "type": "INT",
1112
+ "slot_index": 0,
1113
+ "links": [
1114
+ 38,
1115
+ 39
1116
+ ]
1117
+ }
1118
+ ],
1119
+ "properties": {
1120
+ "cnr_id": "comfy-core",
1121
+ "ver": "0.3.48",
1122
+ "Node name for S&R": "PrimitiveInt"
1123
+ },
1124
+ "widgets_values": [
1125
+ 1024,
1126
+ "fixed"
1127
+ ],
1128
+ "title": "Input max size (ref 2)"
1129
+ },
1130
+ {
1131
+ "id": 32,
1132
+ "type": "MathExpression|pysssss",
1133
+ "pos": [
1134
+ -1180,
1135
+ 460
1136
+ ],
1137
+ "size": [
1138
+ 260,
1139
+ 120
1140
+ ],
1141
+ "flags": {},
1142
+ "order": 26,
1143
  "mode": 4,
1144
  "inputs": [
1145
  {
1146
+ "name": "a",
1147
  "type": "IMAGE",
1148
+ "link": 35
1149
  }
1150
  ],
1151
  "outputs": [
1152
  {
1153
+ "name": "INT",
1154
  "type": "INT",
1155
  "slot_index": 0,
1156
  "links": [
1157
+ 40
1158
  ]
1159
+ },
1160
+ {
1161
+ "name": "FLOAT",
1162
+ "type": "FLOAT",
1163
+ "links": null
1164
  }
1165
  ],
1166
  "properties": {
1167
+ "cnr_id": "comfyui-custom-scripts",
1168
+ "ver": "1.0.0",
1169
+ "Node name for S&R": "MathExpression|pysssss"
1170
+ },
1171
+ "widgets_values": [
1172
+ "max(a.width, a.height)"
1173
+ ],
1174
+ "title": "native edge (ref 2)"
1175
+ },
1176
+ {
1177
+ "id": 33,
1178
+ "type": "MathExpression|pysssss",
1179
+ "pos": [
1180
+ -1180,
1181
+ 620
1182
+ ],
1183
+ "size": [
1184
+ 260,
1185
+ 120
1186
+ ],
1187
+ "flags": {},
1188
+ "order": 27,
1189
+ "mode": 4,
1190
+ "inputs": [
1191
+ {
1192
+ "name": "a",
1193
+ "type": "IMAGE",
1194
+ "link": 36
1195
+ },
1196
+ {
1197
+ "name": "c",
1198
+ "type": "INT",
1199
+ "link": 38
1200
+ }
1201
+ ],
1202
+ "outputs": [
1203
+ {
1204
+ "name": "INT",
1205
+ "type": "INT",
1206
+ "slot_index": 0,
1207
+ "links": [
1208
+ 41
1209
+ ]
1210
+ },
1211
+ {
1212
+ "name": "FLOAT",
1213
+ "type": "FLOAT",
1214
+ "links": null
1215
+ }
1216
+ ],
1217
+ "properties": {
1218
+ "cnr_id": "comfyui-custom-scripts",
1219
+ "ver": "1.0.0",
1220
+ "Node name for S&R": "MathExpression|pysssss"
1221
+ },
1222
+ "widgets_values": [
1223
+ "max(a.width, a.height, c)"
1224
+ ],
1225
+ "title": "upscaled edge (ref 2)"
1226
+ },
1227
+ {
1228
+ "id": 34,
1229
+ "type": "ComfySwitchNode",
1230
+ "pos": [
1231
+ -880,
1232
+ 500
1233
+ ],
1234
+ "size": [
1235
+ 260,
1236
+ 100
1237
+ ],
1238
+ "flags": {},
1239
+ "order": 28,
1240
+ "mode": 4,
1241
+ "inputs": [
1242
+ {
1243
+ "name": "on_false",
1244
+ "type": "INT",
1245
+ "link": 40
1246
+ },
1247
+ {
1248
+ "name": "on_true",
1249
+ "type": "INT",
1250
+ "link": 41
1251
+ },
1252
+ {
1253
+ "name": "switch",
1254
+ "type": "BOOLEAN",
1255
+ "link": 20,
1256
+ "widget": {
1257
+ "name": "switch"
1258
+ }
1259
+ }
1260
+ ],
1261
+ "outputs": [
1262
+ {
1263
+ "name": "output",
1264
+ "type": "INT",
1265
+ "slot_index": 0,
1266
+ "links": [
1267
+ 42,
1268
+ 43
1269
+ ]
1270
+ }
1271
+ ],
1272
+ "properties": {
1273
+ "cnr_id": "comfy-core",
1274
+ "ver": "0.3.48",
1275
+ "Node name for S&R": "ComfySwitchNode"
1276
+ },
1277
+ "widgets_values": [
1278
+ false
1279
+ ],
1280
+ "title": "apply upscale (ref 2)"
1281
+ },
1282
+ {
1283
+ "id": 35,
1284
+ "type": "MathExpression|pysssss",
1285
+ "pos": [
1286
+ -880,
1287
+ 650
1288
+ ],
1289
+ "size": [
1290
+ 260,
1291
+ 120
1292
+ ],
1293
+ "flags": {},
1294
+ "order": 29,
1295
+ "mode": 4,
1296
+ "inputs": [
1297
+ {
1298
+ "name": "a",
1299
+ "type": "INT",
1300
+ "link": 42
1301
+ },
1302
+ {
1303
+ "name": "c",
1304
+ "type": "INT",
1305
+ "link": 39
1306
+ }
1307
+ ],
1308
+ "outputs": [
1309
+ {
1310
+ "name": "INT",
1311
+ "type": "INT",
1312
+ "slot_index": 0,
1313
+ "links": [
1314
+ 44
1315
+ ]
1316
+ },
1317
+ {
1318
+ "name": "FLOAT",
1319
+ "type": "FLOAT",
1320
+ "links": null
1321
+ }
1322
+ ],
1323
+ "properties": {
1324
+ "cnr_id": "comfyui-custom-scripts",
1325
  "ver": "1.0.0",
1326
+ "Node name for S&R": "MathExpression|pysssss"
1327
  },
1328
  "widgets_values": [
1329
+ "min(a, c)"
1330
  ],
1331
+ "title": "downscaled edge (ref 2)"
1332
  },
1333
  {
1334
+ "id": 36,
1335
+ "type": "ComfySwitchNode",
1336
+ "pos": [
1337
+ -580,
1338
+ 500
1339
+ ],
1340
+ "size": [
1341
+ 260,
1342
+ 100
1343
+ ],
1344
+ "flags": {},
1345
+ "order": 30,
1346
+ "mode": 4,
1347
+ "inputs": [
1348
+ {
1349
+ "name": "on_false",
1350
+ "type": "INT",
1351
+ "link": 43
1352
+ },
1353
+ {
1354
+ "name": "on_true",
1355
+ "type": "INT",
1356
+ "link": 44
1357
+ },
1358
+ {
1359
+ "name": "switch",
1360
+ "type": "BOOLEAN",
1361
+ "link": 22,
1362
+ "widget": {
1363
+ "name": "switch"
1364
+ }
1365
+ }
1366
+ ],
1367
+ "outputs": [
1368
+ {
1369
+ "name": "output",
1370
+ "type": "INT",
1371
+ "slot_index": 0,
1372
+ "links": [
1373
+ 45
1374
+ ]
1375
+ }
1376
+ ],
1377
+ "properties": {
1378
+ "cnr_id": "comfy-core",
1379
+ "ver": "0.3.48",
1380
+ "Node name for S&R": "ComfySwitchNode"
1381
+ },
1382
+ "widgets_values": [
1383
+ false
1384
+ ],
1385
+ "title": "apply downscale (ref 2)"
1386
+ },
1387
+ {
1388
+ "id": 37,
1389
  "type": "QwenEditConfigPreparer",
1390
  "pos": [
1391
+ -280,
1392
+ 460
1393
  ],
1394
  "size": [
1395
  340,
1396
  320
1397
  ],
1398
  "flags": {},
1399
+ "order": 31,
1400
  "mode": 4,
1401
  "inputs": [
1402
  {
1403
  "name": "image",
1404
  "type": "IMAGE",
1405
+ "link": 37
1406
  },
1407
  {
1408
  "name": "configs",
1409
  "type": "LIST",
1410
+ "link": 34,
1411
  "shape": 7
1412
  },
1413
  {
1414
  "name": "ref_longest_edge",
1415
  "type": "INT",
1416
+ "link": 45,
1417
  "widget": {
1418
  "name": "ref_longest_edge"
1419
  }
 
1425
  "type": "LIST",
1426
  "slot_index": 0,
1427
  "links": [
1428
+ 46
1429
  ]
1430
  },
1431
  {
 
1454
  "title": "Reference image 2 config"
1455
  },
1456
  {
1457
+ "id": 40,
1458
  "type": "TextEncodeQwenImageEditPlusCustom_lrzjason",
1459
  "pos": [
1460
+ 120,
1461
  40
1462
  ],
1463
  "size": [
 
1465
  260
1466
  ],
1467
  "flags": {},
1468
+ "order": 32,
1469
  "mode": 0,
1470
  "inputs": [
1471
  {
 
1481
  {
1482
  "name": "configs",
1483
  "type": "LIST",
1484
+ "link": 46
1485
  }
1486
  ],
1487
  "outputs": [
 
1490
  "type": "CONDITIONING",
1491
  "slot_index": 0,
1492
  "links": [
1493
+ 47,
1494
+ 48
1495
  ]
1496
  },
1497
  {
 
1499
  "type": "LATENT",
1500
  "slot_index": 1,
1501
  "links": [
1502
+ 49
1503
  ]
1504
  },
1505
  {
 
1507
  "type": "ANY",
1508
  "slot_index": 2,
1509
  "links": [
1510
+ 50
1511
  ]
1512
  }
1513
  ],
 
1524
  "title": "Qwen Edit Encode (prompt here)"
1525
  },
1526
  {
1527
+ "id": 41,
1528
  "type": "QwenEditOutputExtractor",
1529
  "pos": [
1530
+ 560,
1531
  300
1532
  ],
1533
  "size": [
 
1535
  260
1536
  ],
1537
  "flags": {},
1538
+ "order": 33,
1539
  "mode": 0,
1540
  "inputs": [
1541
  {
1542
  "name": "custom_output",
1543
  "type": "ANY",
1544
+ "link": 50
1545
  }
1546
  ],
1547
  "outputs": [
 
1550
  "type": "ANY",
1551
  "slot_index": 0,
1552
  "links": [
1553
+ 51
1554
  ]
1555
  },
1556
  {
 
1612
  "widgets_values": []
1613
  },
1614
  {
1615
+ "id": 42,
1616
  "type": "ConditioningZeroOut",
1617
  "pos": [
1618
+ 560,
1619
  180
1620
  ],
1621
  "size": [
 
1623
  50
1624
  ],
1625
  "flags": {},
1626
+ "order": 34,
1627
  "mode": 0,
1628
  "inputs": [
1629
  {
1630
  "name": "conditioning",
1631
  "type": "CONDITIONING",
1632
+ "link": 48
1633
  }
1634
  ],
1635
  "outputs": [
 
1638
  "type": "CONDITIONING",
1639
  "slot_index": 0,
1640
  "links": [
1641
+ 52
1642
  ]
1643
  }
1644
  ],
 
1651
  "title": "Negative (zeroed)"
1652
  },
1653
  {
1654
+ "id": 43,
1655
  "type": "KSampler",
1656
  "pos": [
1657
  1020,
 
1662
  450
1663
  ],
1664
  "flags": {},
1665
+ "order": 35,
1666
  "mode": 0,
1667
  "inputs": [
1668
  {
 
1673
  {
1674
  "name": "positive",
1675
  "type": "CONDITIONING",
1676
+ "link": 47
1677
  },
1678
  {
1679
  "name": "negative",
1680
  "type": "CONDITIONING",
1681
+ "link": 52
1682
  },
1683
  {
1684
  "name": "latent_image",
1685
  "type": "LATENT",
1686
+ "link": 49
1687
  },
1688
  {
1689
  "name": "steps",
 
1704
  ],
1705
  "outputs": [
1706
  {
1707
+ "name": "LATENT",
1708
+ "type": "LATENT",
1709
+ "slot_index": 0,
1710
+ "links": [
1711
+ 53
1712
+ ]
1713
+ }
1714
+ ],
1715
+ "properties": {
1716
+ "cnr_id": "comfy-core",
1717
+ "ver": "0.3.48",
1718
+ "Node name for S&R": "KSampler"
1719
+ },
1720
+ "widgets_values": [
1721
+ 42,
1722
+ "randomize",
1723
+ 4,
1724
+ 1.0,
1725
+ "euler",
1726
+ "simple",
1727
+ 1
1728
+ ]
1729
+ },
1730
+ {
1731
+ "id": 44,
1732
+ "type": "VAEDecode",
1733
+ "pos": [
1734
+ 1380,
1735
+ -20
1736
+ ],
1737
+ "size": [
1738
+ 210,
1739
+ 50
1740
+ ],
1741
+ "flags": {},
1742
+ "order": 36,
1743
+ "mode": 0,
1744
+ "inputs": [
1745
+ {
1746
+ "name": "samples",
1747
+ "type": "LATENT",
1748
+ "link": 53
1749
+ },
1750
+ {
1751
+ "name": "vae",
1752
+ "type": "VAE",
1753
+ "link": 6
1754
+ }
1755
+ ],
1756
+ "outputs": [
1757
+ {
1758
+ "name": "IMAGE",
1759
+ "type": "IMAGE",
1760
+ "slot_index": 0,
1761
+ "links": [
1762
+ 54
1763
+ ]
1764
+ }
1765
+ ],
1766
+ "properties": {
1767
+ "cnr_id": "comfy-core",
1768
+ "ver": "0.3.48",
1769
+ "Node name for S&R": "VAEDecode"
1770
+ },
1771
+ "widgets_values": []
1772
+ },
1773
+ {
1774
+ "id": 45,
1775
+ "type": "CropWithPadInfo",
1776
+ "pos": [
1777
+ 1380,
1778
+ 80
1779
+ ],
1780
+ "size": [
1781
+ 280,
1782
+ 80
1783
+ ],
1784
+ "flags": {},
1785
+ "order": 37,
1786
+ "mode": 0,
1787
+ "inputs": [
1788
+ {
1789
+ "name": "image",
1790
+ "type": "IMAGE",
1791
+ "link": 54
1792
+ },
1793
+ {
1794
+ "name": "pad_info",
1795
+ "type": "ANY",
1796
+ "link": 51
1797
+ }
1798
+ ],
1799
+ "outputs": [
1800
+ {
1801
+ "name": "cropped_image",
1802
+ "type": "IMAGE",
1803
+ "slot_index": 0,
1804
+ "links": [
1805
+ 55,
1806
+ 56
1807
+ ]
1808
+ },
1809
+ {
1810
+ "name": "scale_by",
1811
+ "type": "FLOAT",
1812
+ "links": null
1813
+ }
1814
+ ],
1815
+ "properties": {
1816
+ "cnr_id": "comfyui-qweneditutils",
1817
+ "ver": "1.0.0",
1818
+ "Node name for S&R": "CropWithPadInfo"
1819
+ },
1820
+ "widgets_values": [],
1821
+ "title": "Remove padding"
1822
+ },
1823
+ {
1824
+ "id": 46,
1825
+ "type": "PrimitiveBoolean",
1826
+ "pos": [
1827
+ 1380,
1828
+ 220
1829
+ ],
1830
+ "size": [
1831
+ 340,
1832
+ 60
1833
+ ],
1834
+ "flags": {},
1835
+ "order": 38,
1836
+ "mode": 0,
1837
+ "inputs": [],
1838
+ "outputs": [
1839
+ {
1840
+ "name": "BOOLEAN",
1841
+ "type": "BOOLEAN",
1842
  "slot_index": 0,
1843
  "links": [
1844
+ 57
1845
  ]
1846
  }
1847
  ],
1848
  "properties": {
1849
  "cnr_id": "comfy-core",
1850
  "ver": "0.3.48",
1851
+ "Node name for S&R": "PrimitiveBoolean"
1852
  },
1853
  "widgets_values": [
1854
+ false
1855
+ ],
1856
+ "title": "upscale_output_to_selected_size"
 
 
 
 
 
1857
  },
1858
  {
1859
+ "id": 47,
1860
+ "type": "PrimitiveInt",
1861
  "pos": [
1862
  1380,
1863
+ 320
1864
  ],
1865
  "size": [
1866
+ 340,
1867
+ 60
1868
  ],
1869
  "flags": {},
1870
+ "order": 39,
1871
  "mode": 0,
1872
+ "inputs": [],
 
 
 
 
 
 
 
 
 
 
 
1873
  "outputs": [
1874
  {
1875
+ "name": "INT",
1876
+ "type": "INT",
1877
  "slot_index": 0,
1878
  "links": [
1879
+ 58
1880
  ]
1881
  }
1882
  ],
1883
  "properties": {
1884
  "cnr_id": "comfy-core",
1885
  "ver": "0.3.48",
1886
+ "Node name for S&R": "PrimitiveInt"
1887
  },
1888
+ "widgets_values": [
1889
+ 2048,
1890
+ "fixed"
1891
+ ],
1892
+ "title": "Selected output size"
1893
  },
1894
  {
1895
+ "id": 48,
1896
+ "type": "ImageScaleToMaxDimension",
1897
  "pos": [
1898
  1380,
1899
+ 430
1900
  ],
1901
  "size": [
1902
  280,
1903
+ 100
1904
  ],
1905
  "flags": {},
1906
+ "order": 40,
1907
  "mode": 0,
1908
  "inputs": [
1909
  {
1910
  "name": "image",
1911
  "type": "IMAGE",
1912
+ "link": 55
1913
  },
1914
  {
1915
+ "name": "largest_size",
1916
+ "type": "INT",
1917
+ "link": 58,
1918
+ "widget": {
1919
+ "name": "largest_size"
1920
+ }
1921
  }
1922
  ],
1923
  "outputs": [
1924
  {
1925
+ "name": "IMAGE",
1926
  "type": "IMAGE",
1927
  "slot_index": 0,
1928
  "links": [
1929
+ 59
1930
  ]
 
 
 
 
 
1931
  }
1932
  ],
1933
  "properties": {
1934
+ "cnr_id": "comfy-core",
1935
+ "ver": "0.3.48",
1936
+ "Node name for S&R": "ImageScaleToMaxDimension"
1937
  },
1938
+ "widgets_values": [
1939
+ "lanczos",
1940
+ 2048
1941
+ ],
1942
+ "title": "Scale output"
1943
  },
1944
  {
1945
+ "id": 49,
1946
+ "type": "ComfySwitchNode",
1947
  "pos": [
1948
+ 1720,
1949
  220
1950
  ],
1951
  "size": [
 
1953
  100
1954
  ],
1955
  "flags": {},
1956
+ "order": 41,
1957
  "mode": 0,
1958
  "inputs": [
1959
  {
1960
+ "name": "on_false",
1961
  "type": "IMAGE",
1962
+ "link": 56
1963
+ },
1964
+ {
1965
+ "name": "on_true",
1966
+ "type": "IMAGE",
1967
+ "link": 59
1968
+ },
1969
+ {
1970
+ "name": "switch",
1971
+ "type": "BOOLEAN",
1972
+ "link": 57,
1973
+ "widget": {
1974
+ "name": "switch"
1975
+ }
1976
  }
1977
  ],
1978
  "outputs": [
1979
  {
1980
+ "name": "output",
1981
  "type": "IMAGE",
1982
  "slot_index": 0,
1983
  "links": [
1984
+ 60
1985
  ]
1986
  }
1987
  ],
1988
  "properties": {
1989
  "cnr_id": "comfy-core",
1990
  "ver": "0.3.48",
1991
+ "Node name for S&R": "ComfySwitchNode"
1992
  },
1993
  "widgets_values": [
1994
+ false
 
1995
  ],
1996
+ "title": "Output size switch"
1997
  },
1998
  {
1999
+ "id": 50,
2000
  "type": "SaveImage",
2001
  "pos": [
2002
+ 2060,
2003
  -20
2004
  ],
2005
  "size": [
 
2007
  460
2008
  ],
2009
  "flags": {},
2010
+ "order": 42,
2011
  "mode": 0,
2012
  "inputs": [
2013
  {
2014
  "name": "images",
2015
  "type": "IMAGE",
2016
+ "link": 60
2017
  }
2018
  ],
2019
  "outputs": [],
 
2027
  ]
2028
  },
2029
  {
2030
+ "id": 51,
2031
  "type": "MarkdownNote",
2032
  "pos": [
2033
  -1500,
2034
+ -720
2035
  ],
2036
  "size": [
2037
+ 620,
2038
+ 380
2039
  ],
2040
  "flags": {},
2041
+ "order": 43,
2042
  "mode": 0,
2043
  "inputs": [],
2044
  "outputs": [],
 
2048
  "Node name for S&R": "MarkdownNote"
2049
  },
2050
  "widgets_values": [
2051
+ "## Qwen Edit Turbo v3 (rev 2)\n\n**2511 + Lightning toggle + input size normalization + output size control** (needs [Comfyui-QwenEditUtils](https://github.com/lrzjason/Comfyui-QwenEditUtils) + [ComfyUI-Custom-Scripts](https://github.com/pythongosssss/ComfyUI-Custom-Scripts))\n\n- **Lightning Mode** true = 4 steps / CFG 1.0 with the Lightning LoRA; false = 12 steps / CFG 3.0, no LoRA. Swap the LoRA widget + Steps (lightning) for the 8-step variant.\n- **upscale_input_to_max_size** (true): inputs smaller than *Input max size* are upscaled to it. **downscale_input_to_max_size** (true): larger inputs are downscaled to it. Both true = always render at max size (1536 main / 1024 ref). Both false = render at native input size. Applies to both image chains.\n- **upscale_output_to_selected_size** (false): scale the final image so its longest edge = *Selected output size* (2048). Off = output stays at render size. (For real detail gain use the qwen-edit-upscale-2k workflow on the output instead - this is plain lanczos.)\n- **Reference Image 2**: bypassed by default - Ctrl+B the purple group to enable for multi-image edits.\n- Aspect ratio is always preserved exactly (pad encode + CropWithPadInfo after decode).\n\n**Models** (all in [aleph65/ComfyUI](https://huggingface.co/aleph65/ComfyUI)): `qwen_image_edit_2511_bf16`, `qwen_2.5_vl_7b`, `qwen_image_vae`, Lightning 4/8-step loras\n"
2052
  ],
2053
  "title": "README"
2054
  }
 
2082
  4,
2083
  3,
2084
  0,
2085
+ 40,
2086
  0,
2087
  "CLIP"
2088
  ],
 
2090
  5,
2091
  4,
2092
  0,
2093
+ 40,
2094
  1,
2095
  "VAE"
2096
  ],
 
2098
  6,
2099
  4,
2100
  0,
2101
+ 44,
2102
  1,
2103
  "VAE"
2104
  ],
 
2119
  "BOOLEAN"
2120
  ],
2121
  [
2122
+ 9,
2123
+ 5,
2124
+ 0,
2125
+ 8,
2126
+ 2,
2127
+ "BOOLEAN"
2128
+ ],
2129
+ [
2130
+ 10,
2131
+ 9,
2132
+ 0,
2133
+ 7,
2134
+ 0,
2135
+ "INT"
2136
+ ],
2137
+ [
2138
+ 11,
2139
+ 10,
2140
+ 0,
2141
+ 7,
2142
+ 1,
2143
+ "INT"
2144
+ ],
2145
+ [
2146
+ 12,
2147
+ 11,
2148
+ 0,
2149
+ 8,
2150
+ 0,
2151
+ "FLOAT"
2152
+ ],
2153
+ [
2154
+ 13,
2155
+ 12,
2156
+ 0,
2157
+ 8,
2158
+ 1,
2159
+ "FLOAT"
2160
+ ],
2161
+ [
2162
+ 14,
2163
+ 6,
2164
+ 0,
2165
+ 13,
2166
+ 0,
2167
+ "MODEL"
2168
+ ],
2169
+ [
2170
+ 15,
2171
+ 7,
2172
+ 0,
2173
+ 43,
2174
+ 4,
2175
+ "INT"
2176
+ ],
2177
+ [
2178
+ 16,
2179
+ 8,
2180
+ 0,
2181
+ 43,
2182
+ 5,
2183
+ "FLOAT"
2184
+ ],
2185
+ [
2186
+ 17,
2187
+ 13,
2188
+ 0,
2189
+ 14,
2190
+ 0,
2191
+ "MODEL"
2192
+ ],
2193
+ [
2194
+ 18,
2195
+ 14,
2196
+ 0,
2197
+ 43,
2198
+ 0,
2199
+ "MODEL"
2200
+ ],
2201
+ [
2202
+ 19,
2203
+ 15,
2204
+ 0,
2205
+ 24,
2206
+ 2,
2207
+ "BOOLEAN"
2208
+ ],
2209
+ [
2210
+ 20,
2211
+ 15,
2212
+ 0,
2213
+ 34,
2214
+ 2,
2215
+ "BOOLEAN"
2216
+ ],
2217
+ [
2218
+ 21,
2219
+ 16,
2220
+ 0,
2221
+ 26,
2222
+ 2,
2223
+ "BOOLEAN"
2224
+ ],
2225
+ [
2226
+ 22,
2227
+ 16,
2228
+ 0,
2229
+ 36,
2230
+ 2,
2231
+ "BOOLEAN"
2232
+ ],
2233
+ [
2234
+ 23,
2235
+ 20,
2236
+ 0,
2237
+ 22,
2238
+ 0,
2239
+ "IMAGE"
2240
+ ],
2241
+ [
2242
+ 24,
2243
+ 20,
2244
+ 0,
2245
+ 23,
2246
+ 0,
2247
+ "IMAGE"
2248
+ ],
2249
+ [
2250
+ 25,
2251
+ 20,
2252
  0,
2253
+ 27,
2254
+ 0,
2255
+ "IMAGE"
2256
  ],
2257
  [
2258
+ 26,
2259
+ 21,
 
 
2260
  0,
2261
+ 23,
2262
+ 1,
2263
  "INT"
2264
  ],
2265
  [
2266
+ 27,
2267
+ 21,
2268
  0,
2269
+ 25,
2270
  1,
2271
  "INT"
2272
  ],
2273
  [
2274
+ 28,
2275
+ 22,
2276
  0,
2277
+ 24,
2278
  0,
2279
+ "INT"
2280
  ],
2281
  [
2282
+ 29,
2283
+ 23,
2284
  0,
2285
+ 24,
2286
  1,
2287
+ "INT"
2288
  ],
2289
  [
2290
+ 30,
2291
+ 24,
2292
  0,
2293
+ 25,
2294
  0,
2295
+ "INT"
2296
  ],
2297
  [
2298
+ 31,
2299
+ 24,
2300
+ 0,
2301
+ 26,
2302
  0,
 
 
2303
  "INT"
2304
  ],
2305
  [
2306
+ 32,
2307
+ 25,
2308
  0,
2309
+ 26,
2310
+ 1,
2311
+ "INT"
2312
  ],
2313
  [
2314
+ 33,
2315
+ 26,
2316
  0,
2317
+ 27,
2318
+ 1,
2319
+ "INT"
2320
+ ],
2321
+ [
2322
+ 34,
2323
+ 27,
2324
  0,
2325
+ 37,
2326
+ 1,
2327
+ "LIST"
2328
  ],
2329
  [
2330
+ 35,
2331
+ 30,
2332
  0,
2333
+ 32,
2334
  0,
2335
+ "IMAGE"
2336
  ],
2337
  [
2338
+ 36,
2339
+ 30,
2340
  0,
2341
+ 33,
2342
  0,
2343
  "IMAGE"
2344
  ],
2345
  [
2346
+ 37,
2347
+ 30,
2348
  0,
2349
+ 37,
2350
  0,
2351
  "IMAGE"
2352
  ],
2353
  [
2354
+ 38,
2355
+ 31,
2356
  0,
2357
+ 33,
2358
  1,
2359
  "INT"
2360
  ],
2361
  [
2362
+ 39,
2363
+ 31,
 
 
2364
  0,
2365
+ 35,
2366
+ 1,
2367
  "INT"
2368
  ],
2369
  [
2370
+ 40,
2371
+ 32,
2372
  0,
2373
+ 34,
2374
+ 0,
2375
+ "INT"
2376
  ],
2377
  [
2378
+ 41,
2379
+ 33,
2380
  0,
2381
+ 34,
2382
  1,
2383
  "INT"
2384
  ],
2385
  [
2386
+ 42,
2387
+ 34,
2388
  0,
2389
+ 35,
2390
+ 0,
2391
+ "INT"
2392
  ],
2393
  [
2394
+ 43,
2395
+ 34,
2396
  0,
2397
+ 36,
2398
  0,
2399
+ "INT"
2400
  ],
2401
  [
2402
+ 44,
2403
+ 35,
 
 
2404
  0,
2405
+ 36,
2406
+ 1,
2407
+ "INT"
2408
  ],
2409
  [
2410
+ 45,
2411
+ 36,
2412
  0,
2413
+ 37,
2414
  2,
2415
  "INT"
2416
  ],
2417
  [
2418
+ 46,
2419
+ 37,
2420
  0,
2421
+ 40,
2422
  2,
2423
  "LIST"
2424
  ],
2425
  [
2426
+ 47,
2427
+ 40,
2428
  0,
2429
+ 43,
2430
  1,
2431
  "CONDITIONING"
2432
  ],
2433
  [
2434
+ 48,
2435
+ 40,
2436
  0,
2437
+ 42,
2438
  0,
2439
  "CONDITIONING"
2440
  ],
2441
  [
2442
+ 49,
2443
+ 40,
2444
  1,
2445
+ 43,
2446
  3,
2447
  "LATENT"
2448
  ],
2449
  [
2450
+ 50,
2451
+ 40,
2452
  2,
2453
+ 41,
2454
  0,
2455
  "ANY"
2456
  ],
2457
  [
2458
+ 51,
 
 
2459
  41,
2460
+ 0,
2461
+ 45,
2462
  1,
2463
  "ANY"
2464
  ],
2465
  [
2466
+ 52,
2467
+ 42,
2468
  0,
2469
+ 43,
2470
  2,
2471
  "CONDITIONING"
2472
  ],
2473
  [
2474
+ 53,
2475
+ 43,
2476
  0,
2477
+ 44,
2478
  0,
2479
  "LATENT"
2480
  ],
2481
  [
2482
+ 54,
2483
+ 44,
2484
  0,
2485
+ 45,
2486
  0,
2487
  "IMAGE"
2488
  ],
2489
  [
2490
+ 55,
2491
+ 45,
2492
  0,
2493
+ 48,
2494
  0,
2495
  "IMAGE"
2496
  ],
2497
  [
2498
+ 56,
2499
+ 45,
2500
  0,
2501
+ 49,
2502
+ 0,
2503
+ "IMAGE"
2504
+ ],
2505
+ [
2506
+ 57,
2507
+ 46,
2508
+ 0,
2509
+ 49,
2510
+ 2,
2511
+ "BOOLEAN"
2512
+ ],
2513
+ [
2514
+ 58,
2515
+ 47,
2516
+ 0,
2517
+ 48,
2518
+ 1,
2519
+ "INT"
2520
+ ],
2521
+ [
2522
+ 59,
2523
+ 48,
2524
+ 0,
2525
+ 49,
2526
+ 1,
2527
+ "IMAGE"
2528
+ ],
2529
+ [
2530
+ 60,
2531
+ 49,
2532
+ 0,
2533
+ 50,
2534
  0,
2535
  "IMAGE"
2536
  ]
 
2541
  "title": "Models",
2542
  "bounding": [
2543
  -60,
2544
+ -700,
2545
  380,
2546
+ 640
2547
  ],
2548
  "color": "#3f789e",
2549
  "font_size": 24,
 
2554
  "title": "Lightning Toggle",
2555
  "bounding": [
2556
  340,
2557
+ -700,
2558
  660,
2559
+ 600
2560
  ],
2561
  "color": "#8A8",
2562
  "font_size": 24,
 
2564
  },
2565
  {
2566
  "id": 3,
2567
+ "title": "Input Size Toggles (both images)",
2568
  "bounding": [
2569
  -1520,
2570
+ -340,
2571
+ 380,
2572
+ 240
2573
  ],
2574
+ "color": "#8A8",
2575
  "font_size": 24,
2576
  "flags": {}
2577
  },
2578
  {
2579
  "id": 4,
2580
+ "title": "Main Image + Preprocessing",
2581
+ "bounding": [
2582
+ -1520,
2583
+ -100,
2584
+ 1600,
2585
+ 500
2586
+ ],
2587
+ "color": "#3f789e",
2588
+ "font_size": 24,
2589
+ "flags": {}
2590
+ },
2591
+ {
2592
+ "id": 5,
2593
  "title": "Optional 2nd Reference (Ctrl+B to enable)",
2594
  "bounding": [
2595
  -1520,
2596
+ 420,
2597
+ 1600,
2598
+ 500
2599
  ],
2600
  "color": "#a363d9",
2601
  "font_size": 24,
2602
  "flags": {}
2603
  },
2604
  {
2605
+ "id": 6,
2606
  "title": "Encode",
2607
  "bounding": [
2608
+ 100,
2609
  -40,
2610
+ 780,
2611
  640
2612
  ],
2613
  "color": "#3f789e",
 
2615
  "flags": {}
2616
  },
2617
  {
2618
+ "id": 7,
2619
  "title": "Sample + Output",
2620
  "bounding": [
2621
  1000,
2622
  -100,
2623
+ 1480,
2624
+ 680
2625
  ],
2626
  "color": "#b58b2a",
2627
  "font_size": 24,