@howells/motif-sdk 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/image.js +38 -31
- package/dist/index.cjs +687 -33
- package/dist/index.d.cts +191 -10
- package/dist/index.d.ts +191 -10
- package/dist/index.js +676 -32
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -28,6 +28,7 @@ __export(src_exports, {
|
|
|
28
28
|
FAL_TOOLS: () => FAL_TOOLS,
|
|
29
29
|
FAL_TOOLS_CHECKED_AT: () => FAL_TOOLS_CHECKED_AT,
|
|
30
30
|
FAL_TOOL_IDS: () => FAL_TOOL_IDS,
|
|
31
|
+
FAL_TOOL_PARAMETERS: () => FAL_TOOL_PARAMETERS,
|
|
31
32
|
FORMAT_PRESETS: () => FORMAT_PRESETS,
|
|
32
33
|
FalClient: () => FalClient,
|
|
33
34
|
GENERATION_MODELS: () => GENERATION_MODELS,
|
|
@@ -35,6 +36,7 @@ __export(src_exports, {
|
|
|
35
36
|
IMAGE_EDITING_TOP_20: () => IMAGE_EDITING_TOP_20,
|
|
36
37
|
IMAGE_TEXT_TO_IMAGE_TOP_20: () => IMAGE_TEXT_TO_IMAGE_TOP_20,
|
|
37
38
|
MODELS: () => MODELS,
|
|
39
|
+
MODEL_OUTPUT: () => MODEL_OUTPUT,
|
|
38
40
|
MotifError: () => MotifError,
|
|
39
41
|
RECRAFT_STYLES: () => RECRAFT_STYLES,
|
|
40
42
|
RESOLUTIONS: () => RESOLUTIONS,
|
|
@@ -46,16 +48,24 @@ __export(src_exports, {
|
|
|
46
48
|
aspectToGptSize: () => aspectToGptSize,
|
|
47
49
|
buildFalToolRequest: () => buildFalToolRequest,
|
|
48
50
|
buildGenerateBody: () => buildGenerateBody,
|
|
51
|
+
describeModelOutput: () => describeModelOutput,
|
|
49
52
|
enrichPrompt: () => enrichPrompt,
|
|
50
53
|
err: () => import_neverthrow3.err,
|
|
51
54
|
estimateCost: () => estimateCost,
|
|
52
55
|
estimateVideoCost: () => estimateVideoCost,
|
|
56
|
+
falToolParameters: () => falToolParameters,
|
|
57
|
+
formatCost: () => formatCost,
|
|
53
58
|
getFalKeyFromEnv: () => getFalKeyFromEnv,
|
|
54
59
|
isFalToolId: () => isFalToolId,
|
|
60
|
+
losslessAvailability: () => losslessAvailability,
|
|
61
|
+
measuredToolCost: () => measuredToolCost,
|
|
62
|
+
modelOutput: () => modelOutput,
|
|
55
63
|
motifEnvSchema: () => motifEnvSchema,
|
|
56
64
|
ok: () => import_neverthrow3.ok,
|
|
57
65
|
parseMotifEnv: () => parseMotifEnv,
|
|
58
|
-
|
|
66
|
+
projectedToolCost: () => projectedToolCost,
|
|
67
|
+
sanitizePrompt: () => sanitizePrompt,
|
|
68
|
+
sumCosts: () => sumCosts
|
|
59
69
|
});
|
|
60
70
|
module.exports = __toCommonJS(src_exports);
|
|
61
71
|
var import_neverthrow3 = require("neverthrow");
|
|
@@ -171,10 +181,10 @@ var MODELS = {
|
|
|
171
181
|
gpt2: {
|
|
172
182
|
benchmark: {
|
|
173
183
|
artificialAnalysis: {
|
|
174
|
-
editing: { elo: 1256,
|
|
184
|
+
editing: { elo: 1256, rank: 3 },
|
|
175
185
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
176
186
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
177
|
-
textToImage: { elo: 1369,
|
|
187
|
+
textToImage: { elo: 1369, rank: 1 }
|
|
178
188
|
},
|
|
179
189
|
speed: {
|
|
180
190
|
medianSeconds: 200.7,
|
|
@@ -214,10 +224,10 @@ var MODELS = {
|
|
|
214
224
|
gpt: {
|
|
215
225
|
benchmark: {
|
|
216
226
|
artificialAnalysis: {
|
|
217
|
-
editing: { elo: 1250,
|
|
227
|
+
editing: { elo: 1250, rank: 5 },
|
|
218
228
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
219
229
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
220
|
-
textToImage: { elo: 1310,
|
|
230
|
+
textToImage: { elo: 1310, rank: 4 }
|
|
221
231
|
},
|
|
222
232
|
speed: {
|
|
223
233
|
medianSeconds: 34.6,
|
|
@@ -257,10 +267,10 @@ var MODELS = {
|
|
|
257
267
|
banana2: {
|
|
258
268
|
benchmark: {
|
|
259
269
|
artificialAnalysis: {
|
|
260
|
-
editing: { elo: 1249,
|
|
270
|
+
editing: { elo: 1249, rank: 7 },
|
|
261
271
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
262
272
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
263
|
-
textToImage: { elo: 1320,
|
|
273
|
+
textToImage: { elo: 1320, rank: 3 }
|
|
264
274
|
},
|
|
265
275
|
tiers: { price: "premium", quality: "frontier", speed: "unknown" },
|
|
266
276
|
useCase: "Best balance of quality, edit support, web search, and cost"
|
|
@@ -298,10 +308,10 @@ var MODELS = {
|
|
|
298
308
|
banana: {
|
|
299
309
|
benchmark: {
|
|
300
310
|
artificialAnalysis: {
|
|
301
|
-
editing: { elo: 1245,
|
|
311
|
+
editing: { elo: 1245, rank: 9 },
|
|
302
312
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
303
313
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
304
|
-
textToImage: { elo: 1297,
|
|
314
|
+
textToImage: { elo: 1297, rank: 6 }
|
|
305
315
|
},
|
|
306
316
|
speed: {
|
|
307
317
|
medianSeconds: 19.2,
|
|
@@ -343,7 +353,7 @@ var MODELS = {
|
|
|
343
353
|
gemini: {
|
|
344
354
|
benchmark: {
|
|
345
355
|
artificialAnalysis: {
|
|
346
|
-
editing: { elo: 1180,
|
|
356
|
+
editing: { elo: 1180, rank: 29 },
|
|
347
357
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
348
358
|
sourceUrls: AA_IMAGE_SOURCES
|
|
349
359
|
}
|
|
@@ -377,10 +387,10 @@ var MODELS = {
|
|
|
377
387
|
gemini3: {
|
|
378
388
|
benchmark: {
|
|
379
389
|
artificialAnalysis: {
|
|
380
|
-
editing: { elo: 1245,
|
|
390
|
+
editing: { elo: 1245, rank: 9 },
|
|
381
391
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
382
392
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
383
|
-
textToImage: { elo: 1297,
|
|
393
|
+
textToImage: { elo: 1297, rank: 6 }
|
|
384
394
|
}
|
|
385
395
|
},
|
|
386
396
|
editEndpoint: "fal-ai/gemini-3-pro-image-preview/edit",
|
|
@@ -413,10 +423,10 @@ var MODELS = {
|
|
|
413
423
|
seedream4: {
|
|
414
424
|
benchmark: {
|
|
415
425
|
artificialAnalysis: {
|
|
416
|
-
editing: { elo: 1185,
|
|
426
|
+
editing: { elo: 1185, rank: 28 },
|
|
417
427
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
418
428
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
419
|
-
textToImage: { elo: 1226,
|
|
429
|
+
textToImage: { elo: 1226, rank: 16 }
|
|
420
430
|
},
|
|
421
431
|
speed: {
|
|
422
432
|
medianSeconds: 14.3,
|
|
@@ -453,10 +463,10 @@ var MODELS = {
|
|
|
453
463
|
seedream45: {
|
|
454
464
|
benchmark: {
|
|
455
465
|
artificialAnalysis: {
|
|
456
|
-
editing: { elo: 1186,
|
|
466
|
+
editing: { elo: 1186, rank: 26 },
|
|
457
467
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
458
468
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
459
|
-
textToImage: { elo: 1203,
|
|
469
|
+
textToImage: { elo: 1203, rank: 32 }
|
|
460
470
|
},
|
|
461
471
|
speed: {
|
|
462
472
|
medianSeconds: 18.2,
|
|
@@ -493,10 +503,10 @@ var MODELS = {
|
|
|
493
503
|
seedream5: {
|
|
494
504
|
benchmark: {
|
|
495
505
|
artificialAnalysis: {
|
|
496
|
-
editing: { elo: 1248,
|
|
506
|
+
editing: { elo: 1248, rank: 8 },
|
|
497
507
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
498
508
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
499
|
-
textToImage: { elo: 1279,
|
|
509
|
+
textToImage: { elo: 1279, rank: 10 }
|
|
500
510
|
}
|
|
501
511
|
},
|
|
502
512
|
name: "Seedream 5.0 Pro",
|
|
@@ -527,7 +537,7 @@ var MODELS = {
|
|
|
527
537
|
"seedream5-lite": {
|
|
528
538
|
benchmark: {
|
|
529
539
|
artificialAnalysis: {
|
|
530
|
-
editing: { elo: 1169,
|
|
540
|
+
editing: { elo: 1169, rank: 32 },
|
|
531
541
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
532
542
|
sourceUrls: AA_IMAGE_SOURCES
|
|
533
543
|
}
|
|
@@ -560,10 +570,10 @@ var MODELS = {
|
|
|
560
570
|
"flux2-max": {
|
|
561
571
|
benchmark: {
|
|
562
572
|
artificialAnalysis: {
|
|
563
|
-
editing: { elo: 1201,
|
|
573
|
+
editing: { elo: 1201, rank: 19 },
|
|
564
574
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
565
575
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
566
|
-
textToImage: { elo: 1225,
|
|
576
|
+
textToImage: { elo: 1225, rank: 17 }
|
|
567
577
|
},
|
|
568
578
|
speed: {
|
|
569
579
|
medianSeconds: 31.6,
|
|
@@ -603,10 +613,10 @@ var MODELS = {
|
|
|
603
613
|
"flux2-pro": {
|
|
604
614
|
benchmark: {
|
|
605
615
|
artificialAnalysis: {
|
|
606
|
-
editing: { elo: 1170,
|
|
616
|
+
editing: { elo: 1170, rank: 31 },
|
|
607
617
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
608
618
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
609
|
-
textToImage: { elo: 1207,
|
|
619
|
+
textToImage: { elo: 1207, rank: 30 }
|
|
610
620
|
},
|
|
611
621
|
speed: {
|
|
612
622
|
medianSeconds: 16.1,
|
|
@@ -648,7 +658,7 @@ var MODELS = {
|
|
|
648
658
|
artificialAnalysis: {
|
|
649
659
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
650
660
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
651
|
-
textToImage: { elo: 1223,
|
|
661
|
+
textToImage: { elo: 1223, rank: 18 }
|
|
652
662
|
},
|
|
653
663
|
speed: {
|
|
654
664
|
medianSeconds: 15.3,
|
|
@@ -841,10 +851,10 @@ var MODELS = {
|
|
|
841
851
|
// #2 on BOTH boards, which almost nothing else manages - the top text-to-image model
|
|
842
852
|
// (GPT Image 2) drops to 3rd for editing, and the top editor (MAI-Image-2.5-Pro) is not
|
|
843
853
|
// on fal at all. Reve is the best editor motif can actually reach.
|
|
844
|
-
editing: { elo: 1263,
|
|
854
|
+
editing: { elo: 1263, rank: 2 },
|
|
845
855
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
846
856
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
847
|
-
textToImage: { elo: 1322,
|
|
857
|
+
textToImage: { elo: 1322, rank: 2 }
|
|
848
858
|
},
|
|
849
859
|
tiers: { price: "premium", quality: "frontier", speed: "unknown" },
|
|
850
860
|
useCase: "Highest-ranked editor reachable on fal; strong prompt adherence and text rendering"
|
|
@@ -881,7 +891,7 @@ var MODELS = {
|
|
|
881
891
|
artificialAnalysis: {
|
|
882
892
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
883
893
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
884
|
-
textToImage: { elo: 1215,
|
|
894
|
+
textToImage: { elo: 1215, rank: 25 }
|
|
885
895
|
}
|
|
886
896
|
},
|
|
887
897
|
endpoint: "fal-ai/recraft/v4/text-to-image",
|
|
@@ -938,7 +948,7 @@ var MODELS = {
|
|
|
938
948
|
artificialAnalysis: {
|
|
939
949
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
940
950
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
941
|
-
textToImage: { elo: 1220,
|
|
951
|
+
textToImage: { elo: 1220, rank: 19 }
|
|
942
952
|
}
|
|
943
953
|
},
|
|
944
954
|
name: "Ideogram V4",
|
|
@@ -973,10 +983,10 @@ var MODELS = {
|
|
|
973
983
|
"grok-image": {
|
|
974
984
|
benchmark: {
|
|
975
985
|
artificialAnalysis: {
|
|
976
|
-
editing: { elo: 1214,
|
|
986
|
+
editing: { elo: 1214, rank: 16 },
|
|
977
987
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
978
988
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
979
|
-
textToImage: { elo: 1216,
|
|
989
|
+
textToImage: { elo: 1216, rank: 23 }
|
|
980
990
|
},
|
|
981
991
|
speed: {
|
|
982
992
|
medianSeconds: 5.1,
|
|
@@ -1050,10 +1060,10 @@ var MODELS = {
|
|
|
1050
1060
|
qwen3: {
|
|
1051
1061
|
benchmark: {
|
|
1052
1062
|
artificialAnalysis: {
|
|
1053
|
-
editing: { elo: 1218,
|
|
1063
|
+
editing: { elo: 1218, rank: 15 },
|
|
1054
1064
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
1055
1065
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
1056
|
-
textToImage: { elo: 1272,
|
|
1066
|
+
textToImage: { elo: 1272, rank: 11 }
|
|
1057
1067
|
},
|
|
1058
1068
|
tiers: { price: "budget", quality: "better", speed: "unknown" },
|
|
1059
1069
|
useCase: "Strong quality per dollar - 11th on text-to-image at $30/1k"
|
|
@@ -2764,6 +2774,13 @@ var ASSET_TOOLS = {
|
|
|
2764
2774
|
inputKind: "image",
|
|
2765
2775
|
name: "Seedream v5 Pro Layerize",
|
|
2766
2776
|
outputKeys: ["layers", "images"],
|
|
2777
|
+
// Every element of `layers` carries its own `name` ("Left amber glass
|
|
2778
|
+
// bottle") and a `z_index` that orders the stack, verified live. Without
|
|
2779
|
+
// this the stack lands as layers.png … layers-5.png and the only way to
|
|
2780
|
+
// tell the reconstructed background plate from an object is to open them.
|
|
2781
|
+
outputLabels: {
|
|
2782
|
+
layers: { fromItem: { nameField: "name", orderField: "z_index" } }
|
|
2783
|
+
},
|
|
2767
2784
|
price: { kind: "metered" },
|
|
2768
2785
|
pricing: "$0.03375 per generated layer below 1536x1536 total area, $0.0675 per layer above; the listed rate is per layer, not per call",
|
|
2769
2786
|
queued: true,
|
|
@@ -4271,6 +4288,633 @@ var FalClient = class {
|
|
|
4271
4288
|
});
|
|
4272
4289
|
}
|
|
4273
4290
|
};
|
|
4291
|
+
|
|
4292
|
+
// src/tool-cost.ts
|
|
4293
|
+
var UNKNOWN = { basis: "unknown", usd: null };
|
|
4294
|
+
function totalMegapixels(outputs) {
|
|
4295
|
+
let pixels = 0;
|
|
4296
|
+
let measured = 0;
|
|
4297
|
+
for (const output of outputs) {
|
|
4298
|
+
if (output.width !== void 0 && output.height !== void 0) {
|
|
4299
|
+
pixels += output.width * output.height;
|
|
4300
|
+
measured += 1;
|
|
4301
|
+
}
|
|
4302
|
+
}
|
|
4303
|
+
return measured === 0 ? null : pixels / 1e6;
|
|
4304
|
+
}
|
|
4305
|
+
function projectedToolCost(price) {
|
|
4306
|
+
return price.kind === "call" ? { basis: "projected", usd: price.usd } : UNKNOWN;
|
|
4307
|
+
}
|
|
4308
|
+
function measuredToolCost(price, outputs) {
|
|
4309
|
+
if (price.kind === "call") {
|
|
4310
|
+
return { basis: "measured", usd: price.usd };
|
|
4311
|
+
}
|
|
4312
|
+
if (price.kind === "megapixel") {
|
|
4313
|
+
const megapixels = totalMegapixels(outputs);
|
|
4314
|
+
return megapixels === null ? UNKNOWN : { basis: "measured", usd: price.usd * megapixels };
|
|
4315
|
+
}
|
|
4316
|
+
return UNKNOWN;
|
|
4317
|
+
}
|
|
4318
|
+
function formatCost(usd) {
|
|
4319
|
+
return usd === null ? "metered" : `$${usd.toFixed(3)}`;
|
|
4320
|
+
}
|
|
4321
|
+
function sumCosts(costs) {
|
|
4322
|
+
let known = 0;
|
|
4323
|
+
let unknown = 0;
|
|
4324
|
+
for (const cost of costs) {
|
|
4325
|
+
if (cost === null) {
|
|
4326
|
+
unknown += 1;
|
|
4327
|
+
} else {
|
|
4328
|
+
known += cost;
|
|
4329
|
+
}
|
|
4330
|
+
}
|
|
4331
|
+
return { known, unknown };
|
|
4332
|
+
}
|
|
4333
|
+
|
|
4334
|
+
// src/tool-parameters.generated.ts
|
|
4335
|
+
var FAL_TOOL_PARAMETERS = {
|
|
4336
|
+
"ben-v2": [
|
|
4337
|
+
{ key: "seed", type: "integer" }
|
|
4338
|
+
],
|
|
4339
|
+
"birefnet": [
|
|
4340
|
+
{ key: "mask_only", type: "boolean", fallback: false },
|
|
4341
|
+
{ key: "model", type: "enum(General Use (Light)|General Use (Light 2K)|General Use (Heavy)|Matting|Portrait|General Use (Dynamic))", fallback: "General Use (Light)" },
|
|
4342
|
+
{ key: "operating_resolution", type: "enum(1024x1024|2048x2048|2304x2304)", fallback: "1024x1024" },
|
|
4343
|
+
{ key: "output_format", type: "enum(webp|png|gif)", fallback: "png" },
|
|
4344
|
+
{ key: "output_mask", type: "boolean", fallback: false },
|
|
4345
|
+
{ key: "refine_foreground", type: "boolean", fallback: true }
|
|
4346
|
+
],
|
|
4347
|
+
"bria-eraser": [
|
|
4348
|
+
{ key: "mask_type", type: "enum(manual|automatic)", fallback: "manual" },
|
|
4349
|
+
{ key: "preserve_alpha", type: "boolean", fallback: false }
|
|
4350
|
+
],
|
|
4351
|
+
"bria-expand": [
|
|
4352
|
+
{ key: "aspect_ratio", type: "enum(1:1|2:3|3:2|3:4|4:3|4:5|5:4|9:16|16:9)" },
|
|
4353
|
+
{ key: "canvas_size", type: "list[integer]", required: true },
|
|
4354
|
+
{ key: "negative_prompt", type: "string", fallback: "" },
|
|
4355
|
+
{ key: "original_image_location", type: "list[integer]" },
|
|
4356
|
+
{ key: "original_image_size", type: "list[integer]" },
|
|
4357
|
+
{ key: "prompt", type: "string", fallback: "" },
|
|
4358
|
+
{ key: "seed", type: "integer" }
|
|
4359
|
+
],
|
|
4360
|
+
"bria-genfill": [
|
|
4361
|
+
{ key: "negative_prompt", type: "string", fallback: "" },
|
|
4362
|
+
{ key: "num_images", type: "integer", fallback: 1 },
|
|
4363
|
+
{ key: "prompt", type: "string", required: true },
|
|
4364
|
+
{ key: "seed", type: "integer" }
|
|
4365
|
+
],
|
|
4366
|
+
"bria-rmbg": [],
|
|
4367
|
+
"bria-video-rmbg": [
|
|
4368
|
+
{ key: "background_color", type: "enum(Transparent|Black|White|Gray|Red|Green|Blue|Yellow|Cyan|Magenta|Orange)", fallback: "Black" },
|
|
4369
|
+
{ key: "output_container_and_codec", type: "enum(mp4_h265|mp4_h264|webm_vp9|mov_h265|mov_proresks|mkv_h265|mkv_h264|mkv_vp9|gif)", fallback: "webm_vp9" },
|
|
4370
|
+
{ key: "preserve_audio", type: "boolean", fallback: true }
|
|
4371
|
+
],
|
|
4372
|
+
"ddcolor": [
|
|
4373
|
+
{ key: "seed", type: "integer" }
|
|
4374
|
+
],
|
|
4375
|
+
"depth-anything": [],
|
|
4376
|
+
"dwpose": [
|
|
4377
|
+
{ key: "draw_mode", type: "enum(full-pose|body-pose|face-pose|hand-pose|face-hand-mask|face-mask|hand-mask)", fallback: "body-pose" }
|
|
4378
|
+
],
|
|
4379
|
+
"finegrain-eraser": [
|
|
4380
|
+
{ key: "mode", type: "enum(express|standard|premium)", fallback: "standard" },
|
|
4381
|
+
{ key: "prompt", type: "string", required: true },
|
|
4382
|
+
{ key: "seed", type: "integer" }
|
|
4383
|
+
],
|
|
4384
|
+
"flux-outpaint": [
|
|
4385
|
+
{ key: "auto_crop", type: "boolean", fallback: false },
|
|
4386
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4387
|
+
{ key: "expand_bottom", type: "integer", fallback: 0 },
|
|
4388
|
+
{ key: "expand_left", type: "integer", fallback: 0 },
|
|
4389
|
+
{ key: "expand_right", type: "integer", fallback: 0 },
|
|
4390
|
+
{ key: "expand_top", type: "integer", fallback: 0 },
|
|
4391
|
+
{ key: "mode", type: "enum(high|fast)", fallback: "high" },
|
|
4392
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" }
|
|
4393
|
+
],
|
|
4394
|
+
"got-ocr": [
|
|
4395
|
+
{ key: "do_format", type: "boolean", fallback: false },
|
|
4396
|
+
{ key: "multi_page", type: "boolean", fallback: false }
|
|
4397
|
+
],
|
|
4398
|
+
"hed": [
|
|
4399
|
+
{ key: "safe", type: "boolean", fallback: false },
|
|
4400
|
+
{ key: "scribble", type: "boolean", fallback: false }
|
|
4401
|
+
],
|
|
4402
|
+
"hunyuan3d-v3": [
|
|
4403
|
+
{ key: "back_image_url", type: "string" },
|
|
4404
|
+
{ key: "enable_pbr", type: "boolean", fallback: false },
|
|
4405
|
+
{ key: "face_count", type: "integer", fallback: 5e5 },
|
|
4406
|
+
{ key: "generate_type", type: "enum(Normal|LowPoly|Geometry)", fallback: "Normal" },
|
|
4407
|
+
{ key: "left_image_url", type: "string" },
|
|
4408
|
+
{ key: "polygon_type", type: "enum(triangle|quadrilateral)", fallback: "triangle" },
|
|
4409
|
+
{ key: "right_image_url", type: "string" }
|
|
4410
|
+
],
|
|
4411
|
+
"iclight-v2": [
|
|
4412
|
+
{ key: "background_threshold", type: "number", fallback: 0.67 },
|
|
4413
|
+
{ key: "cfg", type: "number", fallback: 1 },
|
|
4414
|
+
{ key: "enable_hr_fix", type: "boolean", fallback: false },
|
|
4415
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4416
|
+
{ key: "guidance_scale", type: "number", fallback: 5 },
|
|
4417
|
+
{ key: "highres_denoise", type: "number", fallback: 0.95 },
|
|
4418
|
+
{ key: "hr_downscale", type: "number", fallback: 0.5 },
|
|
4419
|
+
{ key: "image_size", type: "object|enum(square_hd|square|portrait_4_3|portrait_16_9|landscape_4_3|landscape_16_9)" },
|
|
4420
|
+
{ key: "initial_latent", type: "enum(None|Left|Right|Top|Bottom)", fallback: "None" },
|
|
4421
|
+
{ key: "lowres_denoise", type: "number", fallback: 0.98 },
|
|
4422
|
+
{ key: "mask_image_url", type: "string" },
|
|
4423
|
+
{ key: "negative_prompt", type: "string", fallback: "" },
|
|
4424
|
+
{ key: "num_images", type: "integer", fallback: 1 },
|
|
4425
|
+
{ key: "num_inference_steps", type: "integer", fallback: 28 },
|
|
4426
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" },
|
|
4427
|
+
{ key: "prompt", type: "string", required: true },
|
|
4428
|
+
{ key: "seed", type: "integer" }
|
|
4429
|
+
],
|
|
4430
|
+
"ideogram-layerize-text": [
|
|
4431
|
+
{ key: "font_file_body_url", type: "string" },
|
|
4432
|
+
{ key: "font_file_h1_url", type: "string" },
|
|
4433
|
+
{ key: "font_file_h2_url", type: "string" },
|
|
4434
|
+
{ key: "font_file_small_url", type: "string" },
|
|
4435
|
+
{ key: "font_name_body", type: "string" },
|
|
4436
|
+
{ key: "font_name_h1", type: "string" },
|
|
4437
|
+
{ key: "font_name_h2", type: "string" },
|
|
4438
|
+
{ key: "font_name_small", type: "string" },
|
|
4439
|
+
{ key: "prompt", type: "string" },
|
|
4440
|
+
{ key: "seed", type: "integer" }
|
|
4441
|
+
],
|
|
4442
|
+
"ideogram-reframe": [
|
|
4443
|
+
{ key: "color_palette", type: "object" },
|
|
4444
|
+
{ key: "image_size", type: "object|enum(square_hd|square|portrait_4_3|portrait_16_9|landscape_4_3|landscape_16_9)", required: true },
|
|
4445
|
+
{ key: "num_images", type: "integer", fallback: 1 },
|
|
4446
|
+
{ key: "rendering_speed", type: "enum(TURBO|BALANCED|QUALITY)", fallback: "BALANCED" },
|
|
4447
|
+
{ key: "seed", type: "integer" },
|
|
4448
|
+
{ key: "style", type: "enum(AUTO|GENERAL|REALISTIC|DESIGN)" },
|
|
4449
|
+
{ key: "style_codes", type: "list[string]" },
|
|
4450
|
+
{ key: "style_preset", type: "enum(80S_ILLUSTRATION|90S_NOSTALGIA|ABSTRACT_ORGANIC|ANALOG_NOSTALGIA|ART_BRUT|ART_DECO|ART_POSTER|AURA|AVANT_GARDE|BAUHAUS|BLUEPRINT|BLURRY_MOTION|BRIGHT_ART|C4D_CARTOON|CHILDRENS_BOOK|COLLAGE|COLORING_BOOK_I|COLORING_BOOK_II|CUBISM|DARK_AURA|DOODLE|DOUBLE_EXPOSURE|DRAMATIC_CINEMA|EDITORIAL|EMOTIONAL_MINIMAL|ETHEREAL_PARTY|EXPIRED_FILM|FLAT_ART|FLAT_VECTOR|FOREST_REVERIE|GEO_MINIMALIST|GLASS_PRISM|GOLDEN_HOUR|GRAFFITI_I|GRAFFITI_II|HALFTONE_PRINT|HIGH_CONTRAST|HIPPIE_ERA|ICONIC|JAPANDI_FUSION|JAZZY|LONG_EXPOSURE|MAGAZINE_EDITORIAL|MINIMAL_ILLUSTRATION|MIXED_MEDIA|MONOCHROME|NIGHTLIFE|OIL_PAINTING|OLD_CARTOONS|PAINT_GESTURE|POP_ART|RETRO_ETCHING|RIVIERA_POP|SPOTLIGHT_80S|STYLIZED_RED|SURREAL_COLLAGE|TRAVEL_POSTER|VINTAGE_GEO|VINTAGE_POSTER|WATERCOLOR|WEIRD|WOODBLOCK_PRINT)" }
|
|
4451
|
+
],
|
|
4452
|
+
"ideogram-tiling": [
|
|
4453
|
+
{ key: "acceleration", type: "enum(none|low|regular|high)", fallback: "none" },
|
|
4454
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4455
|
+
{ key: "expansion_model", type: "enum(None|Medium|Large)", fallback: "Medium" },
|
|
4456
|
+
{ key: "image_size", type: "object|enum(square_hd|square|portrait_4_3|portrait_16_9|landscape_4_3|landscape_16_9)", fallback: "square_hd" },
|
|
4457
|
+
{ key: "num_images", type: "integer", fallback: 1 },
|
|
4458
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" },
|
|
4459
|
+
{ key: "prompt", type: "string", required: true },
|
|
4460
|
+
{ key: "rendering_speed", type: "enum(TURBO|BALANCED|QUALITY)", fallback: "BALANCED" },
|
|
4461
|
+
{ key: "seed", type: "integer" },
|
|
4462
|
+
{ key: "strength", type: "number", fallback: 0.8 },
|
|
4463
|
+
{ key: "tiling_mode", type: "enum(both|horizontal|vertical)", fallback: "both" }
|
|
4464
|
+
],
|
|
4465
|
+
"image2svg": [
|
|
4466
|
+
{ key: "color_precision", type: "integer", fallback: 6 },
|
|
4467
|
+
{ key: "colormode", type: "enum(color|binary)", fallback: "color" },
|
|
4468
|
+
{ key: "corner_threshold", type: "integer", fallback: 60 },
|
|
4469
|
+
{ key: "filter_speckle", type: "integer", fallback: 4 },
|
|
4470
|
+
{ key: "hierarchical", type: "enum(stacked|cutout)", fallback: "stacked" },
|
|
4471
|
+
{ key: "layer_difference", type: "integer", fallback: 16 },
|
|
4472
|
+
{ key: "length_threshold", type: "number", fallback: 4 },
|
|
4473
|
+
{ key: "max_iterations", type: "integer", fallback: 10 },
|
|
4474
|
+
{ key: "mode", type: "enum(spline|polygon)", fallback: "spline" },
|
|
4475
|
+
{ key: "path_precision", type: "integer", fallback: 3 },
|
|
4476
|
+
{ key: "splice_threshold", type: "integer", fallback: 45 }
|
|
4477
|
+
],
|
|
4478
|
+
"lighting-restoration": [
|
|
4479
|
+
{ key: "acceleration", type: "enum(none|regular)", fallback: "regular" },
|
|
4480
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4481
|
+
{ key: "guidance_scale", type: "number", fallback: 1 },
|
|
4482
|
+
{ key: "image_size", type: "object|enum(square_hd|square|portrait_4_3|portrait_16_9|landscape_4_3|landscape_16_9)" },
|
|
4483
|
+
{ key: "negative_prompt", type: "string", fallback: " " },
|
|
4484
|
+
{ key: "num_images", type: "integer", fallback: 1 },
|
|
4485
|
+
{ key: "num_inference_steps", type: "integer", fallback: 6 },
|
|
4486
|
+
{ key: "output_format", type: "enum(png|jpeg|webp)", fallback: "png" },
|
|
4487
|
+
{ key: "seed", type: "integer" }
|
|
4488
|
+
],
|
|
4489
|
+
"lineart": [
|
|
4490
|
+
{ key: "coarse", type: "boolean", fallback: false }
|
|
4491
|
+
],
|
|
4492
|
+
"marigold-depth": [
|
|
4493
|
+
{ key: "ensemble_size", type: "integer", fallback: 10 },
|
|
4494
|
+
{ key: "num_inference_steps", type: "integer", fallback: 10 },
|
|
4495
|
+
{ key: "processing_res", type: "integer", fallback: 0 }
|
|
4496
|
+
],
|
|
4497
|
+
"midas-depth": [
|
|
4498
|
+
{ key: "a", type: "number", fallback: 6.283185307179586 },
|
|
4499
|
+
{ key: "bg_th", type: "number", fallback: 0.1 },
|
|
4500
|
+
{ key: "depth_and_normal", type: "boolean", fallback: false }
|
|
4501
|
+
],
|
|
4502
|
+
"midas-preprocessor": [
|
|
4503
|
+
{ key: "a", type: "number", fallback: 6.283185307179586 },
|
|
4504
|
+
{ key: "background_threshold", type: "number", fallback: 0.1 }
|
|
4505
|
+
],
|
|
4506
|
+
"mlsd": [
|
|
4507
|
+
{ key: "distance_threshold", type: "number", fallback: 0.1 },
|
|
4508
|
+
{ key: "score_threshold", type: "number", fallback: 0.1 }
|
|
4509
|
+
],
|
|
4510
|
+
"moondream-caption": [
|
|
4511
|
+
{ key: "length", type: "enum(short|normal|long)", fallback: "normal" },
|
|
4512
|
+
{ key: "temperature", type: "number" },
|
|
4513
|
+
{ key: "top_p", type: "number" }
|
|
4514
|
+
],
|
|
4515
|
+
"moondream-detect": [
|
|
4516
|
+
{ key: "preview", type: "boolean", fallback: false },
|
|
4517
|
+
{ key: "prompt", type: "string", required: true }
|
|
4518
|
+
],
|
|
4519
|
+
"moondream-point": [
|
|
4520
|
+
{ key: "preview", type: "boolean", fallback: false },
|
|
4521
|
+
{ key: "prompt", type: "string", required: true }
|
|
4522
|
+
],
|
|
4523
|
+
"moondream-query": [
|
|
4524
|
+
{ key: "prompt", type: "string", required: true },
|
|
4525
|
+
{ key: "reasoning", type: "boolean", fallback: true },
|
|
4526
|
+
{ key: "temperature", type: "number" },
|
|
4527
|
+
{ key: "top_p", type: "number" }
|
|
4528
|
+
],
|
|
4529
|
+
"nsfw": [],
|
|
4530
|
+
"object-removal": [
|
|
4531
|
+
{ key: "mask_expansion", type: "integer", fallback: 15 },
|
|
4532
|
+
{ key: "model", type: "enum(low_quality|medium_quality|high_quality|best_quality)", fallback: "best_quality" },
|
|
4533
|
+
{ key: "prompt", type: "string", required: true }
|
|
4534
|
+
],
|
|
4535
|
+
"object-removal-bbox": [
|
|
4536
|
+
{ key: "box_prompts", type: "list[object]", fallback: [] },
|
|
4537
|
+
{ key: "mask_expansion", type: "integer", fallback: 15 },
|
|
4538
|
+
{ key: "model", type: "enum(low_quality|medium_quality|high_quality|best_quality)", fallback: "best_quality" }
|
|
4539
|
+
],
|
|
4540
|
+
"object-removal-mask": [
|
|
4541
|
+
{ key: "mask_expansion", type: "integer", fallback: 15 },
|
|
4542
|
+
{ key: "model", type: "enum(low_quality|medium_quality|high_quality|best_quality)", fallback: "best_quality" }
|
|
4543
|
+
],
|
|
4544
|
+
"patina": [
|
|
4545
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4546
|
+
{ key: "maps", type: "list[enum(basecolor|normal|roughness|metalness|height)]", fallback: ["basecolor", "normal", "roughness", "metalness", "height"] },
|
|
4547
|
+
{ key: "output_format", type: "enum(jpeg|png|webp)", fallback: "png" },
|
|
4548
|
+
{ key: "seed", type: "integer" }
|
|
4549
|
+
],
|
|
4550
|
+
"patina-extract": [
|
|
4551
|
+
{ key: "enable_prompt_expansion", type: "boolean", fallback: true },
|
|
4552
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4553
|
+
{ key: "image_size", type: "object|enum(square_hd|square|portrait_4_3|portrait_16_9|landscape_4_3|landscape_16_9)", fallback: "square_hd" },
|
|
4554
|
+
{ key: "maps", type: "list[enum(basecolor|normal|roughness|metalness|height)]", fallback: ["basecolor", "normal", "roughness", "metalness", "height"] },
|
|
4555
|
+
{ key: "num_images", type: "integer", fallback: 1 },
|
|
4556
|
+
{ key: "num_inference_steps", type: "integer", fallback: 8 },
|
|
4557
|
+
{ key: "output_format", type: "enum(jpeg|png|webp)", fallback: "png" },
|
|
4558
|
+
{ key: "prompt", type: "string", required: true },
|
|
4559
|
+
{ key: "seed", type: "integer" },
|
|
4560
|
+
{ key: "strength", type: "number", fallback: 0.6 },
|
|
4561
|
+
{ key: "tile_size", type: "integer", fallback: 128 },
|
|
4562
|
+
{ key: "tile_stride", type: "integer", fallback: 64 },
|
|
4563
|
+
{ key: "tiling_mode", type: "enum(both|horizontal|vertical)", fallback: "both" },
|
|
4564
|
+
{ key: "upscale_factor", type: "enum(0|2|4)", fallback: 0 }
|
|
4565
|
+
],
|
|
4566
|
+
"pidi": [
|
|
4567
|
+
{ key: "apply_filter", type: "boolean", fallback: false },
|
|
4568
|
+
{ key: "safe", type: "boolean", fallback: false },
|
|
4569
|
+
{ key: "scribble", type: "boolean", fallback: false }
|
|
4570
|
+
],
|
|
4571
|
+
"qwen-layered": [
|
|
4572
|
+
{ key: "acceleration", type: "enum(none|regular|high)", fallback: "regular" },
|
|
4573
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4574
|
+
{ key: "guidance_scale", type: "number", fallback: 5 },
|
|
4575
|
+
{ key: "negative_prompt", type: "string", fallback: "" },
|
|
4576
|
+
{ key: "num_inference_steps", type: "integer", fallback: 28 },
|
|
4577
|
+
{ key: "num_layers", type: "integer", fallback: 4 },
|
|
4578
|
+
{ key: "output_format", type: "enum(png|webp)", fallback: "png" },
|
|
4579
|
+
{ key: "prompt", type: "string" },
|
|
4580
|
+
{ key: "seed", type: "integer" }
|
|
4581
|
+
],
|
|
4582
|
+
"recraft-vectorize": [],
|
|
4583
|
+
"rembg": [
|
|
4584
|
+
{ key: "crop_to_bbox", type: "boolean", fallback: false }
|
|
4585
|
+
],
|
|
4586
|
+
"remove-lighting": [
|
|
4587
|
+
{ key: "acceleration", type: "enum(none|regular)", fallback: "regular" },
|
|
4588
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4589
|
+
{ key: "guidance_scale", type: "number", fallback: 1 },
|
|
4590
|
+
{ key: "image_size", type: "object|enum(square_hd|square|portrait_4_3|portrait_16_9|landscape_4_3|landscape_16_9)" },
|
|
4591
|
+
{ key: "negative_prompt", type: "string", fallback: " " },
|
|
4592
|
+
{ key: "num_images", type: "integer", fallback: 1 },
|
|
4593
|
+
{ key: "num_inference_steps", type: "integer", fallback: 6 },
|
|
4594
|
+
{ key: "output_format", type: "enum(png|jpeg|webp)", fallback: "png" },
|
|
4595
|
+
{ key: "seed", type: "integer" }
|
|
4596
|
+
],
|
|
4597
|
+
"sam-preprocessor": [],
|
|
4598
|
+
"sam2-auto": [
|
|
4599
|
+
{ key: "min_mask_region_area", type: "integer", fallback: 100 },
|
|
4600
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "png" },
|
|
4601
|
+
{ key: "points_per_side", type: "integer", fallback: 32 },
|
|
4602
|
+
{ key: "pred_iou_thresh", type: "number", fallback: 0.88 },
|
|
4603
|
+
{ key: "stability_score_thresh", type: "number", fallback: 0.95 }
|
|
4604
|
+
],
|
|
4605
|
+
"sam3-1-image": [
|
|
4606
|
+
{ key: "apply_mask", type: "boolean", fallback: true },
|
|
4607
|
+
{ key: "box_prompts", type: "list[object]", fallback: [] },
|
|
4608
|
+
{ key: "include_boxes", type: "boolean", fallback: false },
|
|
4609
|
+
{ key: "include_scores", type: "boolean", fallback: false },
|
|
4610
|
+
{ key: "max_masks", type: "integer", fallback: 3 },
|
|
4611
|
+
{ key: "output_format", type: "enum(jpeg|png|webp)", fallback: "png" },
|
|
4612
|
+
{ key: "point_prompts", type: "list[object]", fallback: [] },
|
|
4613
|
+
{ key: "prompt", type: "string", fallback: "wheel" },
|
|
4614
|
+
{ key: "return_multiple_masks", type: "boolean", fallback: false }
|
|
4615
|
+
],
|
|
4616
|
+
"sam3-1-video": [
|
|
4617
|
+
{ key: "apply_mask", type: "boolean", fallback: true },
|
|
4618
|
+
{ key: "box_prompts", type: "list[object]", fallback: [] },
|
|
4619
|
+
{ key: "detection_threshold", type: "number", fallback: 0.5 },
|
|
4620
|
+
{ key: "max_num_objects", type: "integer", fallback: 16 },
|
|
4621
|
+
{ key: "point_prompts", type: "list[object]", fallback: [] },
|
|
4622
|
+
{ key: "prompt", type: "string", fallback: "" },
|
|
4623
|
+
{ key: "video_output_type", type: "enum(X264 (.mp4)|VP9 (.webm))", fallback: "X264 (.mp4)" }
|
|
4624
|
+
],
|
|
4625
|
+
"sam3-3d-align": [
|
|
4626
|
+
{ key: "body_mask_url", type: "string" },
|
|
4627
|
+
{ key: "body_mesh_url", type: "string", required: true },
|
|
4628
|
+
{ key: "focal_length", type: "number" },
|
|
4629
|
+
{ key: "object_mesh_url", type: "string" }
|
|
4630
|
+
],
|
|
4631
|
+
"sam3-3d-body": [
|
|
4632
|
+
{ key: "export_meshes", type: "boolean", fallback: true },
|
|
4633
|
+
{ key: "include_3d_keypoints", type: "boolean", fallback: true },
|
|
4634
|
+
{ key: "include_mhr_params", type: "boolean", fallback: true }
|
|
4635
|
+
],
|
|
4636
|
+
"sam3-3d-objects": [
|
|
4637
|
+
{ key: "box_prompts", type: "list[object]", fallback: [] },
|
|
4638
|
+
{ key: "detection_threshold", type: "number" },
|
|
4639
|
+
{ key: "export_textured_glb", type: "boolean", fallback: false },
|
|
4640
|
+
{ key: "mask_urls", type: "list[string]" },
|
|
4641
|
+
{ key: "point_prompts", type: "list[object]", fallback: [] },
|
|
4642
|
+
{ key: "pointmap_url", type: "string" },
|
|
4643
|
+
{ key: "prompt", type: "string", fallback: "car" },
|
|
4644
|
+
{ key: "seed", type: "integer" }
|
|
4645
|
+
],
|
|
4646
|
+
"sam3-image": [
|
|
4647
|
+
{ key: "apply_mask", type: "boolean", fallback: true },
|
|
4648
|
+
{ key: "box_prompts", type: "list[object]", fallback: [] },
|
|
4649
|
+
{ key: "include_boxes", type: "boolean", fallback: false },
|
|
4650
|
+
{ key: "include_scores", type: "boolean", fallback: false },
|
|
4651
|
+
{ key: "max_masks", type: "integer", fallback: 3 },
|
|
4652
|
+
{ key: "output_format", type: "enum(jpeg|png|webp)", fallback: "png" },
|
|
4653
|
+
{ key: "point_prompts", type: "list[object]", fallback: [] },
|
|
4654
|
+
{ key: "prompt", type: "string", fallback: "wheel" },
|
|
4655
|
+
{ key: "return_multiple_masks", type: "boolean", fallback: false },
|
|
4656
|
+
{ key: "text_prompt", type: "string" }
|
|
4657
|
+
],
|
|
4658
|
+
"sam3-image-rle": [
|
|
4659
|
+
{ key: "apply_mask", type: "boolean", fallback: true },
|
|
4660
|
+
{ key: "box_prompts", type: "list[object]", fallback: [] },
|
|
4661
|
+
{ key: "include_boxes", type: "boolean", fallback: false },
|
|
4662
|
+
{ key: "include_scores", type: "boolean", fallback: false },
|
|
4663
|
+
{ key: "max_masks", type: "integer", fallback: 3 },
|
|
4664
|
+
{ key: "output_format", type: "enum(jpeg|png|webp)", fallback: "png" },
|
|
4665
|
+
{ key: "point_prompts", type: "list[object]", fallback: [] },
|
|
4666
|
+
{ key: "prompt", type: "string", fallback: "wheel" },
|
|
4667
|
+
{ key: "return_multiple_masks", type: "boolean", fallback: false },
|
|
4668
|
+
{ key: "text_prompt", type: "string" }
|
|
4669
|
+
],
|
|
4670
|
+
"sam3-video": [
|
|
4671
|
+
{ key: "apply_mask", type: "boolean", fallback: true },
|
|
4672
|
+
{ key: "box_prompts", type: "list[object]", fallback: [] },
|
|
4673
|
+
{ key: "detection_threshold", type: "number", fallback: 0.5 },
|
|
4674
|
+
{ key: "point_prompts", type: "list[object]", fallback: [] },
|
|
4675
|
+
{ key: "prompt", type: "string", fallback: "" },
|
|
4676
|
+
{ key: "text_prompt", type: "string" },
|
|
4677
|
+
{ key: "video_output_type", type: "enum(X264 (.mp4)|VP9 (.webm))", fallback: "X264 (.mp4)" }
|
|
4678
|
+
],
|
|
4679
|
+
"sam3-video-rle": [
|
|
4680
|
+
{ key: "apply_mask", type: "boolean", fallback: false },
|
|
4681
|
+
{ key: "boundingbox_zip", type: "boolean", fallback: false },
|
|
4682
|
+
{ key: "box_prompts", type: "list[object]", fallback: [] },
|
|
4683
|
+
{ key: "detection_threshold", type: "number", fallback: 0.5 },
|
|
4684
|
+
{ key: "frame_index", type: "integer", fallback: 0 },
|
|
4685
|
+
{ key: "point_prompts", type: "list[object]", fallback: [] },
|
|
4686
|
+
{ key: "prompt", type: "string", fallback: "" }
|
|
4687
|
+
],
|
|
4688
|
+
"scribble": [
|
|
4689
|
+
{ key: "model", type: "enum(HED|PiDi)", fallback: "HED" },
|
|
4690
|
+
{ key: "safe", type: "boolean", fallback: false }
|
|
4691
|
+
],
|
|
4692
|
+
"seedream-layerize": [
|
|
4693
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4694
|
+
{ key: "enhance_prompt_mode", type: "enum(standard|fast)", fallback: "standard" },
|
|
4695
|
+
{ key: "image_size", type: "enum(auto|auto_1K|auto_1.5K|auto_2K)", fallback: "auto" },
|
|
4696
|
+
{ key: "prompt", type: "string", fallback: "" }
|
|
4697
|
+
],
|
|
4698
|
+
"seedvr-seamless": [
|
|
4699
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4700
|
+
{ key: "noise_scale", type: "number", fallback: 0.1 },
|
|
4701
|
+
{ key: "output_format", type: "enum(png|jpeg|webp)", fallback: "png" },
|
|
4702
|
+
{ key: "seed", type: "integer" },
|
|
4703
|
+
{ key: "target_resolution", type: "enum(720p|1080p|1440p|2160p)", fallback: "1080p" },
|
|
4704
|
+
{ key: "upscale_factor", type: "number", fallback: 2 },
|
|
4705
|
+
{ key: "upscale_mode", type: "enum(target|factor)", fallback: "factor" }
|
|
4706
|
+
],
|
|
4707
|
+
"seedvr-upscale": [
|
|
4708
|
+
{ key: "noise_scale", type: "number", fallback: 0.1 },
|
|
4709
|
+
{ key: "output_format", type: "enum(png|jpg|webp)", fallback: "jpg" },
|
|
4710
|
+
{ key: "seed", type: "integer" },
|
|
4711
|
+
{ key: "target_resolution", type: "enum(720p|1080p|1440p|2160p)", fallback: "1080p" },
|
|
4712
|
+
{ key: "upscale_factor", type: "number", fallback: 2 },
|
|
4713
|
+
{ key: "upscale_mode", type: "enum(target|factor)", fallback: "factor" }
|
|
4714
|
+
],
|
|
4715
|
+
"smart-resize": [
|
|
4716
|
+
{ key: "num_images_per_size", type: "integer", fallback: 1 },
|
|
4717
|
+
{ key: "output_format", type: "enum(jpeg|png|webp)", fallback: "png" },
|
|
4718
|
+
{ key: "prompt", type: "string", fallback: "" },
|
|
4719
|
+
{ key: "resolution", type: "enum(1K|2K|4K)", fallback: "1K" },
|
|
4720
|
+
{ key: "safety_tolerance", type: "enum(1|2|3|4|5|6)", fallback: "4" },
|
|
4721
|
+
{ key: "seed", type: "integer" },
|
|
4722
|
+
{ key: "target_sizes", type: "list[string]", required: true }
|
|
4723
|
+
],
|
|
4724
|
+
"teed": [],
|
|
4725
|
+
"text-removal": [
|
|
4726
|
+
{ key: "aspect_ratio", type: "enum(21:9|16:9|4:3|3:2|1:1|2:3|3:4|9:16|9:21)" },
|
|
4727
|
+
{ key: "guidance_scale", type: "number", fallback: 3.5 },
|
|
4728
|
+
{ key: "num_inference_steps", type: "integer", fallback: 30 },
|
|
4729
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" },
|
|
4730
|
+
{ key: "safety_tolerance", type: "enum(1|2|3|4|5|6)", fallback: "2" },
|
|
4731
|
+
{ key: "seed", type: "integer" }
|
|
4732
|
+
],
|
|
4733
|
+
"topaz-adjust": [
|
|
4734
|
+
{ key: "model", type: "enum(Adjust V2|White Balance|Colorize)", fallback: "Adjust V2" },
|
|
4735
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" }
|
|
4736
|
+
],
|
|
4737
|
+
"topaz-creative": [
|
|
4738
|
+
{ key: "autoprompt", type: "boolean" },
|
|
4739
|
+
{ key: "color_preservation", type: "boolean" },
|
|
4740
|
+
{ key: "creativity", type: "integer" },
|
|
4741
|
+
{ key: "crop_to_fill", type: "boolean", fallback: false },
|
|
4742
|
+
{ key: "model", type: "enum(Bloom 2|Bloom|Bloom Realism)", fallback: "Bloom 2" },
|
|
4743
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" },
|
|
4744
|
+
{ key: "upscale_factor", type: "number", fallback: 2 }
|
|
4745
|
+
],
|
|
4746
|
+
"topaz-denoise": [
|
|
4747
|
+
{ key: "model", type: "enum(Normal|Strong|Extreme|Denoise Max)", fallback: "Normal" },
|
|
4748
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" }
|
|
4749
|
+
],
|
|
4750
|
+
"topaz-generative": [
|
|
4751
|
+
{ key: "autoprompt", type: "boolean" },
|
|
4752
|
+
{ key: "creativity", type: "integer" },
|
|
4753
|
+
{ key: "crop_to_fill", type: "boolean", fallback: false },
|
|
4754
|
+
{ key: "denoise", type: "number" },
|
|
4755
|
+
{ key: "detail", type: "number" },
|
|
4756
|
+
{ key: "enhancement_strength", type: "enum(low|medium|high)" },
|
|
4757
|
+
{ key: "face_enhancement", type: "boolean", fallback: true },
|
|
4758
|
+
{ key: "face_enhancement_creativity", type: "number", fallback: 0 },
|
|
4759
|
+
{ key: "face_enhancement_strength", type: "number", fallback: 0.8 },
|
|
4760
|
+
{ key: "model", type: "enum(Wonder 3.5|Wonder 3|Wonder 2|Wonder|Recover 3|Standard MAX|Redefine|Recovery V2|Recovery)", fallback: "Wonder 3" },
|
|
4761
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" },
|
|
4762
|
+
{ key: "prompt", type: "string" },
|
|
4763
|
+
{ key: "sharpen", type: "number" },
|
|
4764
|
+
{ key: "subject_detection", type: "enum(All|Foreground|Background)", fallback: "All" },
|
|
4765
|
+
{ key: "texture", type: "integer" },
|
|
4766
|
+
{ key: "upscale_factor", type: "number", fallback: 2 }
|
|
4767
|
+
],
|
|
4768
|
+
"topaz-image": [
|
|
4769
|
+
{ key: "autoprompt", type: "boolean" },
|
|
4770
|
+
{ key: "creativity", type: "integer" },
|
|
4771
|
+
{ key: "crop_to_fill", type: "boolean", fallback: false },
|
|
4772
|
+
{ key: "denoise", type: "number" },
|
|
4773
|
+
{ key: "detail", type: "number" },
|
|
4774
|
+
{ key: "enhancement_strength", type: "enum(low|medium|high)" },
|
|
4775
|
+
{ key: "face_enhancement", type: "boolean", fallback: true },
|
|
4776
|
+
{ key: "face_enhancement_creativity", type: "number", fallback: 0 },
|
|
4777
|
+
{ key: "face_enhancement_strength", type: "number", fallback: 0.8 },
|
|
4778
|
+
{ key: "fix_compression", type: "number" },
|
|
4779
|
+
{ key: "model", type: "enum(Standard V2|High Fidelity V2|Low Resolution V2|CGI|Text Refine|Wonder 3|Wonder|Standard MAX|Redefine|Recovery V2|Recovery)", fallback: "Standard V2" },
|
|
4780
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" },
|
|
4781
|
+
{ key: "prompt", type: "string" },
|
|
4782
|
+
{ key: "sharpen", type: "number" },
|
|
4783
|
+
{ key: "strength", type: "number" },
|
|
4784
|
+
{ key: "subject_detection", type: "enum(All|Foreground|Background)", fallback: "All" },
|
|
4785
|
+
{ key: "texture", type: "integer" },
|
|
4786
|
+
{ key: "upscale_factor", type: "number", fallback: 2 }
|
|
4787
|
+
],
|
|
4788
|
+
"topaz-precision": [
|
|
4789
|
+
{ key: "crop_to_fill", type: "boolean", fallback: false },
|
|
4790
|
+
{ key: "denoise", type: "number" },
|
|
4791
|
+
{ key: "face_enhancement", type: "boolean", fallback: true },
|
|
4792
|
+
{ key: "face_enhancement_creativity", type: "number", fallback: 0 },
|
|
4793
|
+
{ key: "face_enhancement_strength", type: "number", fallback: 0.8 },
|
|
4794
|
+
{ key: "fix_compression", type: "number" },
|
|
4795
|
+
{ key: "model", type: "enum(Standard V2|High Fidelity V3|High Fidelity V2|Low Resolution V2|CGI|Text Refine)", fallback: "Standard V2" },
|
|
4796
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" },
|
|
4797
|
+
{ key: "sharpen", type: "number" },
|
|
4798
|
+
{ key: "strength", type: "number" },
|
|
4799
|
+
{ key: "subject_detection", type: "enum(All|Foreground|Background)", fallback: "All" },
|
|
4800
|
+
{ key: "upscale_factor", type: "number", fallback: 2 }
|
|
4801
|
+
],
|
|
4802
|
+
"topaz-restore": [
|
|
4803
|
+
{ key: "model", type: "enum(Recover 3|Dust-Scratch V2)", fallback: "Recover 3" },
|
|
4804
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" }
|
|
4805
|
+
],
|
|
4806
|
+
"topaz-sharpen": [
|
|
4807
|
+
{ key: "model", type: "enum(Standard|Strong|Lens Blur V2|Motion Blur|Natural|Refocus|Wildlife|Portrait|Auto Sharpen|Super Focus V3|Super Focus V2)", fallback: "Standard" },
|
|
4808
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" }
|
|
4809
|
+
],
|
|
4810
|
+
"topaz-transparent": [
|
|
4811
|
+
{ key: "output_format", type: "string", fallback: "png" },
|
|
4812
|
+
{ key: "upscale_factor", type: "number", fallback: 2 }
|
|
4813
|
+
],
|
|
4814
|
+
"topaz-video": [
|
|
4815
|
+
{ key: "compression", type: "number" },
|
|
4816
|
+
{ key: "grain", type: "number" },
|
|
4817
|
+
{ key: "H264_output", type: "boolean", fallback: false },
|
|
4818
|
+
{ key: "halo", type: "number" },
|
|
4819
|
+
{ key: "model", type: "enum(Proteus|Artemis HQ|Artemis MQ|Artemis LQ|Gaia HQ|Gaia CG|Gaia 2|Nyx|Nyx Fast|Nyx XL|Nyx HF|Starlight Precise 2.5|Starlight HQ|Starlight Mini|Starlight Sharp|Starlight Fast 2|Starlight Precise 1|Starlight Precise 2|Starlight Fast 1)", fallback: "Proteus" },
|
|
4820
|
+
{ key: "noise", type: "number" },
|
|
4821
|
+
{ key: "recover_detail", type: "number" },
|
|
4822
|
+
{ key: "target_fps", type: "integer" },
|
|
4823
|
+
{ key: "upscale_factor", type: "number", fallback: 2 }
|
|
4824
|
+
],
|
|
4825
|
+
"trellis-2": [
|
|
4826
|
+
{ key: "decimation_target", type: "integer", fallback: 5e5 },
|
|
4827
|
+
{ key: "remesh", type: "boolean", fallback: true },
|
|
4828
|
+
{ key: "remesh_band", type: "number", fallback: 1 },
|
|
4829
|
+
{ key: "remesh_project", type: "number", fallback: 0 },
|
|
4830
|
+
{ key: "resolution", type: "enum(512|1024|1536)", fallback: 1024 },
|
|
4831
|
+
{ key: "seed", type: "integer" },
|
|
4832
|
+
{ key: "shape_slat_guidance_interval_end", type: "number", fallback: 1 },
|
|
4833
|
+
{ key: "shape_slat_guidance_interval_start", type: "number", fallback: 0.6 },
|
|
4834
|
+
{ key: "shape_slat_guidance_rescale", type: "number", fallback: 0.5 },
|
|
4835
|
+
{ key: "shape_slat_guidance_strength", type: "number", fallback: 7.5 },
|
|
4836
|
+
{ key: "shape_slat_rescale_t", type: "number", fallback: 3 },
|
|
4837
|
+
{ key: "shape_slat_sampling_steps", type: "integer", fallback: 12 },
|
|
4838
|
+
{ key: "ss_guidance_interval_end", type: "number", fallback: 1 },
|
|
4839
|
+
{ key: "ss_guidance_interval_start", type: "number", fallback: 0.6 },
|
|
4840
|
+
{ key: "ss_guidance_rescale", type: "number", fallback: 0.7 },
|
|
4841
|
+
{ key: "ss_guidance_strength", type: "number", fallback: 7.5 },
|
|
4842
|
+
{ key: "ss_rescale_t", type: "number", fallback: 5 },
|
|
4843
|
+
{ key: "ss_sampling_steps", type: "integer", fallback: 12 },
|
|
4844
|
+
{ key: "tex_slat_guidance_interval_end", type: "number", fallback: 0.9 },
|
|
4845
|
+
{ key: "tex_slat_guidance_interval_start", type: "number", fallback: 0.6 },
|
|
4846
|
+
{ key: "tex_slat_guidance_rescale", type: "number", fallback: 0 },
|
|
4847
|
+
{ key: "tex_slat_guidance_strength", type: "number", fallback: 1 },
|
|
4848
|
+
{ key: "tex_slat_rescale_t", type: "number", fallback: 3 },
|
|
4849
|
+
{ key: "tex_slat_sampling_steps", type: "integer", fallback: 12 },
|
|
4850
|
+
{ key: "texture_size", type: "enum(1024|2048|4096)", fallback: 2048 },
|
|
4851
|
+
{ key: "uv_unwrap_angle_threshold_deg", type: "number", fallback: 90 },
|
|
4852
|
+
{ key: "uv_unwrap_global_iterations", type: "integer", fallback: 1 },
|
|
4853
|
+
{ key: "uv_unwrap_refine_iterations", type: "integer", fallback: 0 },
|
|
4854
|
+
{ key: "uv_unwrap_smooth_strength", type: "number", fallback: 1 }
|
|
4855
|
+
],
|
|
4856
|
+
"zoe-depth": []
|
|
4857
|
+
};
|
|
4858
|
+
function falToolParameters(tool) {
|
|
4859
|
+
return FAL_TOOL_PARAMETERS[tool] ?? [];
|
|
4860
|
+
}
|
|
4861
|
+
|
|
4862
|
+
// src/model-output.generated.ts
|
|
4863
|
+
var MODEL_OUTPUT = {
|
|
4864
|
+
"banana": { container: "png", lossless: true, bitDepth: 8 },
|
|
4865
|
+
"banana2": { container: "png", lossless: true, bitDepth: 8 },
|
|
4866
|
+
"flux": { container: "jpeg", subsampling: "4:4:4", lossless: false, bitDepth: 8 },
|
|
4867
|
+
"flux-fast": { container: "jpeg", subsampling: "4:4:4", lossless: false, bitDepth: 8 },
|
|
4868
|
+
"flux2-dev": { container: "png", lossless: true, bitDepth: 8 },
|
|
4869
|
+
"flux2-flex": { container: "jpeg", subsampling: "4:4:4", lossless: false, bitDepth: 8 },
|
|
4870
|
+
"flux2-max": { container: "jpeg", subsampling: "4:4:4", lossless: false, bitDepth: 8 },
|
|
4871
|
+
"flux2-pro": { container: "jpeg", subsampling: "4:4:4", lossless: false, bitDepth: 8 },
|
|
4872
|
+
"flux2-turbo": { container: "png", lossless: true, bitDepth: 8 },
|
|
4873
|
+
"gemini": { container: "png", lossless: true, bitDepth: 8 },
|
|
4874
|
+
"gemini3": { container: "png", lossless: true, bitDepth: 8 },
|
|
4875
|
+
"gpt": { container: "png", lossless: true, bitDepth: 8 },
|
|
4876
|
+
"gpt2": { container: "png", lossless: true, bitDepth: 8 },
|
|
4877
|
+
"grok-image": { container: "png", lossless: true, bitDepth: 8 },
|
|
4878
|
+
"ideogram": { container: "png", lossless: true, bitDepth: 8 },
|
|
4879
|
+
"ideogram4": { container: "jpeg", subsampling: "4:4:4", lossless: false, bitDepth: 8 },
|
|
4880
|
+
"qwen": { container: "png", lossless: true, bitDepth: 8 },
|
|
4881
|
+
"qwen3": { container: "png", lossless: true, bitDepth: 8 },
|
|
4882
|
+
"recraft": { container: "webp (lossless)", lossless: true, hasAlpha: true, bitDepth: 8 },
|
|
4883
|
+
"recraft4": { container: "webp (lossless)", lossless: true, hasAlpha: true, bitDepth: 8 },
|
|
4884
|
+
"seedream4": { container: "jpeg", subsampling: "4:4:4", lossless: false, bitDepth: 8 },
|
|
4885
|
+
"seedream45": { container: "jpeg", subsampling: "4:2:0", lossless: false, bitDepth: 8 },
|
|
4886
|
+
"seedream5": { container: "jpeg", subsampling: "4:2:0", lossless: false, bitDepth: 8 },
|
|
4887
|
+
"seedream5-lite": { container: "jpeg", subsampling: "4:2:0", lossless: false, bitDepth: 8 }
|
|
4888
|
+
};
|
|
4889
|
+
|
|
4890
|
+
// src/model-output.ts
|
|
4891
|
+
function modelOutput(model) {
|
|
4892
|
+
return MODEL_OUTPUT[model];
|
|
4893
|
+
}
|
|
4894
|
+
function losslessAvailability(model) {
|
|
4895
|
+
const shape = MODEL_OUTPUT[model];
|
|
4896
|
+
if (shape === void 0) {
|
|
4897
|
+
return "unknown";
|
|
4898
|
+
}
|
|
4899
|
+
if (shape.lossless) {
|
|
4900
|
+
return "default";
|
|
4901
|
+
}
|
|
4902
|
+
return MODELS[model]?.supportsOutputFormat === true ? "on-request" : "unavailable";
|
|
4903
|
+
}
|
|
4904
|
+
function describeModelOutput(model) {
|
|
4905
|
+
const shape = MODEL_OUTPUT[model];
|
|
4906
|
+
if (shape === void 0) {
|
|
4907
|
+
return "not measured";
|
|
4908
|
+
}
|
|
4909
|
+
const base = shape.subsampling === void 0 || shape.subsampling === "" ? shape.container : `${shape.container} ${shape.subsampling}`;
|
|
4910
|
+
const suffix = {
|
|
4911
|
+
default: "lossless",
|
|
4912
|
+
"on-request": "lossless on request",
|
|
4913
|
+
unavailable: "no lossless route",
|
|
4914
|
+
unknown: "lossless route not measured"
|
|
4915
|
+
};
|
|
4916
|
+
return `${base}, ${suffix[losslessAvailability(model)]}`;
|
|
4917
|
+
}
|
|
4274
4918
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4275
4919
|
0 && (module.exports = {
|
|
4276
4920
|
ASPECT_RATIOS,
|
|
@@ -4281,6 +4925,7 @@ var FalClient = class {
|
|
|
4281
4925
|
FAL_TOOLS,
|
|
4282
4926
|
FAL_TOOLS_CHECKED_AT,
|
|
4283
4927
|
FAL_TOOL_IDS,
|
|
4928
|
+
FAL_TOOL_PARAMETERS,
|
|
4284
4929
|
FORMAT_PRESETS,
|
|
4285
4930
|
FalClient,
|
|
4286
4931
|
GENERATION_MODELS,
|
|
@@ -4288,6 +4933,7 @@ var FalClient = class {
|
|
|
4288
4933
|
IMAGE_EDITING_TOP_20,
|
|
4289
4934
|
IMAGE_TEXT_TO_IMAGE_TOP_20,
|
|
4290
4935
|
MODELS,
|
|
4936
|
+
MODEL_OUTPUT,
|
|
4291
4937
|
MotifError,
|
|
4292
4938
|
RECRAFT_STYLES,
|
|
4293
4939
|
RESOLUTIONS,
|
|
@@ -4299,14 +4945,22 @@ var FalClient = class {
|
|
|
4299
4945
|
aspectToGptSize,
|
|
4300
4946
|
buildFalToolRequest,
|
|
4301
4947
|
buildGenerateBody,
|
|
4948
|
+
describeModelOutput,
|
|
4302
4949
|
enrichPrompt,
|
|
4303
4950
|
err,
|
|
4304
4951
|
estimateCost,
|
|
4305
4952
|
estimateVideoCost,
|
|
4953
|
+
falToolParameters,
|
|
4954
|
+
formatCost,
|
|
4306
4955
|
getFalKeyFromEnv,
|
|
4307
4956
|
isFalToolId,
|
|
4957
|
+
losslessAvailability,
|
|
4958
|
+
measuredToolCost,
|
|
4959
|
+
modelOutput,
|
|
4308
4960
|
motifEnvSchema,
|
|
4309
4961
|
ok,
|
|
4310
4962
|
parseMotifEnv,
|
|
4311
|
-
|
|
4963
|
+
projectedToolCost,
|
|
4964
|
+
sanitizePrompt,
|
|
4965
|
+
sumCosts
|
|
4312
4966
|
});
|