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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "1": {
3
+ "class_type": "UNETLoader",
4
+ "inputs": {
5
+ "unet_name": "qwen_image_edit_2511_bf16.safetensors",
6
+ "weight_dtype": "default"
7
+ }
8
+ },
9
+ "13": {
10
+ "class_type": "ModelSamplingAuraFlow",
11
+ "inputs": {
12
+ "model": [
13
+ "53:6",
14
+ 0
15
+ ],
16
+ "shift": 3.1
17
+ }
18
+ },
19
+ "14": {
20
+ "class_type": "CFGNorm",
21
+ "inputs": {
22
+ "model": [
23
+ "13",
24
+ 0
25
+ ],
26
+ "pre_cfg": false,
27
+ "strength": 1
28
+ }
29
+ },
30
+ "15": {
31
+ "_meta": {
32
+ "title": "upscale_input_to_max_size"
33
+ },
34
+ "class_type": "PrimitiveBoolean",
35
+ "inputs": {
36
+ "value": true
37
+ }
38
+ },
39
+ "16": {
40
+ "_meta": {
41
+ "title": "downscale_input_to_max_size"
42
+ },
43
+ "class_type": "PrimitiveBoolean",
44
+ "inputs": {
45
+ "value": false
46
+ }
47
+ },
48
+ "20": {
49
+ "_meta": {
50
+ "title": "Main Image"
51
+ },
52
+ "class_type": "LoadImage",
53
+ "inputs": {
54
+ "image": "input.jpg"
55
+ }
56
+ },
57
+ "21": {
58
+ "_meta": {
59
+ "title": "Input max size (main)"
60
+ },
61
+ "class_type": "PrimitiveInt",
62
+ "inputs": {
63
+ "value": 2048
64
+ }
65
+ },
66
+ "27": {
67
+ "_meta": {
68
+ "title": "Main image config"
69
+ },
70
+ "class_type": "QwenEditConfigPreparer",
71
+ "inputs": {
72
+ "image": [
73
+ "902",
74
+ 0
75
+ ],
76
+ "ref_crop": "pad",
77
+ "ref_longest_edge": [
78
+ "54:5",
79
+ 0
80
+ ],
81
+ "ref_main_image": true,
82
+ "ref_upscale": "lanczos",
83
+ "to_ref": true,
84
+ "to_vl": true,
85
+ "vl_crop": "center",
86
+ "vl_resize": true,
87
+ "vl_target_size": 384,
88
+ "vl_upscale": "bicubic"
89
+ }
90
+ },
91
+ "3": {
92
+ "class_type": "CLIPLoader",
93
+ "inputs": {
94
+ "clip_name": "qwen_2.5_vl_7b.safetensors",
95
+ "device": "default",
96
+ "type": "qwen_image"
97
+ }
98
+ },
99
+ "30": {
100
+ "_meta": {
101
+ "title": "Reference Image 2 (optional)"
102
+ },
103
+ "class_type": "LoadImage",
104
+ "inputs": {
105
+ "image": "input.jpg"
106
+ }
107
+ },
108
+ "31": {
109
+ "_meta": {
110
+ "title": "Input max size (ref 2)"
111
+ },
112
+ "class_type": "PrimitiveInt",
113
+ "inputs": {
114
+ "value": 1024
115
+ }
116
+ },
117
+ "37": {
118
+ "_meta": {
119
+ "title": "Reference image 2 config"
120
+ },
121
+ "class_type": "QwenEditConfigPreparer",
122
+ "inputs": {
123
+ "configs": [
124
+ "27",
125
+ 0
126
+ ],
127
+ "image": [
128
+ "30",
129
+ 0
130
+ ],
131
+ "ref_crop": "center",
132
+ "ref_longest_edge": [
133
+ "55:5",
134
+ 0
135
+ ],
136
+ "ref_main_image": false,
137
+ "ref_upscale": "lanczos",
138
+ "to_ref": true,
139
+ "to_vl": true,
140
+ "vl_crop": "center",
141
+ "vl_resize": true,
142
+ "vl_target_size": 384,
143
+ "vl_upscale": "bicubic"
144
+ }
145
+ },
146
+ "4": {
147
+ "class_type": "VAELoader",
148
+ "inputs": {
149
+ "vae_name": "qwen_image_vae.safetensors"
150
+ }
151
+ },
152
+ "40": {
153
+ "_meta": {
154
+ "title": "Qwen Edit Encode (prompt here)"
155
+ },
156
+ "class_type": "TextEncodeQwenImageEditPlusCustom_lrzjason",
157
+ "inputs": {
158
+ "clip": [
159
+ "3",
160
+ 0
161
+ ],
162
+ "configs": [
163
+ "57",
164
+ 0
165
+ ],
166
+ "instruction": "",
167
+ "prompt": "Restore this image and enhance it in the style of plxrstyle",
168
+ "return_full_refs_cond": true,
169
+ "vae": [
170
+ "4",
171
+ 0
172
+ ]
173
+ }
174
+ },
175
+ "41": {
176
+ "class_type": "QwenEditOutputExtractor",
177
+ "inputs": {
178
+ "custom_output": [
179
+ "40",
180
+ 2
181
+ ]
182
+ }
183
+ },
184
+ "42": {
185
+ "_meta": {
186
+ "title": "Negative (zeroed)"
187
+ },
188
+ "class_type": "ConditioningZeroOut",
189
+ "inputs": {
190
+ "conditioning": [
191
+ "40",
192
+ 0
193
+ ]
194
+ }
195
+ },
196
+ "43": {
197
+ "class_type": "KSampler",
198
+ "inputs": {
199
+ "cfg": [
200
+ "53:14",
201
+ 0
202
+ ],
203
+ "denoise": 1,
204
+ "latent_image": [
205
+ "40",
206
+ 1
207
+ ],
208
+ "model": [
209
+ "14",
210
+ 0
211
+ ],
212
+ "negative": [
213
+ "42",
214
+ 0
215
+ ],
216
+ "positive": [
217
+ "40",
218
+ 0
219
+ ],
220
+ "sampler_name": "euler",
221
+ "scheduler": "simple",
222
+ "seed": 440984114065874,
223
+ "steps": [
224
+ "53:11",
225
+ 0
226
+ ]
227
+ }
228
+ },
229
+ "44": {
230
+ "class_type": "VAEDecode",
231
+ "inputs": {
232
+ "samples": [
233
+ "43",
234
+ 0
235
+ ],
236
+ "vae": [
237
+ "4",
238
+ 0
239
+ ]
240
+ }
241
+ },
242
+ "45": {
243
+ "_meta": {
244
+ "title": "Remove padding"
245
+ },
246
+ "class_type": "CropWithPadInfo",
247
+ "inputs": {
248
+ "image": [
249
+ "44",
250
+ 0
251
+ ],
252
+ "pad_info": [
253
+ "41",
254
+ 0
255
+ ]
256
+ }
257
+ },
258
+ "46": {
259
+ "_meta": {
260
+ "title": "upscale_output_to_selected_size"
261
+ },
262
+ "class_type": "PrimitiveBoolean",
263
+ "inputs": {
264
+ "value": true
265
+ }
266
+ },
267
+ "47": {
268
+ "_meta": {
269
+ "title": "Selected output size"
270
+ },
271
+ "class_type": "PrimitiveInt",
272
+ "inputs": {
273
+ "value": 2560
274
+ }
275
+ },
276
+ "48": {
277
+ "_meta": {
278
+ "title": "Scale output"
279
+ },
280
+ "class_type": "ImageScaleToMaxDimension",
281
+ "inputs": {
282
+ "image": [
283
+ "45",
284
+ 0
285
+ ],
286
+ "largest_size": [
287
+ "47",
288
+ 0
289
+ ],
290
+ "upscale_method": "lanczos"
291
+ }
292
+ },
293
+ "49": {
294
+ "_meta": {
295
+ "title": "Output size switch"
296
+ },
297
+ "class_type": "ComfySwitchNode",
298
+ "inputs": {
299
+ "on_false": [
300
+ "45",
301
+ 0
302
+ ],
303
+ "on_true": [
304
+ "48",
305
+ 0
306
+ ],
307
+ "switch": [
308
+ "46",
309
+ 0
310
+ ]
311
+ }
312
+ },
313
+ "5": {
314
+ "_meta": {
315
+ "title": "Sampling mode: 1=4-step / 2=8-step / 3=quality"
316
+ },
317
+ "class_type": "PrimitiveInt",
318
+ "inputs": {
319
+ "value": 2
320
+ }
321
+ },
322
+ "50": {
323
+ "class_type": "SaveImage",
324
+ "inputs": {
325
+ "filename_prefix": "qwen-edit-restore-v1",
326
+ "images": [
327
+ "49",
328
+ 0
329
+ ]
330
+ }
331
+ },
332
+ "52": {
333
+ "_meta": {
334
+ "title": "User LoRAs"
335
+ },
336
+ "class_type": "Power Lora Loader (rgthree)",
337
+ "inputs": {
338
+ "lora_1": {
339
+ "lora": "qwen_edit_2511_restore_plxrstyle_v1.safetensors",
340
+ "on": true,
341
+ "strength": 1,
342
+ "strengthTwo": null
343
+ },
344
+ "lora_2": {
345
+ "lora": "Qwen_LoRA_Amateur_Photo_v1.safetensors",
346
+ "on": false,
347
+ "strength": 1,
348
+ "strengthTwo": null
349
+ },
350
+ "model": [
351
+ "1",
352
+ 0
353
+ ]
354
+ }
355
+ },
356
+ "53:1": {
357
+ "_meta": {
358
+ "title": "LoRA: Lightning 4 steps"
359
+ },
360
+ "class_type": "LoraLoaderModelOnly",
361
+ "inputs": {
362
+ "lora_name": "Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors",
363
+ "model": [
364
+ "52",
365
+ 0
366
+ ],
367
+ "strength_model": 1
368
+ }
369
+ },
370
+ "53:10": {
371
+ "_meta": {
372
+ "title": "Steps switch 4/8"
373
+ },
374
+ "class_type": "ComfySwitchNode",
375
+ "inputs": {
376
+ "on_false": [
377
+ "53:7",
378
+ 0
379
+ ],
380
+ "on_true": [
381
+ "53:8",
382
+ 0
383
+ ],
384
+ "switch": [
385
+ "53:3",
386
+ 2
387
+ ]
388
+ }
389
+ },
390
+ "53:11": {
391
+ "_meta": {
392
+ "title": "Steps switch quality"
393
+ },
394
+ "class_type": "ComfySwitchNode",
395
+ "inputs": {
396
+ "on_false": [
397
+ "53:10",
398
+ 0
399
+ ],
400
+ "on_true": [
401
+ "53:9",
402
+ 0
403
+ ],
404
+ "switch": [
405
+ "53:4",
406
+ 2
407
+ ]
408
+ }
409
+ },
410
+ "53:12": {
411
+ "_meta": {
412
+ "title": "CFG (lightning)"
413
+ },
414
+ "class_type": "PrimitiveFloat",
415
+ "inputs": {
416
+ "value": 1.0
417
+ }
418
+ },
419
+ "53:13": {
420
+ "_meta": {
421
+ "title": "CFG (quality)"
422
+ },
423
+ "class_type": "PrimitiveFloat",
424
+ "inputs": {
425
+ "value": 3.0
426
+ }
427
+ },
428
+ "53:14": {
429
+ "_meta": {
430
+ "title": "CFG switch"
431
+ },
432
+ "class_type": "ComfySwitchNode",
433
+ "inputs": {
434
+ "on_false": [
435
+ "53:12",
436
+ 0
437
+ ],
438
+ "on_true": [
439
+ "53:13",
440
+ 0
441
+ ],
442
+ "switch": [
443
+ "53:4",
444
+ 2
445
+ ]
446
+ }
447
+ },
448
+ "53:2": {
449
+ "_meta": {
450
+ "title": "LoRA: Lightning 8 steps"
451
+ },
452
+ "class_type": "LoraLoaderModelOnly",
453
+ "inputs": {
454
+ "lora_name": "Qwen-Image-Edit-2511-Lightning-8steps-V1.0-bf16.safetensors",
455
+ "model": [
456
+ "52",
457
+ 0
458
+ ],
459
+ "strength_model": 1
460
+ }
461
+ },
462
+ "53:3": {
463
+ "_meta": {
464
+ "title": "is 8-step (mode == 2)"
465
+ },
466
+ "class_type": "ComfyMathExpression",
467
+ "inputs": {
468
+ "expression": "a == 2",
469
+ "values.a": [
470
+ "5",
471
+ 0
472
+ ]
473
+ }
474
+ },
475
+ "53:4": {
476
+ "_meta": {
477
+ "title": "is quality (mode == 3)"
478
+ },
479
+ "class_type": "ComfyMathExpression",
480
+ "inputs": {
481
+ "expression": "a == 3",
482
+ "values.a": [
483
+ "5",
484
+ 0
485
+ ]
486
+ }
487
+ },
488
+ "53:5": {
489
+ "_meta": {
490
+ "title": "Model switch 4/8"
491
+ },
492
+ "class_type": "ComfySwitchNode",
493
+ "inputs": {
494
+ "on_false": [
495
+ "53:1",
496
+ 0
497
+ ],
498
+ "on_true": [
499
+ "53:2",
500
+ 0
501
+ ],
502
+ "switch": [
503
+ "53:3",
504
+ 2
505
+ ]
506
+ }
507
+ },
508
+ "53:6": {
509
+ "_meta": {
510
+ "title": "Model switch quality"
511
+ },
512
+ "class_type": "ComfySwitchNode",
513
+ "inputs": {
514
+ "on_false": [
515
+ "53:5",
516
+ 0
517
+ ],
518
+ "on_true": [
519
+ "52",
520
+ 0
521
+ ],
522
+ "switch": [
523
+ "53:4",
524
+ 2
525
+ ]
526
+ }
527
+ },
528
+ "53:7": {
529
+ "_meta": {
530
+ "title": "Steps (4-step)"
531
+ },
532
+ "class_type": "PrimitiveInt",
533
+ "inputs": {
534
+ "value": 4
535
+ }
536
+ },
537
+ "53:8": {
538
+ "_meta": {
539
+ "title": "Steps (8-step)"
540
+ },
541
+ "class_type": "PrimitiveInt",
542
+ "inputs": {
543
+ "value": 8
544
+ }
545
+ },
546
+ "53:9": {
547
+ "_meta": {
548
+ "title": "Steps (quality)"
549
+ },
550
+ "class_type": "PrimitiveInt",
551
+ "inputs": {
552
+ "value": 12
553
+ }
554
+ },
555
+ "54:1": {
556
+ "_meta": {
557
+ "title": "native edge"
558
+ },
559
+ "class_type": "MathExpression|pysssss",
560
+ "inputs": {
561
+ "a": [
562
+ "20",
563
+ 0
564
+ ],
565
+ "expression": "max(a.width, a.height)"
566
+ }
567
+ },
568
+ "54:2": {
569
+ "_meta": {
570
+ "title": "upscaled edge"
571
+ },
572
+ "class_type": "MathExpression|pysssss",
573
+ "inputs": {
574
+ "a": [
575
+ "20",
576
+ 0
577
+ ],
578
+ "c": [
579
+ "21",
580
+ 0
581
+ ],
582
+ "expression": "max(a.width, a.height, c)"
583
+ }
584
+ },
585
+ "54:3": {
586
+ "_meta": {
587
+ "title": "apply upscale"
588
+ },
589
+ "class_type": "ComfySwitchNode",
590
+ "inputs": {
591
+ "on_false": [
592
+ "54:1",
593
+ 0
594
+ ],
595
+ "on_true": [
596
+ "54:2",
597
+ 0
598
+ ],
599
+ "switch": [
600
+ "15",
601
+ 0
602
+ ]
603
+ }
604
+ },
605
+ "54:4": {
606
+ "_meta": {
607
+ "title": "downscaled edge"
608
+ },
609
+ "class_type": "MathExpression|pysssss",
610
+ "inputs": {
611
+ "a": [
612
+ "54:3",
613
+ 0
614
+ ],
615
+ "c": [
616
+ "21",
617
+ 0
618
+ ],
619
+ "expression": "min(a, c)"
620
+ }
621
+ },
622
+ "54:5": {
623
+ "_meta": {
624
+ "title": "apply downscale"
625
+ },
626
+ "class_type": "ComfySwitchNode",
627
+ "inputs": {
628
+ "on_false": [
629
+ "54:3",
630
+ 0
631
+ ],
632
+ "on_true": [
633
+ "54:4",
634
+ 0
635
+ ],
636
+ "switch": [
637
+ "16",
638
+ 0
639
+ ]
640
+ }
641
+ },
642
+ "55:1": {
643
+ "_meta": {
644
+ "title": "native edge"
645
+ },
646
+ "class_type": "MathExpression|pysssss",
647
+ "inputs": {
648
+ "a": [
649
+ "30",
650
+ 0
651
+ ],
652
+ "expression": "max(a.width, a.height)"
653
+ }
654
+ },
655
+ "55:2": {
656
+ "_meta": {
657
+ "title": "upscaled edge"
658
+ },
659
+ "class_type": "MathExpression|pysssss",
660
+ "inputs": {
661
+ "a": [
662
+ "30",
663
+ 0
664
+ ],
665
+ "c": [
666
+ "31",
667
+ 0
668
+ ],
669
+ "expression": "max(a.width, a.height, c)"
670
+ }
671
+ },
672
+ "55:3": {
673
+ "_meta": {
674
+ "title": "apply upscale"
675
+ },
676
+ "class_type": "ComfySwitchNode",
677
+ "inputs": {
678
+ "on_false": [
679
+ "55:1",
680
+ 0
681
+ ],
682
+ "on_true": [
683
+ "55:2",
684
+ 0
685
+ ],
686
+ "switch": [
687
+ "15",
688
+ 0
689
+ ]
690
+ }
691
+ },
692
+ "55:4": {
693
+ "_meta": {
694
+ "title": "downscaled edge"
695
+ },
696
+ "class_type": "MathExpression|pysssss",
697
+ "inputs": {
698
+ "a": [
699
+ "55:3",
700
+ 0
701
+ ],
702
+ "c": [
703
+ "31",
704
+ 0
705
+ ],
706
+ "expression": "min(a, c)"
707
+ }
708
+ },
709
+ "55:5": {
710
+ "_meta": {
711
+ "title": "apply downscale"
712
+ },
713
+ "class_type": "ComfySwitchNode",
714
+ "inputs": {
715
+ "on_false": [
716
+ "55:3",
717
+ 0
718
+ ],
719
+ "on_true": [
720
+ "55:4",
721
+ 0
722
+ ],
723
+ "switch": [
724
+ "16",
725
+ 0
726
+ ]
727
+ }
728
+ },
729
+ "56": {
730
+ "_meta": {
731
+ "title": "Use Reference Image 2"
732
+ },
733
+ "class_type": "PrimitiveBoolean",
734
+ "inputs": {
735
+ "value": false
736
+ }
737
+ },
738
+ "57": {
739
+ "_meta": {
740
+ "title": "Ref 2 on/off switch"
741
+ },
742
+ "class_type": "ComfySwitchNode",
743
+ "inputs": {
744
+ "on_false": [
745
+ "27",
746
+ 0
747
+ ],
748
+ "on_true": [
749
+ "37",
750
+ 0
751
+ ],
752
+ "switch": [
753
+ "56",
754
+ 0
755
+ ]
756
+ }
757
+ },
758
+ "900": {
759
+ "class_type": "PrimitiveBoolean",
760
+ "inputs": {
761
+ "value": false
762
+ }
763
+ },
764
+ "901": {
765
+ "class_type": "PLXRDeteriorate",
766
+ "inputs": {
767
+ "image": [
768
+ "20",
769
+ 0
770
+ ],
771
+ "family": "random",
772
+ "severity_min": 0.35,
773
+ "severity_max": 0.85,
774
+ "seed": 0,
775
+ "use_person_mask": true
776
+ }
777
+ },
778
+ "902": {
779
+ "class_type": "ComfySwitchNode",
780
+ "inputs": {
781
+ "on_false": [
782
+ "20",
783
+ 0
784
+ ],
785
+ "on_true": [
786
+ "901",
787
+ 0
788
+ ],
789
+ "switch": [
790
+ "900",
791
+ 0
792
+ ]
793
+ }
794
+ }
795
+ }