aleph65 commited on
Commit
94712bc
·
verified ·
1 Parent(s): 0e9ef7f

Add flux-bg-inpaint workflow

Browse files
Files changed (1) hide show
  1. workflows/flux-bg-inpaint.json +1036 -0
workflows/flux-bg-inpaint.json ADDED
@@ -0,0 +1,1036 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": "7df1cda8-0d0d-403a-8c08-8a3841b6ec6b",
3
+ "revision": 0,
4
+ "last_node_id": 18,
5
+ "last_link_id": 24,
6
+ "nodes": [
7
+ {
8
+ "id": 1,
9
+ "type": "UNETLoader",
10
+ "pos": [
11
+ -40,
12
+ -500
13
+ ],
14
+ "size": [
15
+ 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
+ 7
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
+ "flux1-fill-dev-fp8.safetensors",
39
+ "default"
40
+ ],
41
+ "title": "Load Flux Fill Model (fill or onereward)"
42
+ },
43
+ {
44
+ "id": 2,
45
+ "type": "CheckpointLoaderSimple",
46
+ "pos": [
47
+ -40,
48
+ -340
49
+ ],
50
+ "size": [
51
+ 340,
52
+ 100
53
+ ],
54
+ "flags": {},
55
+ "order": 2,
56
+ "mode": 0,
57
+ "inputs": [],
58
+ "outputs": [
59
+ {
60
+ "name": "MODEL",
61
+ "type": "MODEL",
62
+ "slot_index": 0,
63
+ "links": []
64
+ },
65
+ {
66
+ "name": "CLIP",
67
+ "type": "CLIP",
68
+ "slot_index": 0,
69
+ "links": [
70
+ 4
71
+ ]
72
+ },
73
+ {
74
+ "name": "VAE",
75
+ "type": "VAE",
76
+ "slot_index": 0,
77
+ "links": [
78
+ 10,
79
+ 18
80
+ ]
81
+ }
82
+ ],
83
+ "properties": {
84
+ "Node name for S&R": "CheckpointLoaderSimple",
85
+ "cnr_id": "comfy-core",
86
+ "ver": "0.3.48"
87
+ },
88
+ "widgets_values": [
89
+ "flux1-dev-fp8.safetensors"
90
+ ],
91
+ "title": "CLIP+VAE source (MODEL unused)"
92
+ },
93
+ {
94
+ "id": 3,
95
+ "type": "LoadImage",
96
+ "pos": [
97
+ -40,
98
+ -140
99
+ ],
100
+ "size": [
101
+ 270,
102
+ 330
103
+ ],
104
+ "flags": {},
105
+ "order": 3,
106
+ "mode": 0,
107
+ "inputs": [],
108
+ "outputs": [
109
+ {
110
+ "name": "IMAGE",
111
+ "type": "IMAGE",
112
+ "slot_index": 0,
113
+ "links": [
114
+ 1,
115
+ 11,
116
+ 20,
117
+ 22
118
+ ]
119
+ },
120
+ {
121
+ "name": "MASK",
122
+ "type": "MASK",
123
+ "slot_index": 0,
124
+ "links": []
125
+ }
126
+ ],
127
+ "properties": {
128
+ "Node name for S&R": "LoadImage",
129
+ "cnr_id": "comfy-core",
130
+ "ver": "0.3.48"
131
+ },
132
+ "widgets_values": [
133
+ "example.png",
134
+ "image"
135
+ ],
136
+ "title": "Main Image"
137
+ },
138
+ {
139
+ "id": 5,
140
+ "type": "SAM3Segment",
141
+ "pos": [
142
+ 300,
143
+ -140
144
+ ],
145
+ "size": [
146
+ 300,
147
+ 320
148
+ ],
149
+ "flags": {},
150
+ "order": 5,
151
+ "mode": 0,
152
+ "inputs": [
153
+ {
154
+ "name": "image",
155
+ "type": "IMAGE",
156
+ "link": 1
157
+ }
158
+ ],
159
+ "outputs": [
160
+ {
161
+ "name": "IMAGE",
162
+ "type": "IMAGE",
163
+ "slot_index": 0,
164
+ "links": []
165
+ },
166
+ {
167
+ "name": "MASK",
168
+ "type": "MASK",
169
+ "slot_index": 0,
170
+ "links": [
171
+ 2,
172
+ 3
173
+ ]
174
+ },
175
+ {
176
+ "name": "MASK_IMAGE",
177
+ "type": "IMAGE",
178
+ "slot_index": 0,
179
+ "links": []
180
+ }
181
+ ],
182
+ "properties": {
183
+ "Node name for S&R": "SAM3Segment",
184
+ "cnr_id": "comfyui-rmbg",
185
+ "aux_id": "1038lab/ComfyUI-RMBG",
186
+ "ver": "3.0.0"
187
+ },
188
+ "widgets_values": [
189
+ "person",
190
+ "Merged",
191
+ 0.5,
192
+ 0,
193
+ 0,
194
+ 0,
195
+ 0,
196
+ "Auto",
197
+ false,
198
+ false,
199
+ "Alpha",
200
+ "#222222"
201
+ ],
202
+ "title": "Segment PERSON (SAM3)"
203
+ },
204
+ {
205
+ "id": 6,
206
+ "type": "GrowMaskWithBlur",
207
+ "pos": [
208
+ 640,
209
+ -140
210
+ ],
211
+ "size": [
212
+ 300,
213
+ 250
214
+ ],
215
+ "flags": {},
216
+ "order": 6,
217
+ "mode": 0,
218
+ "inputs": [
219
+ {
220
+ "name": "mask",
221
+ "type": "MASK",
222
+ "link": 2
223
+ }
224
+ ],
225
+ "outputs": [
226
+ {
227
+ "name": "mask",
228
+ "type": "MASK",
229
+ "slot_index": 0,
230
+ "links": []
231
+ },
232
+ {
233
+ "name": "mask_inverted",
234
+ "type": "MASK",
235
+ "slot_index": 0,
236
+ "links": [
237
+ 12
238
+ ]
239
+ }
240
+ ],
241
+ "properties": {
242
+ "Node name for S&R": "GrowMaskWithBlur",
243
+ "cnr_id": "comfyui-kjnodes",
244
+ "aux_id": "kijai/ComfyUI-KJNodes",
245
+ "ver": "1.2.5"
246
+ },
247
+ "widgets_values": [
248
+ -4,
249
+ 0.0,
250
+ true,
251
+ false,
252
+ 8.0,
253
+ 1.0,
254
+ 1.0,
255
+ true
256
+ ],
257
+ "title": "Background mask (inverted)"
258
+ },
259
+ {
260
+ "id": 7,
261
+ "type": "CLIPTextEncode",
262
+ "pos": [
263
+ 300,
264
+ -420
265
+ ],
266
+ "size": [
267
+ 380,
268
+ 160
269
+ ],
270
+ "flags": {},
271
+ "order": 7,
272
+ "mode": 0,
273
+ "inputs": [
274
+ {
275
+ "name": "clip",
276
+ "type": "CLIP",
277
+ "link": 4
278
+ }
279
+ ],
280
+ "outputs": [
281
+ {
282
+ "name": "CONDITIONING",
283
+ "type": "CONDITIONING",
284
+ "slot_index": 0,
285
+ "links": [
286
+ 5,
287
+ 6
288
+ ]
289
+ }
290
+ ],
291
+ "properties": {
292
+ "Node name for S&R": "CLIPTextEncode",
293
+ "cnr_id": "comfy-core",
294
+ "ver": "0.3.48"
295
+ },
296
+ "widgets_values": [
297
+ "sharp photorealistic background, same scene, crisp focus, fine natural texture, clean detail, natural depth, lighting and color temperature matching the subject, no blur, no artifacts, high detail, 4k"
298
+ ],
299
+ "title": "Background prompt"
300
+ },
301
+ {
302
+ "id": 8,
303
+ "type": "ConditioningZeroOut",
304
+ "pos": [
305
+ 700,
306
+ -480
307
+ ],
308
+ "size": [
309
+ 280,
310
+ 50
311
+ ],
312
+ "flags": {},
313
+ "order": 8,
314
+ "mode": 0,
315
+ "inputs": [
316
+ {
317
+ "name": "conditioning",
318
+ "type": "CONDITIONING",
319
+ "link": 5
320
+ }
321
+ ],
322
+ "outputs": [
323
+ {
324
+ "name": "CONDITIONING",
325
+ "type": "CONDITIONING",
326
+ "slot_index": 0,
327
+ "links": [
328
+ 9
329
+ ]
330
+ }
331
+ ],
332
+ "properties": {
333
+ "Node name for S&R": "ConditioningZeroOut",
334
+ "cnr_id": "comfy-core",
335
+ "ver": "0.3.48"
336
+ },
337
+ "widgets_values": [],
338
+ "title": "Negative (zeroed)"
339
+ },
340
+ {
341
+ "id": 9,
342
+ "type": "FluxGuidance",
343
+ "pos": [
344
+ 700,
345
+ -380
346
+ ],
347
+ "size": [
348
+ 280,
349
+ 60
350
+ ],
351
+ "flags": {},
352
+ "order": 9,
353
+ "mode": 0,
354
+ "inputs": [
355
+ {
356
+ "name": "conditioning",
357
+ "type": "CONDITIONING",
358
+ "link": 6
359
+ }
360
+ ],
361
+ "outputs": [
362
+ {
363
+ "name": "CONDITIONING",
364
+ "type": "CONDITIONING",
365
+ "slot_index": 0,
366
+ "links": [
367
+ 8
368
+ ]
369
+ }
370
+ ],
371
+ "properties": {
372
+ "Node name for S&R": "FluxGuidance",
373
+ "cnr_id": "comfy-core",
374
+ "ver": "0.3.48"
375
+ },
376
+ "widgets_values": [
377
+ 30.0
378
+ ]
379
+ },
380
+ {
381
+ "id": 10,
382
+ "type": "DifferentialDiffusion",
383
+ "pos": [
384
+ 300,
385
+ -520
386
+ ],
387
+ "size": [
388
+ 280,
389
+ 60
390
+ ],
391
+ "flags": {},
392
+ "order": 10,
393
+ "mode": 0,
394
+ "inputs": [
395
+ {
396
+ "name": "model",
397
+ "type": "MODEL",
398
+ "link": 7
399
+ }
400
+ ],
401
+ "outputs": [
402
+ {
403
+ "name": "MODEL",
404
+ "type": "MODEL",
405
+ "slot_index": 0,
406
+ "links": [
407
+ 13
408
+ ]
409
+ }
410
+ ],
411
+ "properties": {
412
+ "Node name for S&R": "DifferentialDiffusion",
413
+ "cnr_id": "comfy-core",
414
+ "ver": "0.3.48"
415
+ },
416
+ "widgets_values": [
417
+ 1.0
418
+ ]
419
+ },
420
+ {
421
+ "id": 11,
422
+ "type": "InpaintModelConditioning",
423
+ "pos": [
424
+ 1020,
425
+ -420
426
+ ],
427
+ "size": [
428
+ 300,
429
+ 170
430
+ ],
431
+ "flags": {},
432
+ "order": 11,
433
+ "mode": 0,
434
+ "inputs": [
435
+ {
436
+ "name": "positive",
437
+ "type": "CONDITIONING",
438
+ "link": 8
439
+ },
440
+ {
441
+ "name": "negative",
442
+ "type": "CONDITIONING",
443
+ "link": 9
444
+ },
445
+ {
446
+ "name": "vae",
447
+ "type": "VAE",
448
+ "link": 10
449
+ },
450
+ {
451
+ "name": "pixels",
452
+ "type": "IMAGE",
453
+ "link": 11
454
+ },
455
+ {
456
+ "name": "mask",
457
+ "type": "MASK",
458
+ "link": 12
459
+ }
460
+ ],
461
+ "outputs": [
462
+ {
463
+ "name": "positive",
464
+ "type": "CONDITIONING",
465
+ "slot_index": 0,
466
+ "links": [
467
+ 14
468
+ ]
469
+ },
470
+ {
471
+ "name": "negative",
472
+ "type": "CONDITIONING",
473
+ "slot_index": 0,
474
+ "links": [
475
+ 15
476
+ ]
477
+ },
478
+ {
479
+ "name": "latent",
480
+ "type": "LATENT",
481
+ "slot_index": 0,
482
+ "links": [
483
+ 16
484
+ ]
485
+ }
486
+ ],
487
+ "properties": {
488
+ "Node name for S&R": "InpaintModelConditioning",
489
+ "cnr_id": "comfy-core",
490
+ "ver": "0.3.48"
491
+ },
492
+ "widgets_values": [
493
+ true
494
+ ],
495
+ "title": "Flux Fill conditioning"
496
+ },
497
+ {
498
+ "id": 12,
499
+ "type": "KSampler",
500
+ "pos": [
501
+ 1360,
502
+ -420
503
+ ],
504
+ "size": [
505
+ 300,
506
+ 450
507
+ ],
508
+ "flags": {},
509
+ "order": 12,
510
+ "mode": 0,
511
+ "inputs": [
512
+ {
513
+ "name": "model",
514
+ "type": "MODEL",
515
+ "link": 13
516
+ },
517
+ {
518
+ "name": "positive",
519
+ "type": "CONDITIONING",
520
+ "link": 14
521
+ },
522
+ {
523
+ "name": "negative",
524
+ "type": "CONDITIONING",
525
+ "link": 15
526
+ },
527
+ {
528
+ "name": "latent_image",
529
+ "type": "LATENT",
530
+ "link": 16
531
+ }
532
+ ],
533
+ "outputs": [
534
+ {
535
+ "name": "LATENT",
536
+ "type": "LATENT",
537
+ "slot_index": 0,
538
+ "links": [
539
+ 17
540
+ ]
541
+ }
542
+ ],
543
+ "properties": {
544
+ "Node name for S&R": "KSampler",
545
+ "cnr_id": "comfy-core",
546
+ "ver": "0.3.48"
547
+ },
548
+ "widgets_values": [
549
+ 720559880485925,
550
+ "randomize",
551
+ 24,
552
+ 1.0,
553
+ "euler",
554
+ "normal",
555
+ 1.0
556
+ ]
557
+ },
558
+ {
559
+ "id": 13,
560
+ "type": "VAEDecode",
561
+ "pos": [
562
+ 1700,
563
+ -420
564
+ ],
565
+ "size": [
566
+ 210,
567
+ 50
568
+ ],
569
+ "flags": {},
570
+ "order": 13,
571
+ "mode": 0,
572
+ "inputs": [
573
+ {
574
+ "name": "samples",
575
+ "type": "LATENT",
576
+ "link": 17
577
+ },
578
+ {
579
+ "name": "vae",
580
+ "type": "VAE",
581
+ "link": 18
582
+ }
583
+ ],
584
+ "outputs": [
585
+ {
586
+ "name": "IMAGE",
587
+ "type": "IMAGE",
588
+ "slot_index": 0,
589
+ "links": [
590
+ 19
591
+ ]
592
+ }
593
+ ],
594
+ "properties": {
595
+ "Node name for S&R": "VAEDecode",
596
+ "cnr_id": "comfy-core",
597
+ "ver": "0.3.48"
598
+ },
599
+ "widgets_values": []
600
+ },
601
+ {
602
+ "id": 14,
603
+ "type": "GrowMaskWithBlur",
604
+ "pos": [
605
+ 640,
606
+ 260
607
+ ],
608
+ "size": [
609
+ 300,
610
+ 250
611
+ ],
612
+ "flags": {},
613
+ "order": 14,
614
+ "mode": 0,
615
+ "inputs": [
616
+ {
617
+ "name": "mask",
618
+ "type": "MASK",
619
+ "link": 3
620
+ }
621
+ ],
622
+ "outputs": [
623
+ {
624
+ "name": "mask",
625
+ "type": "MASK",
626
+ "slot_index": 0,
627
+ "links": [
628
+ 23
629
+ ]
630
+ },
631
+ {
632
+ "name": "mask_inverted",
633
+ "type": "MASK",
634
+ "slot_index": 0,
635
+ "links": []
636
+ }
637
+ ],
638
+ "properties": {
639
+ "Node name for S&R": "GrowMaskWithBlur",
640
+ "cnr_id": "comfyui-kjnodes",
641
+ "aux_id": "kijai/ComfyUI-KJNodes",
642
+ "ver": "1.2.5"
643
+ },
644
+ "widgets_values": [
645
+ 6,
646
+ 0.0,
647
+ true,
648
+ false,
649
+ 12.0,
650
+ 1.0,
651
+ 1.0,
652
+ true
653
+ ],
654
+ "title": "Person keep mask (grow+feather)"
655
+ },
656
+ {
657
+ "id": 15,
658
+ "type": "ImageResizeKJ",
659
+ "pos": [
660
+ 1700,
661
+ -300
662
+ ],
663
+ "size": [
664
+ 300,
665
+ 190
666
+ ],
667
+ "flags": {},
668
+ "order": 15,
669
+ "mode": 0,
670
+ "inputs": [
671
+ {
672
+ "name": "image",
673
+ "type": "IMAGE",
674
+ "link": 19
675
+ },
676
+ {
677
+ "name": "get_image_size",
678
+ "type": "IMAGE",
679
+ "link": 20,
680
+ "shape": 7
681
+ }
682
+ ],
683
+ "outputs": [
684
+ {
685
+ "name": "IMAGE",
686
+ "type": "IMAGE",
687
+ "slot_index": 0,
688
+ "links": [
689
+ 21
690
+ ]
691
+ },
692
+ {
693
+ "name": "width",
694
+ "type": "INT",
695
+ "slot_index": 0,
696
+ "links": []
697
+ },
698
+ {
699
+ "name": "height",
700
+ "type": "INT",
701
+ "slot_index": 0,
702
+ "links": []
703
+ }
704
+ ],
705
+ "properties": {
706
+ "Node name for S&R": "ImageResizeKJ",
707
+ "cnr_id": "comfyui-kjnodes",
708
+ "aux_id": "kijai/ComfyUI-KJNodes",
709
+ "ver": "1.2.5"
710
+ },
711
+ "widgets_values": [
712
+ 1024,
713
+ 1024,
714
+ "lanczos",
715
+ false,
716
+ 0,
717
+ "disabled"
718
+ ],
719
+ "title": "Resize to original size"
720
+ },
721
+ {
722
+ "id": 16,
723
+ "type": "ImageCompositeMasked",
724
+ "pos": [
725
+ 2040,
726
+ -420
727
+ ],
728
+ "size": [
729
+ 300,
730
+ 170
731
+ ],
732
+ "flags": {},
733
+ "order": 16,
734
+ "mode": 0,
735
+ "inputs": [
736
+ {
737
+ "name": "destination",
738
+ "type": "IMAGE",
739
+ "link": 21
740
+ },
741
+ {
742
+ "name": "source",
743
+ "type": "IMAGE",
744
+ "link": 22
745
+ },
746
+ {
747
+ "name": "mask",
748
+ "type": "MASK",
749
+ "link": 23,
750
+ "shape": 7
751
+ }
752
+ ],
753
+ "outputs": [
754
+ {
755
+ "name": "IMAGE",
756
+ "type": "IMAGE",
757
+ "slot_index": 0,
758
+ "links": [
759
+ 24
760
+ ]
761
+ }
762
+ ],
763
+ "properties": {
764
+ "Node name for S&R": "ImageCompositeMasked",
765
+ "cnr_id": "comfy-core",
766
+ "ver": "0.3.48"
767
+ },
768
+ "widgets_values": [
769
+ 0,
770
+ 0,
771
+ false
772
+ ],
773
+ "title": "Original person over new background"
774
+ },
775
+ {
776
+ "id": 17,
777
+ "type": "SaveImage",
778
+ "pos": [
779
+ 2380,
780
+ -420
781
+ ],
782
+ "size": [
783
+ 400,
784
+ 460
785
+ ],
786
+ "flags": {},
787
+ "order": 17,
788
+ "mode": 0,
789
+ "inputs": [
790
+ {
791
+ "name": "images",
792
+ "type": "IMAGE",
793
+ "link": 24
794
+ }
795
+ ],
796
+ "outputs": [],
797
+ "properties": {
798
+ "Node name for S&R": "SaveImage",
799
+ "cnr_id": "comfy-core",
800
+ "ver": "0.3.48"
801
+ },
802
+ "widgets_values": [
803
+ "flux-bg-inpaint"
804
+ ],
805
+ "title": "Save Image"
806
+ },
807
+ {
808
+ "id": 18,
809
+ "type": "MarkdownNote",
810
+ "pos": [
811
+ -40,
812
+ -940
813
+ ],
814
+ "size": [
815
+ 620,
816
+ 380
817
+ ],
818
+ "flags": {},
819
+ "order": 18,
820
+ "mode": 0,
821
+ "inputs": [],
822
+ "outputs": [],
823
+ "properties": {
824
+ "Node name for S&R": "MarkdownNote",
825
+ "cnr_id": "comfy-core",
826
+ "ver": "0.3.48"
827
+ },
828
+ "widgets_values": [
829
+ "## Flux BG Inpaint (Flux.1 Fill / OneReward)\n\n**True masked inpainting of the background with FLUX.1 Fill dev (fp8), person auto-masked by [SAM3](https://github.com/1038lab/ComfyUI-RMBG)** (needs [ComfyUI-RMBG](https://github.com/1038lab/ComfyUI-RMBG) + [ComfyUI-KJNodes](https://github.com/kijai/ComfyUI-KJNodes))\n\n- **Note**: Fill cannot see the masked-out background, so it invents a NEW scene behind the person (guided only by the prompt and the subject). For \"same scene but sharper\" use `qwen-bg-enhance` / `qwen-bg-inpaint-true` / `flux2-bg-inpaint` instead - this workflow is for full background replacement.\n- **Model**: pick in *Load Flux Fill Model*: `flux1-fill-dev-fp8` (official Fill weights) or `flux1-fill-dev-onereward-fp8` (ByteDance OneReward variant, tuned for context-aware inpaint). CLIP + VAE come from the `flux1-dev-fp8` checkpoint - its MODEL output is unused.\n- **Sampling**: FluxGuidance `30` (Fill's recommended range), 24 steps euler/normal, CFG 1, denoise 1.0, DifferentialDiffusion for softer mask blending.\n- **Background mask**: person mask shrunk 4px + 8px feather, inverted - regen bites slightly into the subject edge so no halo survives. Fill preserves the subject natively; the final composite pastes the original person back on top as a guarantee (keep mask `expand 6 / blur 12`).\n- Output is resized back to the exact input resolution before the composite.\n- Via API: `--set 3.image=file.png`, `--set 1.unet_name=flux1-fill-dev-onereward-fp8.safetensors`, `--set 7.text='...'`.\n\n**Models** (all in [aleph65/ComfyUI](https://huggingface.co/aleph65/ComfyUI)): `flux1-fill-dev-fp8`, `flux1-fill-dev-onereward-fp8`, `flux1-dev-fp8` (checkpoint, for CLIP+VAE), `sam3.pt`\n"
830
+ ],
831
+ "title": "README",
832
+ "color": "#432",
833
+ "bgcolor": "#653"
834
+ }
835
+ ],
836
+ "links": [
837
+ [
838
+ 1,
839
+ 3,
840
+ 0,
841
+ 5,
842
+ 0,
843
+ "IMAGE"
844
+ ],
845
+ [
846
+ 2,
847
+ 5,
848
+ 1,
849
+ 6,
850
+ 0,
851
+ "MASK"
852
+ ],
853
+ [
854
+ 3,
855
+ 5,
856
+ 1,
857
+ 14,
858
+ 0,
859
+ "MASK"
860
+ ],
861
+ [
862
+ 4,
863
+ 2,
864
+ 1,
865
+ 7,
866
+ 0,
867
+ "CLIP"
868
+ ],
869
+ [
870
+ 5,
871
+ 7,
872
+ 0,
873
+ 8,
874
+ 0,
875
+ "CONDITIONING"
876
+ ],
877
+ [
878
+ 6,
879
+ 7,
880
+ 0,
881
+ 9,
882
+ 0,
883
+ "CONDITIONING"
884
+ ],
885
+ [
886
+ 7,
887
+ 1,
888
+ 0,
889
+ 10,
890
+ 0,
891
+ "MODEL"
892
+ ],
893
+ [
894
+ 8,
895
+ 9,
896
+ 0,
897
+ 11,
898
+ 0,
899
+ "CONDITIONING"
900
+ ],
901
+ [
902
+ 9,
903
+ 8,
904
+ 0,
905
+ 11,
906
+ 1,
907
+ "CONDITIONING"
908
+ ],
909
+ [
910
+ 10,
911
+ 2,
912
+ 2,
913
+ 11,
914
+ 2,
915
+ "VAE"
916
+ ],
917
+ [
918
+ 11,
919
+ 3,
920
+ 0,
921
+ 11,
922
+ 3,
923
+ "IMAGE"
924
+ ],
925
+ [
926
+ 12,
927
+ 6,
928
+ 1,
929
+ 11,
930
+ 4,
931
+ "MASK"
932
+ ],
933
+ [
934
+ 13,
935
+ 10,
936
+ 0,
937
+ 12,
938
+ 0,
939
+ "MODEL"
940
+ ],
941
+ [
942
+ 14,
943
+ 11,
944
+ 0,
945
+ 12,
946
+ 1,
947
+ "CONDITIONING"
948
+ ],
949
+ [
950
+ 15,
951
+ 11,
952
+ 1,
953
+ 12,
954
+ 2,
955
+ "CONDITIONING"
956
+ ],
957
+ [
958
+ 16,
959
+ 11,
960
+ 2,
961
+ 12,
962
+ 3,
963
+ "LATENT"
964
+ ],
965
+ [
966
+ 17,
967
+ 12,
968
+ 0,
969
+ 13,
970
+ 0,
971
+ "LATENT"
972
+ ],
973
+ [
974
+ 18,
975
+ 2,
976
+ 2,
977
+ 13,
978
+ 1,
979
+ "VAE"
980
+ ],
981
+ [
982
+ 19,
983
+ 13,
984
+ 0,
985
+ 15,
986
+ 0,
987
+ "IMAGE"
988
+ ],
989
+ [
990
+ 20,
991
+ 3,
992
+ 0,
993
+ 15,
994
+ 1,
995
+ "IMAGE"
996
+ ],
997
+ [
998
+ 21,
999
+ 15,
1000
+ 0,
1001
+ 16,
1002
+ 0,
1003
+ "IMAGE"
1004
+ ],
1005
+ [
1006
+ 22,
1007
+ 3,
1008
+ 0,
1009
+ 16,
1010
+ 1,
1011
+ "IMAGE"
1012
+ ],
1013
+ [
1014
+ 23,
1015
+ 14,
1016
+ 0,
1017
+ 16,
1018
+ 2,
1019
+ "MASK"
1020
+ ],
1021
+ [
1022
+ 24,
1023
+ 16,
1024
+ 0,
1025
+ 17,
1026
+ 0,
1027
+ "IMAGE"
1028
+ ]
1029
+ ],
1030
+ "groups": [],
1031
+ "config": {},
1032
+ "extra": {
1033
+ "frontendVersion": "1.45.20"
1034
+ },
1035
+ "version": 0.4
1036
+ }