aleph65 commited on
Commit
ffb3533
·
verified ·
1 Parent(s): 918d33c

Add qwen-edit-nsfw-v4 API workflow

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