aleph65 commited on
Commit
afe5752
·
verified ·
1 Parent(s): 6a08a93

Add flux2-bg-inpaint workflow

Browse files
Files changed (1) hide show
  1. workflows/flux2-bg-inpaint.json +1378 -0
workflows/flux2-bg-inpaint.json ADDED
@@ -0,0 +1,1378 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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 340,
16
+ 82
17
+ ],
18
+ "flags": {},
19
+ "order": 1,
20
+ "mode": 0,
21
+ "inputs": [],
22
+ "outputs": [
23
+ {
24
+ "name": "MODEL",
25
+ "type": "MODEL",
26
+ "slot_index": 0,
27
+ "links": [
28
+ 13
29
+ ]
30
+ }
31
+ ],
32
+ "properties": {
33
+ "Node name for S&R": "UNETLoader",
34
+ "cnr_id": "comfy-core",
35
+ "ver": "0.3.48"
36
+ },
37
+ "widgets_values": [
38
+ "flux-2-klein-9b.safetensors",
39
+ "default"
40
+ ],
41
+ "title": "Load Flux2 Klein"
42
+ },
43
+ {
44
+ "id": 2,
45
+ "type": "CLIPLoader",
46
+ "pos": [
47
+ -40,
48
+ -360
49
+ ],
50
+ "size": [
51
+ 340,
52
+ 110
53
+ ],
54
+ "flags": {},
55
+ "order": 2,
56
+ "mode": 0,
57
+ "inputs": [],
58
+ "outputs": [
59
+ {
60
+ "name": "CLIP",
61
+ "type": "CLIP",
62
+ "slot_index": 0,
63
+ "links": [
64
+ 9
65
+ ]
66
+ }
67
+ ],
68
+ "properties": {
69
+ "Node name for S&R": "CLIPLoader",
70
+ "cnr_id": "comfy-core",
71
+ "ver": "0.3.48"
72
+ },
73
+ "widgets_values": [
74
+ "qwen_3_8b_fp8mixed.safetensors",
75
+ "flux2",
76
+ "default"
77
+ ]
78
+ },
79
+ {
80
+ "id": 3,
81
+ "type": "VAELoader",
82
+ "pos": [
83
+ -40,
84
+ -200
85
+ ],
86
+ "size": [
87
+ 340,
88
+ 60
89
+ ],
90
+ "flags": {},
91
+ "order": 3,
92
+ "mode": 0,
93
+ "inputs": [],
94
+ "outputs": [
95
+ {
96
+ "name": "VAE",
97
+ "type": "VAE",
98
+ "slot_index": 0,
99
+ "links": [
100
+ 3,
101
+ 25
102
+ ]
103
+ }
104
+ ],
105
+ "properties": {
106
+ "Node name for S&R": "VAELoader",
107
+ "cnr_id": "comfy-core",
108
+ "ver": "0.3.48"
109
+ },
110
+ "widgets_values": [
111
+ "flux2-vae.safetensors"
112
+ ]
113
+ },
114
+ {
115
+ "id": 4,
116
+ "type": "LoadImage",
117
+ "pos": [
118
+ -40,
119
+ -60
120
+ ],
121
+ "size": [
122
+ 270,
123
+ 330
124
+ ],
125
+ "flags": {},
126
+ "order": 4,
127
+ "mode": 0,
128
+ "inputs": [],
129
+ "outputs": [
130
+ {
131
+ "name": "IMAGE",
132
+ "type": "IMAGE",
133
+ "slot_index": 0,
134
+ "links": [
135
+ 1,
136
+ 4,
137
+ 27,
138
+ 29
139
+ ]
140
+ },
141
+ {
142
+ "name": "MASK",
143
+ "type": "MASK",
144
+ "slot_index": 0,
145
+ "links": []
146
+ }
147
+ ],
148
+ "properties": {
149
+ "Node name for S&R": "LoadImage",
150
+ "cnr_id": "comfy-core",
151
+ "ver": "0.3.48"
152
+ },
153
+ "widgets_values": [
154
+ "example.png",
155
+ "image"
156
+ ],
157
+ "title": "Main Image"
158
+ },
159
+ {
160
+ "id": 5,
161
+ "type": "ImageResizeKJ",
162
+ "pos": [
163
+ 300,
164
+ -60
165
+ ],
166
+ "size": [
167
+ 300,
168
+ 190
169
+ ],
170
+ "flags": {},
171
+ "order": 5,
172
+ "mode": 0,
173
+ "inputs": [
174
+ {
175
+ "name": "image",
176
+ "type": "IMAGE",
177
+ "link": 1
178
+ },
179
+ {
180
+ "name": "get_image_size",
181
+ "type": "IMAGE",
182
+ "link": null,
183
+ "shape": 7
184
+ }
185
+ ],
186
+ "outputs": [
187
+ {
188
+ "name": "IMAGE",
189
+ "type": "IMAGE",
190
+ "slot_index": 0,
191
+ "links": [
192
+ 2
193
+ ]
194
+ },
195
+ {
196
+ "name": "width",
197
+ "type": "INT",
198
+ "slot_index": 0,
199
+ "links": [
200
+ 16
201
+ ]
202
+ },
203
+ {
204
+ "name": "height",
205
+ "type": "INT",
206
+ "slot_index": 0,
207
+ "links": [
208
+ 17
209
+ ]
210
+ }
211
+ ],
212
+ "properties": {
213
+ "Node name for S&R": "ImageResizeKJ",
214
+ "cnr_id": "comfyui-kjnodes",
215
+ "aux_id": "kijai/ComfyUI-KJNodes",
216
+ "ver": "1.2.5"
217
+ },
218
+ "widgets_values": [
219
+ 0,
220
+ 0,
221
+ "lanczos",
222
+ false,
223
+ 16,
224
+ "disabled"
225
+ ],
226
+ "title": "Fit to /16"
227
+ },
228
+ {
229
+ "id": 6,
230
+ "type": "VAEEncode",
231
+ "pos": [
232
+ 640,
233
+ -60
234
+ ],
235
+ "size": [
236
+ 210,
237
+ 60
238
+ ],
239
+ "flags": {},
240
+ "order": 6,
241
+ "mode": 0,
242
+ "inputs": [
243
+ {
244
+ "name": "pixels",
245
+ "type": "IMAGE",
246
+ "link": 2
247
+ },
248
+ {
249
+ "name": "vae",
250
+ "type": "VAE",
251
+ "link": 3
252
+ }
253
+ ],
254
+ "outputs": [
255
+ {
256
+ "name": "LATENT",
257
+ "type": "LATENT",
258
+ "slot_index": 0,
259
+ "links": [
260
+ 7,
261
+ 11
262
+ ]
263
+ }
264
+ ],
265
+ "properties": {
266
+ "Node name for S&R": "VAEEncode",
267
+ "cnr_id": "comfy-core",
268
+ "ver": "0.3.48"
269
+ },
270
+ "widgets_values": []
271
+ },
272
+ {
273
+ "id": 7,
274
+ "type": "SAM3Segment",
275
+ "pos": [
276
+ 300,
277
+ 320
278
+ ],
279
+ "size": [
280
+ 300,
281
+ 320
282
+ ],
283
+ "flags": {},
284
+ "order": 7,
285
+ "mode": 0,
286
+ "inputs": [
287
+ {
288
+ "name": "image",
289
+ "type": "IMAGE",
290
+ "link": 4
291
+ }
292
+ ],
293
+ "outputs": [
294
+ {
295
+ "name": "IMAGE",
296
+ "type": "IMAGE",
297
+ "slot_index": 0,
298
+ "links": []
299
+ },
300
+ {
301
+ "name": "MASK",
302
+ "type": "MASK",
303
+ "slot_index": 0,
304
+ "links": [
305
+ 5,
306
+ 6
307
+ ]
308
+ },
309
+ {
310
+ "name": "MASK_IMAGE",
311
+ "type": "IMAGE",
312
+ "slot_index": 0,
313
+ "links": []
314
+ }
315
+ ],
316
+ "properties": {
317
+ "Node name for S&R": "SAM3Segment",
318
+ "cnr_id": "comfyui-rmbg",
319
+ "aux_id": "1038lab/ComfyUI-RMBG",
320
+ "ver": "3.0.0"
321
+ },
322
+ "widgets_values": [
323
+ "person",
324
+ "Merged",
325
+ 0.5,
326
+ 0,
327
+ 0,
328
+ 0,
329
+ 0,
330
+ "Auto",
331
+ false,
332
+ false,
333
+ "Alpha",
334
+ "#222222"
335
+ ],
336
+ "title": "Segment PERSON (SAM3)"
337
+ },
338
+ {
339
+ "id": 8,
340
+ "type": "GrowMaskWithBlur",
341
+ "pos": [
342
+ 640,
343
+ 320
344
+ ],
345
+ "size": [
346
+ 300,
347
+ 250
348
+ ],
349
+ "flags": {},
350
+ "order": 8,
351
+ "mode": 0,
352
+ "inputs": [
353
+ {
354
+ "name": "mask",
355
+ "type": "MASK",
356
+ "link": 5
357
+ }
358
+ ],
359
+ "outputs": [
360
+ {
361
+ "name": "mask",
362
+ "type": "MASK",
363
+ "slot_index": 0,
364
+ "links": []
365
+ },
366
+ {
367
+ "name": "mask_inverted",
368
+ "type": "MASK",
369
+ "slot_index": 0,
370
+ "links": [
371
+ 8
372
+ ]
373
+ }
374
+ ],
375
+ "properties": {
376
+ "Node name for S&R": "GrowMaskWithBlur",
377
+ "cnr_id": "comfyui-kjnodes",
378
+ "aux_id": "kijai/ComfyUI-KJNodes",
379
+ "ver": "1.2.5"
380
+ },
381
+ "widgets_values": [
382
+ -4,
383
+ 0.0,
384
+ true,
385
+ false,
386
+ 8.0,
387
+ 1.0,
388
+ 1.0,
389
+ true
390
+ ],
391
+ "title": "Background mask (inverted)"
392
+ },
393
+ {
394
+ "id": 9,
395
+ "type": "SetLatentNoiseMask",
396
+ "pos": [
397
+ 900,
398
+ -60
399
+ ],
400
+ "size": [
401
+ 240,
402
+ 70
403
+ ],
404
+ "flags": {},
405
+ "order": 9,
406
+ "mode": 0,
407
+ "inputs": [
408
+ {
409
+ "name": "samples",
410
+ "type": "LATENT",
411
+ "link": 7
412
+ },
413
+ {
414
+ "name": "mask",
415
+ "type": "MASK",
416
+ "link": 8
417
+ }
418
+ ],
419
+ "outputs": [
420
+ {
421
+ "name": "LATENT",
422
+ "type": "LATENT",
423
+ "slot_index": 0,
424
+ "links": [
425
+ 23
426
+ ]
427
+ }
428
+ ],
429
+ "properties": {
430
+ "Node name for S&R": "SetLatentNoiseMask",
431
+ "cnr_id": "comfy-core",
432
+ "ver": "0.3.48"
433
+ },
434
+ "widgets_values": []
435
+ },
436
+ {
437
+ "id": 10,
438
+ "type": "CLIPTextEncode",
439
+ "pos": [
440
+ 300,
441
+ -420
442
+ ],
443
+ "size": [
444
+ 380,
445
+ 160
446
+ ],
447
+ "flags": {},
448
+ "order": 10,
449
+ "mode": 0,
450
+ "inputs": [
451
+ {
452
+ "name": "clip",
453
+ "type": "CLIP",
454
+ "link": 9
455
+ }
456
+ ],
457
+ "outputs": [
458
+ {
459
+ "name": "CONDITIONING",
460
+ "type": "CONDITIONING",
461
+ "slot_index": 0,
462
+ "links": [
463
+ 10,
464
+ 12
465
+ ]
466
+ }
467
+ ],
468
+ "properties": {
469
+ "Node name for S&R": "CLIPTextEncode",
470
+ "cnr_id": "comfy-core",
471
+ "ver": "0.3.48"
472
+ },
473
+ "widgets_values": [
474
+ "sharp photorealistic background, same scene, evenly lit, uniform soft lighting matching the subject, no added shadows, no vignetting, crisp focus, fine natural texture, clean detail, no blur, no artifacts, high detail, 4k"
475
+ ],
476
+ "title": "Background prompt"
477
+ },
478
+ {
479
+ "id": 11,
480
+ "type": "ReferenceLatent",
481
+ "pos": [
482
+ 700,
483
+ -420
484
+ ],
485
+ "size": [
486
+ 240,
487
+ 70
488
+ ],
489
+ "flags": {},
490
+ "order": 11,
491
+ "mode": 0,
492
+ "inputs": [
493
+ {
494
+ "name": "conditioning",
495
+ "type": "CONDITIONING",
496
+ "link": 10
497
+ },
498
+ {
499
+ "name": "latent",
500
+ "type": "LATENT",
501
+ "link": 11,
502
+ "shape": 7
503
+ }
504
+ ],
505
+ "outputs": [
506
+ {
507
+ "name": "CONDITIONING",
508
+ "type": "CONDITIONING",
509
+ "slot_index": 0,
510
+ "links": [
511
+ 14
512
+ ]
513
+ }
514
+ ],
515
+ "properties": {
516
+ "Node name for S&R": "ReferenceLatent",
517
+ "cnr_id": "comfy-core",
518
+ "ver": "0.3.48"
519
+ },
520
+ "widgets_values": []
521
+ },
522
+ {
523
+ "id": 12,
524
+ "type": "ConditioningZeroOut",
525
+ "pos": [
526
+ 700,
527
+ -520
528
+ ],
529
+ "size": [
530
+ 280,
531
+ 50
532
+ ],
533
+ "flags": {},
534
+ "order": 12,
535
+ "mode": 0,
536
+ "inputs": [
537
+ {
538
+ "name": "conditioning",
539
+ "type": "CONDITIONING",
540
+ "link": 12
541
+ }
542
+ ],
543
+ "outputs": [
544
+ {
545
+ "name": "CONDITIONING",
546
+ "type": "CONDITIONING",
547
+ "slot_index": 0,
548
+ "links": [
549
+ 15
550
+ ]
551
+ }
552
+ ],
553
+ "properties": {
554
+ "Node name for S&R": "ConditioningZeroOut",
555
+ "cnr_id": "comfy-core",
556
+ "ver": "0.3.48"
557
+ },
558
+ "widgets_values": [],
559
+ "title": "Negative (zeroed)"
560
+ },
561
+ {
562
+ "id": 13,
563
+ "type": "CFGGuider",
564
+ "pos": [
565
+ 1000,
566
+ -420
567
+ ],
568
+ "size": [
569
+ 280,
570
+ 120
571
+ ],
572
+ "flags": {},
573
+ "order": 13,
574
+ "mode": 0,
575
+ "inputs": [
576
+ {
577
+ "name": "model",
578
+ "type": "MODEL",
579
+ "link": 13
580
+ },
581
+ {
582
+ "name": "positive",
583
+ "type": "CONDITIONING",
584
+ "link": 14
585
+ },
586
+ {
587
+ "name": "negative",
588
+ "type": "CONDITIONING",
589
+ "link": 15
590
+ }
591
+ ],
592
+ "outputs": [
593
+ {
594
+ "name": "GUIDER",
595
+ "type": "GUIDER",
596
+ "slot_index": 0,
597
+ "links": [
598
+ 20
599
+ ]
600
+ }
601
+ ],
602
+ "properties": {
603
+ "Node name for S&R": "CFGGuider",
604
+ "cnr_id": "comfy-core",
605
+ "ver": "0.3.48"
606
+ },
607
+ "widgets_values": [
608
+ 1.0
609
+ ]
610
+ },
611
+ {
612
+ "id": 14,
613
+ "type": "Flux2Scheduler",
614
+ "pos": [
615
+ 1000,
616
+ -240
617
+ ],
618
+ "size": [
619
+ 280,
620
+ 120
621
+ ],
622
+ "flags": {},
623
+ "order": 14,
624
+ "mode": 0,
625
+ "inputs": [
626
+ {
627
+ "name": "width",
628
+ "type": "INT",
629
+ "link": 16,
630
+ "widget": {
631
+ "name": "width"
632
+ }
633
+ },
634
+ {
635
+ "name": "height",
636
+ "type": "INT",
637
+ "link": 17,
638
+ "widget": {
639
+ "name": "height"
640
+ }
641
+ }
642
+ ],
643
+ "outputs": [
644
+ {
645
+ "name": "SIGMAS",
646
+ "type": "SIGMAS",
647
+ "slot_index": 0,
648
+ "links": [
649
+ 18
650
+ ]
651
+ }
652
+ ],
653
+ "properties": {
654
+ "Node name for S&R": "Flux2Scheduler",
655
+ "cnr_id": "comfy-core",
656
+ "ver": "0.3.48"
657
+ },
658
+ "widgets_values": [
659
+ 8,
660
+ 1024,
661
+ 1024
662
+ ]
663
+ },
664
+ {
665
+ "id": 24,
666
+ "type": "SplitSigmasDenoise",
667
+ "pos": [
668
+ 1000,
669
+ -160
670
+ ],
671
+ "size": [
672
+ 280,
673
+ 90
674
+ ],
675
+ "flags": {},
676
+ "order": 24,
677
+ "mode": 0,
678
+ "inputs": [
679
+ {
680
+ "name": "sigmas",
681
+ "type": "SIGMAS",
682
+ "link": 18
683
+ }
684
+ ],
685
+ "outputs": [
686
+ {
687
+ "name": "high_sigmas",
688
+ "type": "SIGMAS",
689
+ "slot_index": 0,
690
+ "links": []
691
+ },
692
+ {
693
+ "name": "low_sigmas",
694
+ "type": "SIGMAS",
695
+ "slot_index": 0,
696
+ "links": [
697
+ 22
698
+ ]
699
+ }
700
+ ],
701
+ "properties": {
702
+ "Node name for S&R": "SplitSigmasDenoise",
703
+ "cnr_id": "comfy-core",
704
+ "ver": "0.3.48"
705
+ },
706
+ "widgets_values": [
707
+ 1.0
708
+ ],
709
+ "title": "partial denoise"
710
+ },
711
+ {
712
+ "id": 15,
713
+ "type": "KSamplerSelect",
714
+ "pos": [
715
+ 1000,
716
+ -80
717
+ ],
718
+ "size": [
719
+ 280,
720
+ 60
721
+ ],
722
+ "flags": {},
723
+ "order": 15,
724
+ "mode": 0,
725
+ "inputs": [],
726
+ "outputs": [
727
+ {
728
+ "name": "SAMPLER",
729
+ "type": "SAMPLER",
730
+ "slot_index": 0,
731
+ "links": [
732
+ 21
733
+ ]
734
+ }
735
+ ],
736
+ "properties": {
737
+ "Node name for S&R": "KSamplerSelect",
738
+ "cnr_id": "comfy-core",
739
+ "ver": "0.3.48"
740
+ },
741
+ "widgets_values": [
742
+ "euler"
743
+ ]
744
+ },
745
+ {
746
+ "id": 16,
747
+ "type": "RandomNoise",
748
+ "pos": [
749
+ 1000,
750
+ 20
751
+ ],
752
+ "size": [
753
+ 280,
754
+ 90
755
+ ],
756
+ "flags": {},
757
+ "order": 16,
758
+ "mode": 0,
759
+ "inputs": [],
760
+ "outputs": [
761
+ {
762
+ "name": "NOISE",
763
+ "type": "NOISE",
764
+ "slot_index": 0,
765
+ "links": [
766
+ 19
767
+ ]
768
+ }
769
+ ],
770
+ "properties": {
771
+ "Node name for S&R": "RandomNoise",
772
+ "cnr_id": "comfy-core",
773
+ "ver": "0.3.48"
774
+ },
775
+ "widgets_values": [
776
+ 156680208700286,
777
+ "randomize"
778
+ ]
779
+ },
780
+ {
781
+ "id": 17,
782
+ "type": "SamplerCustomAdvanced",
783
+ "pos": [
784
+ 1340,
785
+ -420
786
+ ],
787
+ "size": [
788
+ 300,
789
+ 160
790
+ ],
791
+ "flags": {},
792
+ "order": 17,
793
+ "mode": 0,
794
+ "inputs": [
795
+ {
796
+ "name": "noise",
797
+ "type": "NOISE",
798
+ "link": 19
799
+ },
800
+ {
801
+ "name": "guider",
802
+ "type": "GUIDER",
803
+ "link": 20
804
+ },
805
+ {
806
+ "name": "sampler",
807
+ "type": "SAMPLER",
808
+ "link": 21
809
+ },
810
+ {
811
+ "name": "sigmas",
812
+ "type": "SIGMAS",
813
+ "link": 22
814
+ },
815
+ {
816
+ "name": "latent_image",
817
+ "type": "LATENT",
818
+ "link": 23
819
+ }
820
+ ],
821
+ "outputs": [
822
+ {
823
+ "name": "output",
824
+ "type": "LATENT",
825
+ "slot_index": 0,
826
+ "links": [
827
+ 24
828
+ ]
829
+ },
830
+ {
831
+ "name": "denoised_output",
832
+ "type": "LATENT",
833
+ "slot_index": 0,
834
+ "links": []
835
+ }
836
+ ],
837
+ "properties": {
838
+ "Node name for S&R": "SamplerCustomAdvanced",
839
+ "cnr_id": "comfy-core",
840
+ "ver": "0.3.48"
841
+ },
842
+ "widgets_values": []
843
+ },
844
+ {
845
+ "id": 18,
846
+ "type": "VAEDecode",
847
+ "pos": [
848
+ 1680,
849
+ -420
850
+ ],
851
+ "size": [
852
+ 210,
853
+ 50
854
+ ],
855
+ "flags": {},
856
+ "order": 18,
857
+ "mode": 0,
858
+ "inputs": [
859
+ {
860
+ "name": "samples",
861
+ "type": "LATENT",
862
+ "link": 24
863
+ },
864
+ {
865
+ "name": "vae",
866
+ "type": "VAE",
867
+ "link": 25
868
+ }
869
+ ],
870
+ "outputs": [
871
+ {
872
+ "name": "IMAGE",
873
+ "type": "IMAGE",
874
+ "slot_index": 0,
875
+ "links": [
876
+ 26
877
+ ]
878
+ }
879
+ ],
880
+ "properties": {
881
+ "Node name for S&R": "VAEDecode",
882
+ "cnr_id": "comfy-core",
883
+ "ver": "0.3.48"
884
+ },
885
+ "widgets_values": []
886
+ },
887
+ {
888
+ "id": 19,
889
+ "type": "GrowMaskWithBlur",
890
+ "pos": [
891
+ 640,
892
+ 660
893
+ ],
894
+ "size": [
895
+ 300,
896
+ 250
897
+ ],
898
+ "flags": {},
899
+ "order": 19,
900
+ "mode": 0,
901
+ "inputs": [
902
+ {
903
+ "name": "mask",
904
+ "type": "MASK",
905
+ "link": 6
906
+ }
907
+ ],
908
+ "outputs": [
909
+ {
910
+ "name": "mask",
911
+ "type": "MASK",
912
+ "slot_index": 0,
913
+ "links": [
914
+ 30
915
+ ]
916
+ },
917
+ {
918
+ "name": "mask_inverted",
919
+ "type": "MASK",
920
+ "slot_index": 0,
921
+ "links": []
922
+ }
923
+ ],
924
+ "properties": {
925
+ "Node name for S&R": "GrowMaskWithBlur",
926
+ "cnr_id": "comfyui-kjnodes",
927
+ "aux_id": "kijai/ComfyUI-KJNodes",
928
+ "ver": "1.2.5"
929
+ },
930
+ "widgets_values": [
931
+ 6,
932
+ 0.0,
933
+ true,
934
+ false,
935
+ 12.0,
936
+ 1.0,
937
+ 1.0,
938
+ true
939
+ ],
940
+ "title": "Person keep mask (grow+feather)"
941
+ },
942
+ {
943
+ "id": 20,
944
+ "type": "ImageResizeKJ",
945
+ "pos": [
946
+ 1680,
947
+ -300
948
+ ],
949
+ "size": [
950
+ 300,
951
+ 190
952
+ ],
953
+ "flags": {},
954
+ "order": 20,
955
+ "mode": 0,
956
+ "inputs": [
957
+ {
958
+ "name": "image",
959
+ "type": "IMAGE",
960
+ "link": 26
961
+ },
962
+ {
963
+ "name": "get_image_size",
964
+ "type": "IMAGE",
965
+ "link": 27,
966
+ "shape": 7
967
+ }
968
+ ],
969
+ "outputs": [
970
+ {
971
+ "name": "IMAGE",
972
+ "type": "IMAGE",
973
+ "slot_index": 0,
974
+ "links": [
975
+ 28
976
+ ]
977
+ },
978
+ {
979
+ "name": "width",
980
+ "type": "INT",
981
+ "slot_index": 0,
982
+ "links": []
983
+ },
984
+ {
985
+ "name": "height",
986
+ "type": "INT",
987
+ "slot_index": 0,
988
+ "links": []
989
+ }
990
+ ],
991
+ "properties": {
992
+ "Node name for S&R": "ImageResizeKJ",
993
+ "cnr_id": "comfyui-kjnodes",
994
+ "aux_id": "kijai/ComfyUI-KJNodes",
995
+ "ver": "1.2.5"
996
+ },
997
+ "widgets_values": [
998
+ 1024,
999
+ 1024,
1000
+ "lanczos",
1001
+ false,
1002
+ 0,
1003
+ "disabled"
1004
+ ],
1005
+ "title": "Resize to original size"
1006
+ },
1007
+ {
1008
+ "id": 21,
1009
+ "type": "ImageCompositeMasked",
1010
+ "pos": [
1011
+ 2020,
1012
+ -420
1013
+ ],
1014
+ "size": [
1015
+ 300,
1016
+ 170
1017
+ ],
1018
+ "flags": {},
1019
+ "order": 21,
1020
+ "mode": 0,
1021
+ "inputs": [
1022
+ {
1023
+ "name": "destination",
1024
+ "type": "IMAGE",
1025
+ "link": 28
1026
+ },
1027
+ {
1028
+ "name": "source",
1029
+ "type": "IMAGE",
1030
+ "link": 29
1031
+ },
1032
+ {
1033
+ "name": "mask",
1034
+ "type": "MASK",
1035
+ "link": 30,
1036
+ "shape": 7
1037
+ }
1038
+ ],
1039
+ "outputs": [
1040
+ {
1041
+ "name": "IMAGE",
1042
+ "type": "IMAGE",
1043
+ "slot_index": 0,
1044
+ "links": [
1045
+ 31
1046
+ ]
1047
+ }
1048
+ ],
1049
+ "properties": {
1050
+ "Node name for S&R": "ImageCompositeMasked",
1051
+ "cnr_id": "comfy-core",
1052
+ "ver": "0.3.48"
1053
+ },
1054
+ "widgets_values": [
1055
+ 0,
1056
+ 0,
1057
+ false
1058
+ ],
1059
+ "title": "Original person over new background"
1060
+ },
1061
+ {
1062
+ "id": 22,
1063
+ "type": "SaveImage",
1064
+ "pos": [
1065
+ 2360,
1066
+ -420
1067
+ ],
1068
+ "size": [
1069
+ 400,
1070
+ 460
1071
+ ],
1072
+ "flags": {},
1073
+ "order": 22,
1074
+ "mode": 0,
1075
+ "inputs": [
1076
+ {
1077
+ "name": "images",
1078
+ "type": "IMAGE",
1079
+ "link": 31
1080
+ }
1081
+ ],
1082
+ "outputs": [],
1083
+ "properties": {
1084
+ "Node name for S&R": "SaveImage",
1085
+ "cnr_id": "comfy-core",
1086
+ "ver": "0.3.48"
1087
+ },
1088
+ "widgets_values": [
1089
+ "flux2-bg-inpaint"
1090
+ ],
1091
+ "title": "Save Image"
1092
+ },
1093
+ {
1094
+ "id": 23,
1095
+ "type": "MarkdownNote",
1096
+ "pos": [
1097
+ -40,
1098
+ -940
1099
+ ],
1100
+ "size": [
1101
+ 620,
1102
+ 380
1103
+ ],
1104
+ "flags": {},
1105
+ "order": 23,
1106
+ "mode": 0,
1107
+ "inputs": [],
1108
+ "outputs": [],
1109
+ "properties": {
1110
+ "Node name for S&R": "MarkdownNote",
1111
+ "cnr_id": "comfy-core",
1112
+ "ver": "0.3.48"
1113
+ },
1114
+ "widgets_values": [
1115
+ "## Flux2 BG Inpaint (Klein 9B)\n\n**Masked background regeneration with FLUX.2 Klein 9B via the community noise-mask approach** - Flux.2 has no official inpaint path, so the source image is VAE-encoded, `SetLatentNoiseMask` limits denoising to the background, and `ReferenceLatent` keeps the scene grounded. (needs [ComfyUI-RMBG](https://github.com/1038lab/ComfyUI-RMBG) + [ComfyUI-KJNodes](https://github.com/kijai/ComfyUI-KJNodes))\n\n- **Sampling**: Flux2Scheduler 8 steps (Klein distilled), euler, CFGGuider cfg 1. Width/height feed from the div-16 input resize automatically. `4` steps stays truest to the original layout, `8` adds crisper texture.\n- **Prompt matters**: the default pins the lighting (\"evenly lit, no added shadows, no vignetting\") - without it Klein invents moody side-light and layered wall shadows at denoise 1.\n- **Partial denoise** (*partial denoise* node): `1.0` = full background regen (default). Drop to `0.7-0.85` to keep the original background structure/lighting and only sharpen it.\n- **Background mask**: person mask (SAM3) shrunk 4px + 8px feather, inverted. Person keep mask (`expand 6 / blur 12`) composites the original person back at the end.\n- Input is squashed to the nearest /16 dims for encoding, output resized back to the exact input resolution before the composite.\n- Via API: `--set 4.image=file.png`, `--set 10.text='...'`, `--set 14.steps=4`, `--set 24.denoise=0.8`.\n\n**Models** (all in [aleph65/ComfyUI](https://huggingface.co/aleph65/ComfyUI)): `flux-2-klein-9b`, `qwen_3_8b_fp8mixed`, `flux2-vae`, `sam3.pt`\n"
1116
+ ],
1117
+ "title": "README",
1118
+ "color": "#432",
1119
+ "bgcolor": "#653"
1120
+ }
1121
+ ],
1122
+ "links": [
1123
+ [
1124
+ 1,
1125
+ 4,
1126
+ 0,
1127
+ 5,
1128
+ 0,
1129
+ "IMAGE"
1130
+ ],
1131
+ [
1132
+ 2,
1133
+ 5,
1134
+ 0,
1135
+ 6,
1136
+ 0,
1137
+ "IMAGE"
1138
+ ],
1139
+ [
1140
+ 3,
1141
+ 3,
1142
+ 0,
1143
+ 6,
1144
+ 1,
1145
+ "VAE"
1146
+ ],
1147
+ [
1148
+ 4,
1149
+ 4,
1150
+ 0,
1151
+ 7,
1152
+ 0,
1153
+ "IMAGE"
1154
+ ],
1155
+ [
1156
+ 5,
1157
+ 7,
1158
+ 1,
1159
+ 8,
1160
+ 0,
1161
+ "MASK"
1162
+ ],
1163
+ [
1164
+ 6,
1165
+ 7,
1166
+ 1,
1167
+ 19,
1168
+ 0,
1169
+ "MASK"
1170
+ ],
1171
+ [
1172
+ 7,
1173
+ 6,
1174
+ 0,
1175
+ 9,
1176
+ 0,
1177
+ "LATENT"
1178
+ ],
1179
+ [
1180
+ 8,
1181
+ 8,
1182
+ 1,
1183
+ 9,
1184
+ 1,
1185
+ "MASK"
1186
+ ],
1187
+ [
1188
+ 9,
1189
+ 2,
1190
+ 0,
1191
+ 10,
1192
+ 0,
1193
+ "CLIP"
1194
+ ],
1195
+ [
1196
+ 10,
1197
+ 10,
1198
+ 0,
1199
+ 11,
1200
+ 0,
1201
+ "CONDITIONING"
1202
+ ],
1203
+ [
1204
+ 11,
1205
+ 6,
1206
+ 0,
1207
+ 11,
1208
+ 1,
1209
+ "LATENT"
1210
+ ],
1211
+ [
1212
+ 12,
1213
+ 10,
1214
+ 0,
1215
+ 12,
1216
+ 0,
1217
+ "CONDITIONING"
1218
+ ],
1219
+ [
1220
+ 13,
1221
+ 1,
1222
+ 0,
1223
+ 13,
1224
+ 0,
1225
+ "MODEL"
1226
+ ],
1227
+ [
1228
+ 14,
1229
+ 11,
1230
+ 0,
1231
+ 13,
1232
+ 1,
1233
+ "CONDITIONING"
1234
+ ],
1235
+ [
1236
+ 15,
1237
+ 12,
1238
+ 0,
1239
+ 13,
1240
+ 2,
1241
+ "CONDITIONING"
1242
+ ],
1243
+ [
1244
+ 16,
1245
+ 5,
1246
+ 1,
1247
+ 14,
1248
+ 0,
1249
+ "INT"
1250
+ ],
1251
+ [
1252
+ 17,
1253
+ 5,
1254
+ 2,
1255
+ 14,
1256
+ 1,
1257
+ "INT"
1258
+ ],
1259
+ [
1260
+ 18,
1261
+ 14,
1262
+ 0,
1263
+ 24,
1264
+ 0,
1265
+ "SIGMAS"
1266
+ ],
1267
+ [
1268
+ 19,
1269
+ 16,
1270
+ 0,
1271
+ 17,
1272
+ 0,
1273
+ "NOISE"
1274
+ ],
1275
+ [
1276
+ 20,
1277
+ 13,
1278
+ 0,
1279
+ 17,
1280
+ 1,
1281
+ "GUIDER"
1282
+ ],
1283
+ [
1284
+ 21,
1285
+ 15,
1286
+ 0,
1287
+ 17,
1288
+ 2,
1289
+ "SAMPLER"
1290
+ ],
1291
+ [
1292
+ 22,
1293
+ 24,
1294
+ 1,
1295
+ 17,
1296
+ 3,
1297
+ "SIGMAS"
1298
+ ],
1299
+ [
1300
+ 23,
1301
+ 9,
1302
+ 0,
1303
+ 17,
1304
+ 4,
1305
+ "LATENT"
1306
+ ],
1307
+ [
1308
+ 24,
1309
+ 17,
1310
+ 0,
1311
+ 18,
1312
+ 0,
1313
+ "LATENT"
1314
+ ],
1315
+ [
1316
+ 25,
1317
+ 3,
1318
+ 0,
1319
+ 18,
1320
+ 1,
1321
+ "VAE"
1322
+ ],
1323
+ [
1324
+ 26,
1325
+ 18,
1326
+ 0,
1327
+ 20,
1328
+ 0,
1329
+ "IMAGE"
1330
+ ],
1331
+ [
1332
+ 27,
1333
+ 4,
1334
+ 0,
1335
+ 20,
1336
+ 1,
1337
+ "IMAGE"
1338
+ ],
1339
+ [
1340
+ 28,
1341
+ 20,
1342
+ 0,
1343
+ 21,
1344
+ 0,
1345
+ "IMAGE"
1346
+ ],
1347
+ [
1348
+ 29,
1349
+ 4,
1350
+ 0,
1351
+ 21,
1352
+ 1,
1353
+ "IMAGE"
1354
+ ],
1355
+ [
1356
+ 30,
1357
+ 19,
1358
+ 0,
1359
+ 21,
1360
+ 2,
1361
+ "MASK"
1362
+ ],
1363
+ [
1364
+ 31,
1365
+ 21,
1366
+ 0,
1367
+ 22,
1368
+ 0,
1369
+ "IMAGE"
1370
+ ]
1371
+ ],
1372
+ "groups": [],
1373
+ "config": {},
1374
+ "extra": {
1375
+ "frontendVersion": "1.45.20"
1376
+ },
1377
+ "version": 0.4
1378
+ }