aleph65 commited on
Commit
d836cfc
·
verified ·
1 Parent(s): 8b792f2

Upload workflows/api/outpaint-flux-hq.json with huggingface_hub

Browse files
Files changed (1) hide show
  1. workflows/api/outpaint-flux-hq.json +796 -0
workflows/api/outpaint-flux-hq.json ADDED
@@ -0,0 +1,796 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "1": {
3
+ "_meta": {
4
+ "title": "Source Image"
5
+ },
6
+ "class_type": "LoadImage",
7
+ "inputs": {
8
+ "image": "example.png"
9
+ }
10
+ },
11
+ "10": {
12
+ "_meta": {
13
+ "title": "Resize to fit target"
14
+ },
15
+ "class_type": "ImageScale",
16
+ "inputs": {
17
+ "crop": "disabled",
18
+ "height": [
19
+ "9",
20
+ 0
21
+ ],
22
+ "image": [
23
+ "1",
24
+ 0
25
+ ],
26
+ "upscale_method": "lanczos",
27
+ "width": [
28
+ "8",
29
+ 0
30
+ ]
31
+ }
32
+ },
33
+ "11": {
34
+ "_meta": {
35
+ "title": "pad left"
36
+ },
37
+ "class_type": "MathExpression|pysssss",
38
+ "inputs": {
39
+ "a": [
40
+ "10",
41
+ 0
42
+ ],
43
+ "b": [
44
+ "2",
45
+ 0
46
+ ],
47
+ "c": [
48
+ "4",
49
+ 0
50
+ ],
51
+ "expression": "max(floor((b - a.width) * c), 0)"
52
+ }
53
+ },
54
+ "12": {
55
+ "_meta": {
56
+ "title": "pad right"
57
+ },
58
+ "class_type": "MathExpression|pysssss",
59
+ "inputs": {
60
+ "a": [
61
+ "10",
62
+ 0
63
+ ],
64
+ "b": [
65
+ "2",
66
+ 0
67
+ ],
68
+ "c": [
69
+ "11",
70
+ 0
71
+ ],
72
+ "expression": "max(b - a.width - c, 0)"
73
+ }
74
+ },
75
+ "13": {
76
+ "_meta": {
77
+ "title": "pad top"
78
+ },
79
+ "class_type": "MathExpression|pysssss",
80
+ "inputs": {
81
+ "a": [
82
+ "10",
83
+ 0
84
+ ],
85
+ "b": [
86
+ "3",
87
+ 0
88
+ ],
89
+ "c": [
90
+ "5",
91
+ 0
92
+ ],
93
+ "expression": "max(floor((b - a.height) * c), 0)"
94
+ }
95
+ },
96
+ "14": {
97
+ "_meta": {
98
+ "title": "pad bottom"
99
+ },
100
+ "class_type": "MathExpression|pysssss",
101
+ "inputs": {
102
+ "a": [
103
+ "10",
104
+ 0
105
+ ],
106
+ "b": [
107
+ "3",
108
+ 0
109
+ ],
110
+ "c": [
111
+ "13",
112
+ 0
113
+ ],
114
+ "expression": "max(b - a.height - c, 0)"
115
+ }
116
+ },
117
+ "15": {
118
+ "_meta": {
119
+ "title": "Pad to exact target"
120
+ },
121
+ "class_type": "ImagePadForOutpaint",
122
+ "inputs": {
123
+ "bottom": [
124
+ "14",
125
+ 0
126
+ ],
127
+ "feathering": [
128
+ "6",
129
+ 0
130
+ ],
131
+ "image": [
132
+ "10",
133
+ 0
134
+ ],
135
+ "left": [
136
+ "11",
137
+ 0
138
+ ],
139
+ "right": [
140
+ "12",
141
+ 0
142
+ ],
143
+ "top": [
144
+ "13",
145
+ 0
146
+ ]
147
+ }
148
+ },
149
+ "16": {
150
+ "_meta": {
151
+ "title": "keep-region mask"
152
+ },
153
+ "class_type": "InvertMask",
154
+ "inputs": {
155
+ "mask": [
156
+ "15",
157
+ 1
158
+ ]
159
+ }
160
+ },
161
+ "17": {
162
+ "class_type": "UNETLoader",
163
+ "inputs": {
164
+ "unet_name": "flux1-fill-dev.safetensors",
165
+ "weight_dtype": "default"
166
+ }
167
+ },
168
+ "18": {
169
+ "_meta": {
170
+ "title": "Turbo-Alpha 8-step LoRA"
171
+ },
172
+ "class_type": "LoraLoaderModelOnly",
173
+ "inputs": {
174
+ "lora_name": "flux1-turbo-alpha.safetensors",
175
+ "model": [
176
+ "17",
177
+ 0
178
+ ],
179
+ "strength_model": 1.0
180
+ }
181
+ },
182
+ "19": {
183
+ "class_type": "DualCLIPLoader",
184
+ "inputs": {
185
+ "clip_name1": "clip_l.safetensors",
186
+ "clip_name2": "t5xxl_fp16.safetensors",
187
+ "device": "default",
188
+ "type": "flux"
189
+ }
190
+ },
191
+ "2": {
192
+ "_meta": {
193
+ "title": "target_width"
194
+ },
195
+ "class_type": "PrimitiveInt",
196
+ "inputs": {
197
+ "value": 1216
198
+ }
199
+ },
200
+ "20": {
201
+ "class_type": "VAELoader",
202
+ "inputs": {
203
+ "vae_name": "ae.safetensors"
204
+ }
205
+ },
206
+ "21": {
207
+ "_meta": {
208
+ "title": "Prompt"
209
+ },
210
+ "class_type": "PrimitiveStringMultiline",
211
+ "inputs": {
212
+ "value": "photo, seamless natural continuation of the scene, consistent lighting, high quality"
213
+ }
214
+ },
215
+ "22": {
216
+ "_meta": {
217
+ "title": "Positive"
218
+ },
219
+ "class_type": "CLIPTextEncode",
220
+ "inputs": {
221
+ "clip": [
222
+ "19",
223
+ 0
224
+ ],
225
+ "text": [
226
+ "21",
227
+ 0
228
+ ]
229
+ }
230
+ },
231
+ "23": {
232
+ "_meta": {
233
+ "title": "Fill guidance (keep high)"
234
+ },
235
+ "class_type": "FluxGuidance",
236
+ "inputs": {
237
+ "conditioning": [
238
+ "22",
239
+ 0
240
+ ],
241
+ "guidance": 30.0
242
+ }
243
+ },
244
+ "24": {
245
+ "_meta": {
246
+ "title": "Negative (unused, cfg 1)"
247
+ },
248
+ "class_type": "CLIPTextEncode",
249
+ "inputs": {
250
+ "clip": [
251
+ "19",
252
+ 0
253
+ ],
254
+ "text": ""
255
+ }
256
+ },
257
+ "25": {
258
+ "_meta": {
259
+ "title": "process_long_side (sampling res cap)"
260
+ },
261
+ "class_type": "PrimitiveInt",
262
+ "inputs": {
263
+ "value": 1536
264
+ }
265
+ },
266
+ "26": {
267
+ "_meta": {
268
+ "title": "process scale"
269
+ },
270
+ "class_type": "MathExpression|pysssss",
271
+ "inputs": {
272
+ "a": [
273
+ "15",
274
+ 0
275
+ ],
276
+ "c": [
277
+ "25",
278
+ 0
279
+ ],
280
+ "expression": "min(1, c / max(a.width, a.height))"
281
+ }
282
+ },
283
+ "27": {
284
+ "_meta": {
285
+ "title": "work width"
286
+ },
287
+ "class_type": "MathExpression|pysssss",
288
+ "inputs": {
289
+ "a": [
290
+ "15",
291
+ 0
292
+ ],
293
+ "b": [
294
+ "26",
295
+ 1
296
+ ],
297
+ "expression": "round(a.width * b / 16) * 16"
298
+ }
299
+ },
300
+ "28": {
301
+ "_meta": {
302
+ "title": "work height"
303
+ },
304
+ "class_type": "MathExpression|pysssss",
305
+ "inputs": {
306
+ "a": [
307
+ "15",
308
+ 0
309
+ ],
310
+ "b": [
311
+ "26",
312
+ 1
313
+ ],
314
+ "expression": "round(a.height * b / 16) * 16"
315
+ }
316
+ },
317
+ "29": {
318
+ "_meta": {
319
+ "title": "Downscale for sampling"
320
+ },
321
+ "class_type": "ImageScale",
322
+ "inputs": {
323
+ "crop": "disabled",
324
+ "height": [
325
+ "28",
326
+ 0
327
+ ],
328
+ "image": [
329
+ "15",
330
+ 0
331
+ ],
332
+ "upscale_method": "lanczos",
333
+ "width": [
334
+ "27",
335
+ 0
336
+ ]
337
+ }
338
+ },
339
+ "3": {
340
+ "_meta": {
341
+ "title": "target_height"
342
+ },
343
+ "class_type": "PrimitiveInt",
344
+ "inputs": {
345
+ "value": 1216
346
+ }
347
+ },
348
+ "30": {
349
+ "class_type": "MaskToImage",
350
+ "inputs": {
351
+ "mask": [
352
+ "15",
353
+ 1
354
+ ]
355
+ }
356
+ },
357
+ "31": {
358
+ "_meta": {
359
+ "title": "Downscale mask"
360
+ },
361
+ "class_type": "ImageScale",
362
+ "inputs": {
363
+ "crop": "disabled",
364
+ "height": [
365
+ "28",
366
+ 0
367
+ ],
368
+ "image": [
369
+ "30",
370
+ 0
371
+ ],
372
+ "upscale_method": "bilinear",
373
+ "width": [
374
+ "27",
375
+ 0
376
+ ]
377
+ }
378
+ },
379
+ "32": {
380
+ "class_type": "ImageToMask",
381
+ "inputs": {
382
+ "channel": "red",
383
+ "image": [
384
+ "31",
385
+ 0
386
+ ]
387
+ }
388
+ },
389
+ "33": {
390
+ "_meta": {
391
+ "title": "Pass 1 conditioning"
392
+ },
393
+ "class_type": "InpaintModelConditioning",
394
+ "inputs": {
395
+ "mask": [
396
+ "32",
397
+ 0
398
+ ],
399
+ "negative": [
400
+ "24",
401
+ 0
402
+ ],
403
+ "noise_mask": true,
404
+ "pixels": [
405
+ "29",
406
+ 0
407
+ ],
408
+ "positive": [
409
+ "23",
410
+ 0
411
+ ],
412
+ "vae": [
413
+ "20",
414
+ 0
415
+ ]
416
+ }
417
+ },
418
+ "34": {
419
+ "_meta": {
420
+ "title": "Pass 1: outpaint (working res)"
421
+ },
422
+ "class_type": "KSampler",
423
+ "inputs": {
424
+ "cfg": 1.0,
425
+ "denoise": 1.0,
426
+ "latent_image": [
427
+ "33",
428
+ 2
429
+ ],
430
+ "model": [
431
+ "18",
432
+ 0
433
+ ],
434
+ "negative": [
435
+ "33",
436
+ 1
437
+ ],
438
+ "positive": [
439
+ "33",
440
+ 0
441
+ ],
442
+ "sampler_name": "euler",
443
+ "scheduler": "simple",
444
+ "seed": 0,
445
+ "steps": 8
446
+ }
447
+ },
448
+ "35": {
449
+ "class_type": "VAEDecode",
450
+ "inputs": {
451
+ "samples": [
452
+ "34",
453
+ 0
454
+ ],
455
+ "vae": [
456
+ "20",
457
+ 0
458
+ ]
459
+ }
460
+ },
461
+ "36": {
462
+ "class_type": "UpscaleModelLoader",
463
+ "inputs": {
464
+ "model_name": "RealESRGAN_x4plus.pth"
465
+ }
466
+ },
467
+ "37": {
468
+ "class_type": "ImageUpscaleWithModel",
469
+ "inputs": {
470
+ "image": [
471
+ "35",
472
+ 0
473
+ ],
474
+ "upscale_model": [
475
+ "36",
476
+ 0
477
+ ]
478
+ }
479
+ },
480
+ "38": {
481
+ "_meta": {
482
+ "title": "Pass 1 result at target res"
483
+ },
484
+ "class_type": "ImageScale",
485
+ "inputs": {
486
+ "crop": "disabled",
487
+ "height": [
488
+ "3",
489
+ 0
490
+ ],
491
+ "image": [
492
+ "37",
493
+ 0
494
+ ],
495
+ "upscale_method": "lanczos",
496
+ "width": [
497
+ "2",
498
+ 0
499
+ ]
500
+ }
501
+ },
502
+ "39": {
503
+ "_meta": {
504
+ "title": "Refine mask (fill + blend band)"
505
+ },
506
+ "class_type": "GrowMaskWithBlur",
507
+ "inputs": {
508
+ "blur_radius": 12.0,
509
+ "decay_factor": 1.0,
510
+ "expand": 8,
511
+ "fill_holes": false,
512
+ "flip_input": false,
513
+ "incremental_expandrate": 0.0,
514
+ "lerp_alpha": 1.0,
515
+ "mask": [
516
+ "15",
517
+ 1
518
+ ],
519
+ "tapered_corners": true
520
+ }
521
+ },
522
+ "4": {
523
+ "_meta": {
524
+ "title": "anchor_x (0=left 0.5=center 1=right)"
525
+ },
526
+ "class_type": "PrimitiveFloat",
527
+ "inputs": {
528
+ "value": 0.5
529
+ }
530
+ },
531
+ "40": {
532
+ "_meta": {
533
+ "title": "refine_denoise (texture strength)"
534
+ },
535
+ "class_type": "PrimitiveFloat",
536
+ "inputs": {
537
+ "value": 0.35
538
+ }
539
+ },
540
+ "41": {
541
+ "_meta": {
542
+ "title": "Pass 2 conditioning (full res)"
543
+ },
544
+ "class_type": "InpaintModelConditioning",
545
+ "inputs": {
546
+ "mask": [
547
+ "39",
548
+ 0
549
+ ],
550
+ "negative": [
551
+ "24",
552
+ 0
553
+ ],
554
+ "noise_mask": true,
555
+ "pixels": [
556
+ "38",
557
+ 0
558
+ ],
559
+ "positive": [
560
+ "23",
561
+ 0
562
+ ],
563
+ "vae": [
564
+ "20",
565
+ 0
566
+ ]
567
+ }
568
+ },
569
+ "42": {
570
+ "_meta": {
571
+ "title": "Pass 2: full-res refine"
572
+ },
573
+ "class_type": "KSampler",
574
+ "inputs": {
575
+ "cfg": 1.0,
576
+ "denoise": [
577
+ "40",
578
+ 0
579
+ ],
580
+ "latent_image": [
581
+ "41",
582
+ 2
583
+ ],
584
+ "model": [
585
+ "18",
586
+ 0
587
+ ],
588
+ "negative": [
589
+ "41",
590
+ 1
591
+ ],
592
+ "positive": [
593
+ "41",
594
+ 0
595
+ ],
596
+ "sampler_name": "euler",
597
+ "scheduler": "simple",
598
+ "seed": 0,
599
+ "steps": 8
600
+ }
601
+ },
602
+ "43": {
603
+ "class_type": "VAEDecode",
604
+ "inputs": {
605
+ "samples": [
606
+ "42",
607
+ 0
608
+ ],
609
+ "vae": [
610
+ "20",
611
+ 0
612
+ ]
613
+ }
614
+ },
615
+ "44": {
616
+ "_meta": {
617
+ "title": "Snap to exact target dims"
618
+ },
619
+ "class_type": "ImageScale",
620
+ "inputs": {
621
+ "crop": "disabled",
622
+ "height": [
623
+ "3",
624
+ 0
625
+ ],
626
+ "image": [
627
+ "43",
628
+ 0
629
+ ],
630
+ "upscale_method": "lanczos",
631
+ "width": [
632
+ "2",
633
+ 0
634
+ ]
635
+ }
636
+ },
637
+ "45": {
638
+ "_meta": {
639
+ "title": "Match fill tones to original"
640
+ },
641
+ "class_type": "ColorMatch",
642
+ "inputs": {
643
+ "image_ref": [
644
+ "10",
645
+ 0
646
+ ],
647
+ "image_target": [
648
+ "44",
649
+ 0
650
+ ],
651
+ "method": "mkl",
652
+ "multithread": true,
653
+ "strength": 1.0
654
+ }
655
+ },
656
+ "46": {
657
+ "_meta": {
658
+ "title": "fill_grain (match photo noise, 0=off)"
659
+ },
660
+ "class_type": "PrimitiveFloat",
661
+ "inputs": {
662
+ "value": 0.03
663
+ }
664
+ },
665
+ "47": {
666
+ "_meta": {
667
+ "title": "Grain the fill to match original"
668
+ },
669
+ "class_type": "ImageAddNoise",
670
+ "inputs": {
671
+ "image": [
672
+ "45",
673
+ 0
674
+ ],
675
+ "seed": 0,
676
+ "strength": [
677
+ "46",
678
+ 0
679
+ ]
680
+ }
681
+ },
682
+ "48": {
683
+ "_meta": {
684
+ "title": "Paste original pixels back"
685
+ },
686
+ "class_type": "ImageCompositeMasked",
687
+ "inputs": {
688
+ "destination": [
689
+ "47",
690
+ 0
691
+ ],
692
+ "mask": [
693
+ "16",
694
+ 0
695
+ ],
696
+ "resize_source": false,
697
+ "source": [
698
+ "15",
699
+ 0
700
+ ],
701
+ "x": 0,
702
+ "y": 0
703
+ }
704
+ },
705
+ "49": {
706
+ "class_type": "SaveImage",
707
+ "inputs": {
708
+ "filename_prefix": "outpaint/flux-hq",
709
+ "images": [
710
+ "48",
711
+ 0
712
+ ]
713
+ }
714
+ },
715
+ "5": {
716
+ "_meta": {
717
+ "title": "anchor_y (0=top 0.5=center 1=bottom)"
718
+ },
719
+ "class_type": "PrimitiveFloat",
720
+ "inputs": {
721
+ "value": 0.5
722
+ }
723
+ },
724
+ "6": {
725
+ "_meta": {
726
+ "title": "feathering (px)"
727
+ },
728
+ "class_type": "PrimitiveInt",
729
+ "inputs": {
730
+ "value": 64
731
+ }
732
+ },
733
+ "7": {
734
+ "_meta": {
735
+ "title": "fit scale"
736
+ },
737
+ "class_type": "MathExpression|pysssss",
738
+ "inputs": {
739
+ "a": [
740
+ "1",
741
+ 0
742
+ ],
743
+ "b": [
744
+ "2",
745
+ 0
746
+ ],
747
+ "c": [
748
+ "3",
749
+ 0
750
+ ],
751
+ "expression": "min(b / a.width, c / a.height)"
752
+ }
753
+ },
754
+ "8": {
755
+ "_meta": {
756
+ "title": "fit width"
757
+ },
758
+ "class_type": "MathExpression|pysssss",
759
+ "inputs": {
760
+ "a": [
761
+ "1",
762
+ 0
763
+ ],
764
+ "b": [
765
+ "7",
766
+ 1
767
+ ],
768
+ "c": [
769
+ "2",
770
+ 0
771
+ ],
772
+ "expression": "min(round(a.width * b), c)"
773
+ }
774
+ },
775
+ "9": {
776
+ "_meta": {
777
+ "title": "fit height"
778
+ },
779
+ "class_type": "MathExpression|pysssss",
780
+ "inputs": {
781
+ "a": [
782
+ "1",
783
+ 0
784
+ ],
785
+ "b": [
786
+ "7",
787
+ 1
788
+ ],
789
+ "c": [
790
+ "3",
791
+ 0
792
+ ],
793
+ "expression": "min(round(a.height * b), c)"
794
+ }
795
+ }
796
+ }