aleph65 commited on
Commit
96ce0be
·
verified ·
1 Parent(s): a5e9cb2

Upload workflows/api/outpaint-lama.json with huggingface_hub

Browse files
Files changed (1) hide show
  1. workflows/api/outpaint-lama.json +354 -0
workflows/api/outpaint-lama.json ADDED
@@ -0,0 +1,354 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "_meta": {
163
+ "title": "LaMa model"
164
+ },
165
+ "class_type": "INPAINT_LoadInpaintModel",
166
+ "inputs": {
167
+ "model_name": "big-lama.pt"
168
+ }
169
+ },
170
+ "18": {
171
+ "_meta": {
172
+ "title": "LaMa fill"
173
+ },
174
+ "class_type": "INPAINT_InpaintWithModel",
175
+ "inputs": {
176
+ "image": [
177
+ "15",
178
+ 0
179
+ ],
180
+ "inpaint_model": [
181
+ "17",
182
+ 0
183
+ ],
184
+ "mask": [
185
+ "15",
186
+ 1
187
+ ],
188
+ "seed": 0
189
+ }
190
+ },
191
+ "19": {
192
+ "_meta": {
193
+ "title": "Snap to exact target dims"
194
+ },
195
+ "class_type": "ImageScale",
196
+ "inputs": {
197
+ "crop": "disabled",
198
+ "height": [
199
+ "3",
200
+ 0
201
+ ],
202
+ "image": [
203
+ "18",
204
+ 0
205
+ ],
206
+ "upscale_method": "lanczos",
207
+ "width": [
208
+ "2",
209
+ 0
210
+ ]
211
+ }
212
+ },
213
+ "2": {
214
+ "_meta": {
215
+ "title": "target_width"
216
+ },
217
+ "class_type": "PrimitiveInt",
218
+ "inputs": {
219
+ "value": 1216
220
+ }
221
+ },
222
+ "20": {
223
+ "_meta": {
224
+ "title": "Paste original pixels back"
225
+ },
226
+ "class_type": "ImageCompositeMasked",
227
+ "inputs": {
228
+ "destination": [
229
+ "19",
230
+ 0
231
+ ],
232
+ "mask": [
233
+ "16",
234
+ 0
235
+ ],
236
+ "resize_source": false,
237
+ "source": [
238
+ "15",
239
+ 0
240
+ ],
241
+ "x": 0,
242
+ "y": 0
243
+ }
244
+ },
245
+ "21": {
246
+ "class_type": "SaveImage",
247
+ "inputs": {
248
+ "filename_prefix": "outpaint/lama",
249
+ "images": [
250
+ "20",
251
+ 0
252
+ ]
253
+ }
254
+ },
255
+ "3": {
256
+ "_meta": {
257
+ "title": "target_height"
258
+ },
259
+ "class_type": "PrimitiveInt",
260
+ "inputs": {
261
+ "value": 1216
262
+ }
263
+ },
264
+ "4": {
265
+ "_meta": {
266
+ "title": "anchor_x (0=left 0.5=center 1=right)"
267
+ },
268
+ "class_type": "PrimitiveFloat",
269
+ "inputs": {
270
+ "value": 0.5
271
+ }
272
+ },
273
+ "5": {
274
+ "_meta": {
275
+ "title": "anchor_y (0=top 0.5=center 1=bottom)"
276
+ },
277
+ "class_type": "PrimitiveFloat",
278
+ "inputs": {
279
+ "value": 0.5
280
+ }
281
+ },
282
+ "6": {
283
+ "_meta": {
284
+ "title": "feathering (px)"
285
+ },
286
+ "class_type": "PrimitiveInt",
287
+ "inputs": {
288
+ "value": 16
289
+ }
290
+ },
291
+ "7": {
292
+ "_meta": {
293
+ "title": "fit scale"
294
+ },
295
+ "class_type": "MathExpression|pysssss",
296
+ "inputs": {
297
+ "a": [
298
+ "1",
299
+ 0
300
+ ],
301
+ "b": [
302
+ "2",
303
+ 0
304
+ ],
305
+ "c": [
306
+ "3",
307
+ 0
308
+ ],
309
+ "expression": "min(b / a.width, c / a.height)"
310
+ }
311
+ },
312
+ "8": {
313
+ "_meta": {
314
+ "title": "fit width"
315
+ },
316
+ "class_type": "MathExpression|pysssss",
317
+ "inputs": {
318
+ "a": [
319
+ "1",
320
+ 0
321
+ ],
322
+ "b": [
323
+ "7",
324
+ 1
325
+ ],
326
+ "c": [
327
+ "2",
328
+ 0
329
+ ],
330
+ "expression": "min(round(a.width * b), c)"
331
+ }
332
+ },
333
+ "9": {
334
+ "_meta": {
335
+ "title": "fit height"
336
+ },
337
+ "class_type": "MathExpression|pysssss",
338
+ "inputs": {
339
+ "a": [
340
+ "1",
341
+ 0
342
+ ],
343
+ "b": [
344
+ "7",
345
+ 1
346
+ ],
347
+ "c": [
348
+ "3",
349
+ 0
350
+ ],
351
+ "expression": "min(round(a.height * b), c)"
352
+ }
353
+ }
354
+ }