@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.js
CHANGED
|
@@ -112,10 +112,10 @@ var MODELS = {
|
|
|
112
112
|
gpt2: {
|
|
113
113
|
benchmark: {
|
|
114
114
|
artificialAnalysis: {
|
|
115
|
-
editing: { elo: 1256,
|
|
115
|
+
editing: { elo: 1256, rank: 3 },
|
|
116
116
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
117
117
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
118
|
-
textToImage: { elo: 1369,
|
|
118
|
+
textToImage: { elo: 1369, rank: 1 }
|
|
119
119
|
},
|
|
120
120
|
speed: {
|
|
121
121
|
medianSeconds: 200.7,
|
|
@@ -155,10 +155,10 @@ var MODELS = {
|
|
|
155
155
|
gpt: {
|
|
156
156
|
benchmark: {
|
|
157
157
|
artificialAnalysis: {
|
|
158
|
-
editing: { elo: 1250,
|
|
158
|
+
editing: { elo: 1250, rank: 5 },
|
|
159
159
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
160
160
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
161
|
-
textToImage: { elo: 1310,
|
|
161
|
+
textToImage: { elo: 1310, rank: 4 }
|
|
162
162
|
},
|
|
163
163
|
speed: {
|
|
164
164
|
medianSeconds: 34.6,
|
|
@@ -198,10 +198,10 @@ var MODELS = {
|
|
|
198
198
|
banana2: {
|
|
199
199
|
benchmark: {
|
|
200
200
|
artificialAnalysis: {
|
|
201
|
-
editing: { elo: 1249,
|
|
201
|
+
editing: { elo: 1249, rank: 7 },
|
|
202
202
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
203
203
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
204
|
-
textToImage: { elo: 1320,
|
|
204
|
+
textToImage: { elo: 1320, rank: 3 }
|
|
205
205
|
},
|
|
206
206
|
tiers: { price: "premium", quality: "frontier", speed: "unknown" },
|
|
207
207
|
useCase: "Best balance of quality, edit support, web search, and cost"
|
|
@@ -239,10 +239,10 @@ var MODELS = {
|
|
|
239
239
|
banana: {
|
|
240
240
|
benchmark: {
|
|
241
241
|
artificialAnalysis: {
|
|
242
|
-
editing: { elo: 1245,
|
|
242
|
+
editing: { elo: 1245, rank: 9 },
|
|
243
243
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
244
244
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
245
|
-
textToImage: { elo: 1297,
|
|
245
|
+
textToImage: { elo: 1297, rank: 6 }
|
|
246
246
|
},
|
|
247
247
|
speed: {
|
|
248
248
|
medianSeconds: 19.2,
|
|
@@ -284,7 +284,7 @@ var MODELS = {
|
|
|
284
284
|
gemini: {
|
|
285
285
|
benchmark: {
|
|
286
286
|
artificialAnalysis: {
|
|
287
|
-
editing: { elo: 1180,
|
|
287
|
+
editing: { elo: 1180, rank: 29 },
|
|
288
288
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
289
289
|
sourceUrls: AA_IMAGE_SOURCES
|
|
290
290
|
}
|
|
@@ -318,10 +318,10 @@ var MODELS = {
|
|
|
318
318
|
gemini3: {
|
|
319
319
|
benchmark: {
|
|
320
320
|
artificialAnalysis: {
|
|
321
|
-
editing: { elo: 1245,
|
|
321
|
+
editing: { elo: 1245, rank: 9 },
|
|
322
322
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
323
323
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
324
|
-
textToImage: { elo: 1297,
|
|
324
|
+
textToImage: { elo: 1297, rank: 6 }
|
|
325
325
|
}
|
|
326
326
|
},
|
|
327
327
|
editEndpoint: "fal-ai/gemini-3-pro-image-preview/edit",
|
|
@@ -354,10 +354,10 @@ var MODELS = {
|
|
|
354
354
|
seedream4: {
|
|
355
355
|
benchmark: {
|
|
356
356
|
artificialAnalysis: {
|
|
357
|
-
editing: { elo: 1185,
|
|
357
|
+
editing: { elo: 1185, rank: 28 },
|
|
358
358
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
359
359
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
360
|
-
textToImage: { elo: 1226,
|
|
360
|
+
textToImage: { elo: 1226, rank: 16 }
|
|
361
361
|
},
|
|
362
362
|
speed: {
|
|
363
363
|
medianSeconds: 14.3,
|
|
@@ -394,10 +394,10 @@ var MODELS = {
|
|
|
394
394
|
seedream45: {
|
|
395
395
|
benchmark: {
|
|
396
396
|
artificialAnalysis: {
|
|
397
|
-
editing: { elo: 1186,
|
|
397
|
+
editing: { elo: 1186, rank: 26 },
|
|
398
398
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
399
399
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
400
|
-
textToImage: { elo: 1203,
|
|
400
|
+
textToImage: { elo: 1203, rank: 32 }
|
|
401
401
|
},
|
|
402
402
|
speed: {
|
|
403
403
|
medianSeconds: 18.2,
|
|
@@ -434,10 +434,10 @@ var MODELS = {
|
|
|
434
434
|
seedream5: {
|
|
435
435
|
benchmark: {
|
|
436
436
|
artificialAnalysis: {
|
|
437
|
-
editing: { elo: 1248,
|
|
437
|
+
editing: { elo: 1248, rank: 8 },
|
|
438
438
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
439
439
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
440
|
-
textToImage: { elo: 1279,
|
|
440
|
+
textToImage: { elo: 1279, rank: 10 }
|
|
441
441
|
}
|
|
442
442
|
},
|
|
443
443
|
name: "Seedream 5.0 Pro",
|
|
@@ -468,7 +468,7 @@ var MODELS = {
|
|
|
468
468
|
"seedream5-lite": {
|
|
469
469
|
benchmark: {
|
|
470
470
|
artificialAnalysis: {
|
|
471
|
-
editing: { elo: 1169,
|
|
471
|
+
editing: { elo: 1169, rank: 32 },
|
|
472
472
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
473
473
|
sourceUrls: AA_IMAGE_SOURCES
|
|
474
474
|
}
|
|
@@ -501,10 +501,10 @@ var MODELS = {
|
|
|
501
501
|
"flux2-max": {
|
|
502
502
|
benchmark: {
|
|
503
503
|
artificialAnalysis: {
|
|
504
|
-
editing: { elo: 1201,
|
|
504
|
+
editing: { elo: 1201, rank: 19 },
|
|
505
505
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
506
506
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
507
|
-
textToImage: { elo: 1225,
|
|
507
|
+
textToImage: { elo: 1225, rank: 17 }
|
|
508
508
|
},
|
|
509
509
|
speed: {
|
|
510
510
|
medianSeconds: 31.6,
|
|
@@ -544,10 +544,10 @@ var MODELS = {
|
|
|
544
544
|
"flux2-pro": {
|
|
545
545
|
benchmark: {
|
|
546
546
|
artificialAnalysis: {
|
|
547
|
-
editing: { elo: 1170,
|
|
547
|
+
editing: { elo: 1170, rank: 31 },
|
|
548
548
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
549
549
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
550
|
-
textToImage: { elo: 1207,
|
|
550
|
+
textToImage: { elo: 1207, rank: 30 }
|
|
551
551
|
},
|
|
552
552
|
speed: {
|
|
553
553
|
medianSeconds: 16.1,
|
|
@@ -589,7 +589,7 @@ var MODELS = {
|
|
|
589
589
|
artificialAnalysis: {
|
|
590
590
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
591
591
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
592
|
-
textToImage: { elo: 1223,
|
|
592
|
+
textToImage: { elo: 1223, rank: 18 }
|
|
593
593
|
},
|
|
594
594
|
speed: {
|
|
595
595
|
medianSeconds: 15.3,
|
|
@@ -782,10 +782,10 @@ var MODELS = {
|
|
|
782
782
|
// #2 on BOTH boards, which almost nothing else manages - the top text-to-image model
|
|
783
783
|
// (GPT Image 2) drops to 3rd for editing, and the top editor (MAI-Image-2.5-Pro) is not
|
|
784
784
|
// on fal at all. Reve is the best editor motif can actually reach.
|
|
785
|
-
editing: { elo: 1263,
|
|
785
|
+
editing: { elo: 1263, rank: 2 },
|
|
786
786
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
787
787
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
788
|
-
textToImage: { elo: 1322,
|
|
788
|
+
textToImage: { elo: 1322, rank: 2 }
|
|
789
789
|
},
|
|
790
790
|
tiers: { price: "premium", quality: "frontier", speed: "unknown" },
|
|
791
791
|
useCase: "Highest-ranked editor reachable on fal; strong prompt adherence and text rendering"
|
|
@@ -822,7 +822,7 @@ var MODELS = {
|
|
|
822
822
|
artificialAnalysis: {
|
|
823
823
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
824
824
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
825
|
-
textToImage: { elo: 1215,
|
|
825
|
+
textToImage: { elo: 1215, rank: 25 }
|
|
826
826
|
}
|
|
827
827
|
},
|
|
828
828
|
endpoint: "fal-ai/recraft/v4/text-to-image",
|
|
@@ -879,7 +879,7 @@ var MODELS = {
|
|
|
879
879
|
artificialAnalysis: {
|
|
880
880
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
881
881
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
882
|
-
textToImage: { elo: 1220,
|
|
882
|
+
textToImage: { elo: 1220, rank: 19 }
|
|
883
883
|
}
|
|
884
884
|
},
|
|
885
885
|
name: "Ideogram V4",
|
|
@@ -914,10 +914,10 @@ var MODELS = {
|
|
|
914
914
|
"grok-image": {
|
|
915
915
|
benchmark: {
|
|
916
916
|
artificialAnalysis: {
|
|
917
|
-
editing: { elo: 1214,
|
|
917
|
+
editing: { elo: 1214, rank: 16 },
|
|
918
918
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
919
919
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
920
|
-
textToImage: { elo: 1216,
|
|
920
|
+
textToImage: { elo: 1216, rank: 23 }
|
|
921
921
|
},
|
|
922
922
|
speed: {
|
|
923
923
|
medianSeconds: 5.1,
|
|
@@ -991,10 +991,10 @@ var MODELS = {
|
|
|
991
991
|
qwen3: {
|
|
992
992
|
benchmark: {
|
|
993
993
|
artificialAnalysis: {
|
|
994
|
-
editing: { elo: 1218,
|
|
994
|
+
editing: { elo: 1218, rank: 15 },
|
|
995
995
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
996
996
|
sourceUrls: AA_IMAGE_SOURCES,
|
|
997
|
-
textToImage: { elo: 1272,
|
|
997
|
+
textToImage: { elo: 1272, rank: 11 }
|
|
998
998
|
},
|
|
999
999
|
tiers: { price: "budget", quality: "better", speed: "unknown" },
|
|
1000
1000
|
useCase: "Strong quality per dollar - 11th on text-to-image at $30/1k"
|
|
@@ -2705,6 +2705,13 @@ var ASSET_TOOLS = {
|
|
|
2705
2705
|
inputKind: "image",
|
|
2706
2706
|
name: "Seedream v5 Pro Layerize",
|
|
2707
2707
|
outputKeys: ["layers", "images"],
|
|
2708
|
+
// Every element of `layers` carries its own `name` ("Left amber glass
|
|
2709
|
+
// bottle") and a `z_index` that orders the stack, verified live. Without
|
|
2710
|
+
// this the stack lands as layers.png … layers-5.png and the only way to
|
|
2711
|
+
// tell the reconstructed background plate from an object is to open them.
|
|
2712
|
+
outputLabels: {
|
|
2713
|
+
layers: { fromItem: { nameField: "name", orderField: "z_index" } }
|
|
2714
|
+
},
|
|
2708
2715
|
price: { kind: "metered" },
|
|
2709
2716
|
pricing: "$0.03375 per generated layer below 1536x1536 total area, $0.0675 per layer above; the listed rate is per layer, not per call",
|
|
2710
2717
|
queued: true,
|
|
@@ -4212,6 +4219,633 @@ var FalClient = class {
|
|
|
4212
4219
|
});
|
|
4213
4220
|
}
|
|
4214
4221
|
};
|
|
4222
|
+
|
|
4223
|
+
// src/tool-cost.ts
|
|
4224
|
+
var UNKNOWN = { basis: "unknown", usd: null };
|
|
4225
|
+
function totalMegapixels(outputs) {
|
|
4226
|
+
let pixels = 0;
|
|
4227
|
+
let measured = 0;
|
|
4228
|
+
for (const output of outputs) {
|
|
4229
|
+
if (output.width !== void 0 && output.height !== void 0) {
|
|
4230
|
+
pixels += output.width * output.height;
|
|
4231
|
+
measured += 1;
|
|
4232
|
+
}
|
|
4233
|
+
}
|
|
4234
|
+
return measured === 0 ? null : pixels / 1e6;
|
|
4235
|
+
}
|
|
4236
|
+
function projectedToolCost(price) {
|
|
4237
|
+
return price.kind === "call" ? { basis: "projected", usd: price.usd } : UNKNOWN;
|
|
4238
|
+
}
|
|
4239
|
+
function measuredToolCost(price, outputs) {
|
|
4240
|
+
if (price.kind === "call") {
|
|
4241
|
+
return { basis: "measured", usd: price.usd };
|
|
4242
|
+
}
|
|
4243
|
+
if (price.kind === "megapixel") {
|
|
4244
|
+
const megapixels = totalMegapixels(outputs);
|
|
4245
|
+
return megapixels === null ? UNKNOWN : { basis: "measured", usd: price.usd * megapixels };
|
|
4246
|
+
}
|
|
4247
|
+
return UNKNOWN;
|
|
4248
|
+
}
|
|
4249
|
+
function formatCost(usd) {
|
|
4250
|
+
return usd === null ? "metered" : `$${usd.toFixed(3)}`;
|
|
4251
|
+
}
|
|
4252
|
+
function sumCosts(costs) {
|
|
4253
|
+
let known = 0;
|
|
4254
|
+
let unknown = 0;
|
|
4255
|
+
for (const cost of costs) {
|
|
4256
|
+
if (cost === null) {
|
|
4257
|
+
unknown += 1;
|
|
4258
|
+
} else {
|
|
4259
|
+
known += cost;
|
|
4260
|
+
}
|
|
4261
|
+
}
|
|
4262
|
+
return { known, unknown };
|
|
4263
|
+
}
|
|
4264
|
+
|
|
4265
|
+
// src/tool-parameters.generated.ts
|
|
4266
|
+
var FAL_TOOL_PARAMETERS = {
|
|
4267
|
+
"ben-v2": [
|
|
4268
|
+
{ key: "seed", type: "integer" }
|
|
4269
|
+
],
|
|
4270
|
+
"birefnet": [
|
|
4271
|
+
{ key: "mask_only", type: "boolean", fallback: false },
|
|
4272
|
+
{ key: "model", type: "enum(General Use (Light)|General Use (Light 2K)|General Use (Heavy)|Matting|Portrait|General Use (Dynamic))", fallback: "General Use (Light)" },
|
|
4273
|
+
{ key: "operating_resolution", type: "enum(1024x1024|2048x2048|2304x2304)", fallback: "1024x1024" },
|
|
4274
|
+
{ key: "output_format", type: "enum(webp|png|gif)", fallback: "png" },
|
|
4275
|
+
{ key: "output_mask", type: "boolean", fallback: false },
|
|
4276
|
+
{ key: "refine_foreground", type: "boolean", fallback: true }
|
|
4277
|
+
],
|
|
4278
|
+
"bria-eraser": [
|
|
4279
|
+
{ key: "mask_type", type: "enum(manual|automatic)", fallback: "manual" },
|
|
4280
|
+
{ key: "preserve_alpha", type: "boolean", fallback: false }
|
|
4281
|
+
],
|
|
4282
|
+
"bria-expand": [
|
|
4283
|
+
{ key: "aspect_ratio", type: "enum(1:1|2:3|3:2|3:4|4:3|4:5|5:4|9:16|16:9)" },
|
|
4284
|
+
{ key: "canvas_size", type: "list[integer]", required: true },
|
|
4285
|
+
{ key: "negative_prompt", type: "string", fallback: "" },
|
|
4286
|
+
{ key: "original_image_location", type: "list[integer]" },
|
|
4287
|
+
{ key: "original_image_size", type: "list[integer]" },
|
|
4288
|
+
{ key: "prompt", type: "string", fallback: "" },
|
|
4289
|
+
{ key: "seed", type: "integer" }
|
|
4290
|
+
],
|
|
4291
|
+
"bria-genfill": [
|
|
4292
|
+
{ key: "negative_prompt", type: "string", fallback: "" },
|
|
4293
|
+
{ key: "num_images", type: "integer", fallback: 1 },
|
|
4294
|
+
{ key: "prompt", type: "string", required: true },
|
|
4295
|
+
{ key: "seed", type: "integer" }
|
|
4296
|
+
],
|
|
4297
|
+
"bria-rmbg": [],
|
|
4298
|
+
"bria-video-rmbg": [
|
|
4299
|
+
{ key: "background_color", type: "enum(Transparent|Black|White|Gray|Red|Green|Blue|Yellow|Cyan|Magenta|Orange)", fallback: "Black" },
|
|
4300
|
+
{ 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" },
|
|
4301
|
+
{ key: "preserve_audio", type: "boolean", fallback: true }
|
|
4302
|
+
],
|
|
4303
|
+
"ddcolor": [
|
|
4304
|
+
{ key: "seed", type: "integer" }
|
|
4305
|
+
],
|
|
4306
|
+
"depth-anything": [],
|
|
4307
|
+
"dwpose": [
|
|
4308
|
+
{ key: "draw_mode", type: "enum(full-pose|body-pose|face-pose|hand-pose|face-hand-mask|face-mask|hand-mask)", fallback: "body-pose" }
|
|
4309
|
+
],
|
|
4310
|
+
"finegrain-eraser": [
|
|
4311
|
+
{ key: "mode", type: "enum(express|standard|premium)", fallback: "standard" },
|
|
4312
|
+
{ key: "prompt", type: "string", required: true },
|
|
4313
|
+
{ key: "seed", type: "integer" }
|
|
4314
|
+
],
|
|
4315
|
+
"flux-outpaint": [
|
|
4316
|
+
{ key: "auto_crop", type: "boolean", fallback: false },
|
|
4317
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4318
|
+
{ key: "expand_bottom", type: "integer", fallback: 0 },
|
|
4319
|
+
{ key: "expand_left", type: "integer", fallback: 0 },
|
|
4320
|
+
{ key: "expand_right", type: "integer", fallback: 0 },
|
|
4321
|
+
{ key: "expand_top", type: "integer", fallback: 0 },
|
|
4322
|
+
{ key: "mode", type: "enum(high|fast)", fallback: "high" },
|
|
4323
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" }
|
|
4324
|
+
],
|
|
4325
|
+
"got-ocr": [
|
|
4326
|
+
{ key: "do_format", type: "boolean", fallback: false },
|
|
4327
|
+
{ key: "multi_page", type: "boolean", fallback: false }
|
|
4328
|
+
],
|
|
4329
|
+
"hed": [
|
|
4330
|
+
{ key: "safe", type: "boolean", fallback: false },
|
|
4331
|
+
{ key: "scribble", type: "boolean", fallback: false }
|
|
4332
|
+
],
|
|
4333
|
+
"hunyuan3d-v3": [
|
|
4334
|
+
{ key: "back_image_url", type: "string" },
|
|
4335
|
+
{ key: "enable_pbr", type: "boolean", fallback: false },
|
|
4336
|
+
{ key: "face_count", type: "integer", fallback: 5e5 },
|
|
4337
|
+
{ key: "generate_type", type: "enum(Normal|LowPoly|Geometry)", fallback: "Normal" },
|
|
4338
|
+
{ key: "left_image_url", type: "string" },
|
|
4339
|
+
{ key: "polygon_type", type: "enum(triangle|quadrilateral)", fallback: "triangle" },
|
|
4340
|
+
{ key: "right_image_url", type: "string" }
|
|
4341
|
+
],
|
|
4342
|
+
"iclight-v2": [
|
|
4343
|
+
{ key: "background_threshold", type: "number", fallback: 0.67 },
|
|
4344
|
+
{ key: "cfg", type: "number", fallback: 1 },
|
|
4345
|
+
{ key: "enable_hr_fix", type: "boolean", fallback: false },
|
|
4346
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4347
|
+
{ key: "guidance_scale", type: "number", fallback: 5 },
|
|
4348
|
+
{ key: "highres_denoise", type: "number", fallback: 0.95 },
|
|
4349
|
+
{ key: "hr_downscale", type: "number", fallback: 0.5 },
|
|
4350
|
+
{ key: "image_size", type: "object|enum(square_hd|square|portrait_4_3|portrait_16_9|landscape_4_3|landscape_16_9)" },
|
|
4351
|
+
{ key: "initial_latent", type: "enum(None|Left|Right|Top|Bottom)", fallback: "None" },
|
|
4352
|
+
{ key: "lowres_denoise", type: "number", fallback: 0.98 },
|
|
4353
|
+
{ key: "mask_image_url", type: "string" },
|
|
4354
|
+
{ key: "negative_prompt", type: "string", fallback: "" },
|
|
4355
|
+
{ key: "num_images", type: "integer", fallback: 1 },
|
|
4356
|
+
{ key: "num_inference_steps", type: "integer", fallback: 28 },
|
|
4357
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" },
|
|
4358
|
+
{ key: "prompt", type: "string", required: true },
|
|
4359
|
+
{ key: "seed", type: "integer" }
|
|
4360
|
+
],
|
|
4361
|
+
"ideogram-layerize-text": [
|
|
4362
|
+
{ key: "font_file_body_url", type: "string" },
|
|
4363
|
+
{ key: "font_file_h1_url", type: "string" },
|
|
4364
|
+
{ key: "font_file_h2_url", type: "string" },
|
|
4365
|
+
{ key: "font_file_small_url", type: "string" },
|
|
4366
|
+
{ key: "font_name_body", type: "string" },
|
|
4367
|
+
{ key: "font_name_h1", type: "string" },
|
|
4368
|
+
{ key: "font_name_h2", type: "string" },
|
|
4369
|
+
{ key: "font_name_small", type: "string" },
|
|
4370
|
+
{ key: "prompt", type: "string" },
|
|
4371
|
+
{ key: "seed", type: "integer" }
|
|
4372
|
+
],
|
|
4373
|
+
"ideogram-reframe": [
|
|
4374
|
+
{ key: "color_palette", type: "object" },
|
|
4375
|
+
{ key: "image_size", type: "object|enum(square_hd|square|portrait_4_3|portrait_16_9|landscape_4_3|landscape_16_9)", required: true },
|
|
4376
|
+
{ key: "num_images", type: "integer", fallback: 1 },
|
|
4377
|
+
{ key: "rendering_speed", type: "enum(TURBO|BALANCED|QUALITY)", fallback: "BALANCED" },
|
|
4378
|
+
{ key: "seed", type: "integer" },
|
|
4379
|
+
{ key: "style", type: "enum(AUTO|GENERAL|REALISTIC|DESIGN)" },
|
|
4380
|
+
{ key: "style_codes", type: "list[string]" },
|
|
4381
|
+
{ 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)" }
|
|
4382
|
+
],
|
|
4383
|
+
"ideogram-tiling": [
|
|
4384
|
+
{ key: "acceleration", type: "enum(none|low|regular|high)", fallback: "none" },
|
|
4385
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4386
|
+
{ key: "expansion_model", type: "enum(None|Medium|Large)", fallback: "Medium" },
|
|
4387
|
+
{ key: "image_size", type: "object|enum(square_hd|square|portrait_4_3|portrait_16_9|landscape_4_3|landscape_16_9)", fallback: "square_hd" },
|
|
4388
|
+
{ key: "num_images", type: "integer", fallback: 1 },
|
|
4389
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" },
|
|
4390
|
+
{ key: "prompt", type: "string", required: true },
|
|
4391
|
+
{ key: "rendering_speed", type: "enum(TURBO|BALANCED|QUALITY)", fallback: "BALANCED" },
|
|
4392
|
+
{ key: "seed", type: "integer" },
|
|
4393
|
+
{ key: "strength", type: "number", fallback: 0.8 },
|
|
4394
|
+
{ key: "tiling_mode", type: "enum(both|horizontal|vertical)", fallback: "both" }
|
|
4395
|
+
],
|
|
4396
|
+
"image2svg": [
|
|
4397
|
+
{ key: "color_precision", type: "integer", fallback: 6 },
|
|
4398
|
+
{ key: "colormode", type: "enum(color|binary)", fallback: "color" },
|
|
4399
|
+
{ key: "corner_threshold", type: "integer", fallback: 60 },
|
|
4400
|
+
{ key: "filter_speckle", type: "integer", fallback: 4 },
|
|
4401
|
+
{ key: "hierarchical", type: "enum(stacked|cutout)", fallback: "stacked" },
|
|
4402
|
+
{ key: "layer_difference", type: "integer", fallback: 16 },
|
|
4403
|
+
{ key: "length_threshold", type: "number", fallback: 4 },
|
|
4404
|
+
{ key: "max_iterations", type: "integer", fallback: 10 },
|
|
4405
|
+
{ key: "mode", type: "enum(spline|polygon)", fallback: "spline" },
|
|
4406
|
+
{ key: "path_precision", type: "integer", fallback: 3 },
|
|
4407
|
+
{ key: "splice_threshold", type: "integer", fallback: 45 }
|
|
4408
|
+
],
|
|
4409
|
+
"lighting-restoration": [
|
|
4410
|
+
{ key: "acceleration", type: "enum(none|regular)", fallback: "regular" },
|
|
4411
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4412
|
+
{ key: "guidance_scale", type: "number", fallback: 1 },
|
|
4413
|
+
{ key: "image_size", type: "object|enum(square_hd|square|portrait_4_3|portrait_16_9|landscape_4_3|landscape_16_9)" },
|
|
4414
|
+
{ key: "negative_prompt", type: "string", fallback: " " },
|
|
4415
|
+
{ key: "num_images", type: "integer", fallback: 1 },
|
|
4416
|
+
{ key: "num_inference_steps", type: "integer", fallback: 6 },
|
|
4417
|
+
{ key: "output_format", type: "enum(png|jpeg|webp)", fallback: "png" },
|
|
4418
|
+
{ key: "seed", type: "integer" }
|
|
4419
|
+
],
|
|
4420
|
+
"lineart": [
|
|
4421
|
+
{ key: "coarse", type: "boolean", fallback: false }
|
|
4422
|
+
],
|
|
4423
|
+
"marigold-depth": [
|
|
4424
|
+
{ key: "ensemble_size", type: "integer", fallback: 10 },
|
|
4425
|
+
{ key: "num_inference_steps", type: "integer", fallback: 10 },
|
|
4426
|
+
{ key: "processing_res", type: "integer", fallback: 0 }
|
|
4427
|
+
],
|
|
4428
|
+
"midas-depth": [
|
|
4429
|
+
{ key: "a", type: "number", fallback: 6.283185307179586 },
|
|
4430
|
+
{ key: "bg_th", type: "number", fallback: 0.1 },
|
|
4431
|
+
{ key: "depth_and_normal", type: "boolean", fallback: false }
|
|
4432
|
+
],
|
|
4433
|
+
"midas-preprocessor": [
|
|
4434
|
+
{ key: "a", type: "number", fallback: 6.283185307179586 },
|
|
4435
|
+
{ key: "background_threshold", type: "number", fallback: 0.1 }
|
|
4436
|
+
],
|
|
4437
|
+
"mlsd": [
|
|
4438
|
+
{ key: "distance_threshold", type: "number", fallback: 0.1 },
|
|
4439
|
+
{ key: "score_threshold", type: "number", fallback: 0.1 }
|
|
4440
|
+
],
|
|
4441
|
+
"moondream-caption": [
|
|
4442
|
+
{ key: "length", type: "enum(short|normal|long)", fallback: "normal" },
|
|
4443
|
+
{ key: "temperature", type: "number" },
|
|
4444
|
+
{ key: "top_p", type: "number" }
|
|
4445
|
+
],
|
|
4446
|
+
"moondream-detect": [
|
|
4447
|
+
{ key: "preview", type: "boolean", fallback: false },
|
|
4448
|
+
{ key: "prompt", type: "string", required: true }
|
|
4449
|
+
],
|
|
4450
|
+
"moondream-point": [
|
|
4451
|
+
{ key: "preview", type: "boolean", fallback: false },
|
|
4452
|
+
{ key: "prompt", type: "string", required: true }
|
|
4453
|
+
],
|
|
4454
|
+
"moondream-query": [
|
|
4455
|
+
{ key: "prompt", type: "string", required: true },
|
|
4456
|
+
{ key: "reasoning", type: "boolean", fallback: true },
|
|
4457
|
+
{ key: "temperature", type: "number" },
|
|
4458
|
+
{ key: "top_p", type: "number" }
|
|
4459
|
+
],
|
|
4460
|
+
"nsfw": [],
|
|
4461
|
+
"object-removal": [
|
|
4462
|
+
{ key: "mask_expansion", type: "integer", fallback: 15 },
|
|
4463
|
+
{ key: "model", type: "enum(low_quality|medium_quality|high_quality|best_quality)", fallback: "best_quality" },
|
|
4464
|
+
{ key: "prompt", type: "string", required: true }
|
|
4465
|
+
],
|
|
4466
|
+
"object-removal-bbox": [
|
|
4467
|
+
{ key: "box_prompts", type: "list[object]", fallback: [] },
|
|
4468
|
+
{ key: "mask_expansion", type: "integer", fallback: 15 },
|
|
4469
|
+
{ key: "model", type: "enum(low_quality|medium_quality|high_quality|best_quality)", fallback: "best_quality" }
|
|
4470
|
+
],
|
|
4471
|
+
"object-removal-mask": [
|
|
4472
|
+
{ key: "mask_expansion", type: "integer", fallback: 15 },
|
|
4473
|
+
{ key: "model", type: "enum(low_quality|medium_quality|high_quality|best_quality)", fallback: "best_quality" }
|
|
4474
|
+
],
|
|
4475
|
+
"patina": [
|
|
4476
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4477
|
+
{ key: "maps", type: "list[enum(basecolor|normal|roughness|metalness|height)]", fallback: ["basecolor", "normal", "roughness", "metalness", "height"] },
|
|
4478
|
+
{ key: "output_format", type: "enum(jpeg|png|webp)", fallback: "png" },
|
|
4479
|
+
{ key: "seed", type: "integer" }
|
|
4480
|
+
],
|
|
4481
|
+
"patina-extract": [
|
|
4482
|
+
{ key: "enable_prompt_expansion", type: "boolean", fallback: true },
|
|
4483
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4484
|
+
{ key: "image_size", type: "object|enum(square_hd|square|portrait_4_3|portrait_16_9|landscape_4_3|landscape_16_9)", fallback: "square_hd" },
|
|
4485
|
+
{ key: "maps", type: "list[enum(basecolor|normal|roughness|metalness|height)]", fallback: ["basecolor", "normal", "roughness", "metalness", "height"] },
|
|
4486
|
+
{ key: "num_images", type: "integer", fallback: 1 },
|
|
4487
|
+
{ key: "num_inference_steps", type: "integer", fallback: 8 },
|
|
4488
|
+
{ key: "output_format", type: "enum(jpeg|png|webp)", fallback: "png" },
|
|
4489
|
+
{ key: "prompt", type: "string", required: true },
|
|
4490
|
+
{ key: "seed", type: "integer" },
|
|
4491
|
+
{ key: "strength", type: "number", fallback: 0.6 },
|
|
4492
|
+
{ key: "tile_size", type: "integer", fallback: 128 },
|
|
4493
|
+
{ key: "tile_stride", type: "integer", fallback: 64 },
|
|
4494
|
+
{ key: "tiling_mode", type: "enum(both|horizontal|vertical)", fallback: "both" },
|
|
4495
|
+
{ key: "upscale_factor", type: "enum(0|2|4)", fallback: 0 }
|
|
4496
|
+
],
|
|
4497
|
+
"pidi": [
|
|
4498
|
+
{ key: "apply_filter", type: "boolean", fallback: false },
|
|
4499
|
+
{ key: "safe", type: "boolean", fallback: false },
|
|
4500
|
+
{ key: "scribble", type: "boolean", fallback: false }
|
|
4501
|
+
],
|
|
4502
|
+
"qwen-layered": [
|
|
4503
|
+
{ key: "acceleration", type: "enum(none|regular|high)", fallback: "regular" },
|
|
4504
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4505
|
+
{ key: "guidance_scale", type: "number", fallback: 5 },
|
|
4506
|
+
{ key: "negative_prompt", type: "string", fallback: "" },
|
|
4507
|
+
{ key: "num_inference_steps", type: "integer", fallback: 28 },
|
|
4508
|
+
{ key: "num_layers", type: "integer", fallback: 4 },
|
|
4509
|
+
{ key: "output_format", type: "enum(png|webp)", fallback: "png" },
|
|
4510
|
+
{ key: "prompt", type: "string" },
|
|
4511
|
+
{ key: "seed", type: "integer" }
|
|
4512
|
+
],
|
|
4513
|
+
"recraft-vectorize": [],
|
|
4514
|
+
"rembg": [
|
|
4515
|
+
{ key: "crop_to_bbox", type: "boolean", fallback: false }
|
|
4516
|
+
],
|
|
4517
|
+
"remove-lighting": [
|
|
4518
|
+
{ key: "acceleration", type: "enum(none|regular)", fallback: "regular" },
|
|
4519
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4520
|
+
{ key: "guidance_scale", type: "number", fallback: 1 },
|
|
4521
|
+
{ key: "image_size", type: "object|enum(square_hd|square|portrait_4_3|portrait_16_9|landscape_4_3|landscape_16_9)" },
|
|
4522
|
+
{ key: "negative_prompt", type: "string", fallback: " " },
|
|
4523
|
+
{ key: "num_images", type: "integer", fallback: 1 },
|
|
4524
|
+
{ key: "num_inference_steps", type: "integer", fallback: 6 },
|
|
4525
|
+
{ key: "output_format", type: "enum(png|jpeg|webp)", fallback: "png" },
|
|
4526
|
+
{ key: "seed", type: "integer" }
|
|
4527
|
+
],
|
|
4528
|
+
"sam-preprocessor": [],
|
|
4529
|
+
"sam2-auto": [
|
|
4530
|
+
{ key: "min_mask_region_area", type: "integer", fallback: 100 },
|
|
4531
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "png" },
|
|
4532
|
+
{ key: "points_per_side", type: "integer", fallback: 32 },
|
|
4533
|
+
{ key: "pred_iou_thresh", type: "number", fallback: 0.88 },
|
|
4534
|
+
{ key: "stability_score_thresh", type: "number", fallback: 0.95 }
|
|
4535
|
+
],
|
|
4536
|
+
"sam3-1-image": [
|
|
4537
|
+
{ key: "apply_mask", type: "boolean", fallback: true },
|
|
4538
|
+
{ key: "box_prompts", type: "list[object]", fallback: [] },
|
|
4539
|
+
{ key: "include_boxes", type: "boolean", fallback: false },
|
|
4540
|
+
{ key: "include_scores", type: "boolean", fallback: false },
|
|
4541
|
+
{ key: "max_masks", type: "integer", fallback: 3 },
|
|
4542
|
+
{ key: "output_format", type: "enum(jpeg|png|webp)", fallback: "png" },
|
|
4543
|
+
{ key: "point_prompts", type: "list[object]", fallback: [] },
|
|
4544
|
+
{ key: "prompt", type: "string", fallback: "wheel" },
|
|
4545
|
+
{ key: "return_multiple_masks", type: "boolean", fallback: false }
|
|
4546
|
+
],
|
|
4547
|
+
"sam3-1-video": [
|
|
4548
|
+
{ key: "apply_mask", type: "boolean", fallback: true },
|
|
4549
|
+
{ key: "box_prompts", type: "list[object]", fallback: [] },
|
|
4550
|
+
{ key: "detection_threshold", type: "number", fallback: 0.5 },
|
|
4551
|
+
{ key: "max_num_objects", type: "integer", fallback: 16 },
|
|
4552
|
+
{ key: "point_prompts", type: "list[object]", fallback: [] },
|
|
4553
|
+
{ key: "prompt", type: "string", fallback: "" },
|
|
4554
|
+
{ key: "video_output_type", type: "enum(X264 (.mp4)|VP9 (.webm))", fallback: "X264 (.mp4)" }
|
|
4555
|
+
],
|
|
4556
|
+
"sam3-3d-align": [
|
|
4557
|
+
{ key: "body_mask_url", type: "string" },
|
|
4558
|
+
{ key: "body_mesh_url", type: "string", required: true },
|
|
4559
|
+
{ key: "focal_length", type: "number" },
|
|
4560
|
+
{ key: "object_mesh_url", type: "string" }
|
|
4561
|
+
],
|
|
4562
|
+
"sam3-3d-body": [
|
|
4563
|
+
{ key: "export_meshes", type: "boolean", fallback: true },
|
|
4564
|
+
{ key: "include_3d_keypoints", type: "boolean", fallback: true },
|
|
4565
|
+
{ key: "include_mhr_params", type: "boolean", fallback: true }
|
|
4566
|
+
],
|
|
4567
|
+
"sam3-3d-objects": [
|
|
4568
|
+
{ key: "box_prompts", type: "list[object]", fallback: [] },
|
|
4569
|
+
{ key: "detection_threshold", type: "number" },
|
|
4570
|
+
{ key: "export_textured_glb", type: "boolean", fallback: false },
|
|
4571
|
+
{ key: "mask_urls", type: "list[string]" },
|
|
4572
|
+
{ key: "point_prompts", type: "list[object]", fallback: [] },
|
|
4573
|
+
{ key: "pointmap_url", type: "string" },
|
|
4574
|
+
{ key: "prompt", type: "string", fallback: "car" },
|
|
4575
|
+
{ key: "seed", type: "integer" }
|
|
4576
|
+
],
|
|
4577
|
+
"sam3-image": [
|
|
4578
|
+
{ key: "apply_mask", type: "boolean", fallback: true },
|
|
4579
|
+
{ key: "box_prompts", type: "list[object]", fallback: [] },
|
|
4580
|
+
{ key: "include_boxes", type: "boolean", fallback: false },
|
|
4581
|
+
{ key: "include_scores", type: "boolean", fallback: false },
|
|
4582
|
+
{ key: "max_masks", type: "integer", fallback: 3 },
|
|
4583
|
+
{ key: "output_format", type: "enum(jpeg|png|webp)", fallback: "png" },
|
|
4584
|
+
{ key: "point_prompts", type: "list[object]", fallback: [] },
|
|
4585
|
+
{ key: "prompt", type: "string", fallback: "wheel" },
|
|
4586
|
+
{ key: "return_multiple_masks", type: "boolean", fallback: false },
|
|
4587
|
+
{ key: "text_prompt", type: "string" }
|
|
4588
|
+
],
|
|
4589
|
+
"sam3-image-rle": [
|
|
4590
|
+
{ key: "apply_mask", type: "boolean", fallback: true },
|
|
4591
|
+
{ key: "box_prompts", type: "list[object]", fallback: [] },
|
|
4592
|
+
{ key: "include_boxes", type: "boolean", fallback: false },
|
|
4593
|
+
{ key: "include_scores", type: "boolean", fallback: false },
|
|
4594
|
+
{ key: "max_masks", type: "integer", fallback: 3 },
|
|
4595
|
+
{ key: "output_format", type: "enum(jpeg|png|webp)", fallback: "png" },
|
|
4596
|
+
{ key: "point_prompts", type: "list[object]", fallback: [] },
|
|
4597
|
+
{ key: "prompt", type: "string", fallback: "wheel" },
|
|
4598
|
+
{ key: "return_multiple_masks", type: "boolean", fallback: false },
|
|
4599
|
+
{ key: "text_prompt", type: "string" }
|
|
4600
|
+
],
|
|
4601
|
+
"sam3-video": [
|
|
4602
|
+
{ key: "apply_mask", type: "boolean", fallback: true },
|
|
4603
|
+
{ key: "box_prompts", type: "list[object]", fallback: [] },
|
|
4604
|
+
{ key: "detection_threshold", type: "number", fallback: 0.5 },
|
|
4605
|
+
{ key: "point_prompts", type: "list[object]", fallback: [] },
|
|
4606
|
+
{ key: "prompt", type: "string", fallback: "" },
|
|
4607
|
+
{ key: "text_prompt", type: "string" },
|
|
4608
|
+
{ key: "video_output_type", type: "enum(X264 (.mp4)|VP9 (.webm))", fallback: "X264 (.mp4)" }
|
|
4609
|
+
],
|
|
4610
|
+
"sam3-video-rle": [
|
|
4611
|
+
{ key: "apply_mask", type: "boolean", fallback: false },
|
|
4612
|
+
{ key: "boundingbox_zip", type: "boolean", fallback: false },
|
|
4613
|
+
{ key: "box_prompts", type: "list[object]", fallback: [] },
|
|
4614
|
+
{ key: "detection_threshold", type: "number", fallback: 0.5 },
|
|
4615
|
+
{ key: "frame_index", type: "integer", fallback: 0 },
|
|
4616
|
+
{ key: "point_prompts", type: "list[object]", fallback: [] },
|
|
4617
|
+
{ key: "prompt", type: "string", fallback: "" }
|
|
4618
|
+
],
|
|
4619
|
+
"scribble": [
|
|
4620
|
+
{ key: "model", type: "enum(HED|PiDi)", fallback: "HED" },
|
|
4621
|
+
{ key: "safe", type: "boolean", fallback: false }
|
|
4622
|
+
],
|
|
4623
|
+
"seedream-layerize": [
|
|
4624
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4625
|
+
{ key: "enhance_prompt_mode", type: "enum(standard|fast)", fallback: "standard" },
|
|
4626
|
+
{ key: "image_size", type: "enum(auto|auto_1K|auto_1.5K|auto_2K)", fallback: "auto" },
|
|
4627
|
+
{ key: "prompt", type: "string", fallback: "" }
|
|
4628
|
+
],
|
|
4629
|
+
"seedvr-seamless": [
|
|
4630
|
+
{ key: "enable_safety_checker", type: "boolean", fallback: true },
|
|
4631
|
+
{ key: "noise_scale", type: "number", fallback: 0.1 },
|
|
4632
|
+
{ key: "output_format", type: "enum(png|jpeg|webp)", fallback: "png" },
|
|
4633
|
+
{ key: "seed", type: "integer" },
|
|
4634
|
+
{ key: "target_resolution", type: "enum(720p|1080p|1440p|2160p)", fallback: "1080p" },
|
|
4635
|
+
{ key: "upscale_factor", type: "number", fallback: 2 },
|
|
4636
|
+
{ key: "upscale_mode", type: "enum(target|factor)", fallback: "factor" }
|
|
4637
|
+
],
|
|
4638
|
+
"seedvr-upscale": [
|
|
4639
|
+
{ key: "noise_scale", type: "number", fallback: 0.1 },
|
|
4640
|
+
{ key: "output_format", type: "enum(png|jpg|webp)", fallback: "jpg" },
|
|
4641
|
+
{ key: "seed", type: "integer" },
|
|
4642
|
+
{ key: "target_resolution", type: "enum(720p|1080p|1440p|2160p)", fallback: "1080p" },
|
|
4643
|
+
{ key: "upscale_factor", type: "number", fallback: 2 },
|
|
4644
|
+
{ key: "upscale_mode", type: "enum(target|factor)", fallback: "factor" }
|
|
4645
|
+
],
|
|
4646
|
+
"smart-resize": [
|
|
4647
|
+
{ key: "num_images_per_size", type: "integer", fallback: 1 },
|
|
4648
|
+
{ key: "output_format", type: "enum(jpeg|png|webp)", fallback: "png" },
|
|
4649
|
+
{ key: "prompt", type: "string", fallback: "" },
|
|
4650
|
+
{ key: "resolution", type: "enum(1K|2K|4K)", fallback: "1K" },
|
|
4651
|
+
{ key: "safety_tolerance", type: "enum(1|2|3|4|5|6)", fallback: "4" },
|
|
4652
|
+
{ key: "seed", type: "integer" },
|
|
4653
|
+
{ key: "target_sizes", type: "list[string]", required: true }
|
|
4654
|
+
],
|
|
4655
|
+
"teed": [],
|
|
4656
|
+
"text-removal": [
|
|
4657
|
+
{ key: "aspect_ratio", type: "enum(21:9|16:9|4:3|3:2|1:1|2:3|3:4|9:16|9:21)" },
|
|
4658
|
+
{ key: "guidance_scale", type: "number", fallback: 3.5 },
|
|
4659
|
+
{ key: "num_inference_steps", type: "integer", fallback: 30 },
|
|
4660
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" },
|
|
4661
|
+
{ key: "safety_tolerance", type: "enum(1|2|3|4|5|6)", fallback: "2" },
|
|
4662
|
+
{ key: "seed", type: "integer" }
|
|
4663
|
+
],
|
|
4664
|
+
"topaz-adjust": [
|
|
4665
|
+
{ key: "model", type: "enum(Adjust V2|White Balance|Colorize)", fallback: "Adjust V2" },
|
|
4666
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" }
|
|
4667
|
+
],
|
|
4668
|
+
"topaz-creative": [
|
|
4669
|
+
{ key: "autoprompt", type: "boolean" },
|
|
4670
|
+
{ key: "color_preservation", type: "boolean" },
|
|
4671
|
+
{ key: "creativity", type: "integer" },
|
|
4672
|
+
{ key: "crop_to_fill", type: "boolean", fallback: false },
|
|
4673
|
+
{ key: "model", type: "enum(Bloom 2|Bloom|Bloom Realism)", fallback: "Bloom 2" },
|
|
4674
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" },
|
|
4675
|
+
{ key: "upscale_factor", type: "number", fallback: 2 }
|
|
4676
|
+
],
|
|
4677
|
+
"topaz-denoise": [
|
|
4678
|
+
{ key: "model", type: "enum(Normal|Strong|Extreme|Denoise Max)", fallback: "Normal" },
|
|
4679
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" }
|
|
4680
|
+
],
|
|
4681
|
+
"topaz-generative": [
|
|
4682
|
+
{ key: "autoprompt", type: "boolean" },
|
|
4683
|
+
{ key: "creativity", type: "integer" },
|
|
4684
|
+
{ key: "crop_to_fill", type: "boolean", fallback: false },
|
|
4685
|
+
{ key: "denoise", type: "number" },
|
|
4686
|
+
{ key: "detail", type: "number" },
|
|
4687
|
+
{ key: "enhancement_strength", type: "enum(low|medium|high)" },
|
|
4688
|
+
{ key: "face_enhancement", type: "boolean", fallback: true },
|
|
4689
|
+
{ key: "face_enhancement_creativity", type: "number", fallback: 0 },
|
|
4690
|
+
{ key: "face_enhancement_strength", type: "number", fallback: 0.8 },
|
|
4691
|
+
{ key: "model", type: "enum(Wonder 3.5|Wonder 3|Wonder 2|Wonder|Recover 3|Standard MAX|Redefine|Recovery V2|Recovery)", fallback: "Wonder 3" },
|
|
4692
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" },
|
|
4693
|
+
{ key: "prompt", type: "string" },
|
|
4694
|
+
{ key: "sharpen", type: "number" },
|
|
4695
|
+
{ key: "subject_detection", type: "enum(All|Foreground|Background)", fallback: "All" },
|
|
4696
|
+
{ key: "texture", type: "integer" },
|
|
4697
|
+
{ key: "upscale_factor", type: "number", fallback: 2 }
|
|
4698
|
+
],
|
|
4699
|
+
"topaz-image": [
|
|
4700
|
+
{ key: "autoprompt", type: "boolean" },
|
|
4701
|
+
{ key: "creativity", type: "integer" },
|
|
4702
|
+
{ key: "crop_to_fill", type: "boolean", fallback: false },
|
|
4703
|
+
{ key: "denoise", type: "number" },
|
|
4704
|
+
{ key: "detail", type: "number" },
|
|
4705
|
+
{ key: "enhancement_strength", type: "enum(low|medium|high)" },
|
|
4706
|
+
{ key: "face_enhancement", type: "boolean", fallback: true },
|
|
4707
|
+
{ key: "face_enhancement_creativity", type: "number", fallback: 0 },
|
|
4708
|
+
{ key: "face_enhancement_strength", type: "number", fallback: 0.8 },
|
|
4709
|
+
{ key: "fix_compression", type: "number" },
|
|
4710
|
+
{ 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" },
|
|
4711
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" },
|
|
4712
|
+
{ key: "prompt", type: "string" },
|
|
4713
|
+
{ key: "sharpen", type: "number" },
|
|
4714
|
+
{ key: "strength", type: "number" },
|
|
4715
|
+
{ key: "subject_detection", type: "enum(All|Foreground|Background)", fallback: "All" },
|
|
4716
|
+
{ key: "texture", type: "integer" },
|
|
4717
|
+
{ key: "upscale_factor", type: "number", fallback: 2 }
|
|
4718
|
+
],
|
|
4719
|
+
"topaz-precision": [
|
|
4720
|
+
{ key: "crop_to_fill", type: "boolean", fallback: false },
|
|
4721
|
+
{ key: "denoise", type: "number" },
|
|
4722
|
+
{ key: "face_enhancement", type: "boolean", fallback: true },
|
|
4723
|
+
{ key: "face_enhancement_creativity", type: "number", fallback: 0 },
|
|
4724
|
+
{ key: "face_enhancement_strength", type: "number", fallback: 0.8 },
|
|
4725
|
+
{ key: "fix_compression", type: "number" },
|
|
4726
|
+
{ key: "model", type: "enum(Standard V2|High Fidelity V3|High Fidelity V2|Low Resolution V2|CGI|Text Refine)", fallback: "Standard V2" },
|
|
4727
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" },
|
|
4728
|
+
{ key: "sharpen", type: "number" },
|
|
4729
|
+
{ key: "strength", type: "number" },
|
|
4730
|
+
{ key: "subject_detection", type: "enum(All|Foreground|Background)", fallback: "All" },
|
|
4731
|
+
{ key: "upscale_factor", type: "number", fallback: 2 }
|
|
4732
|
+
],
|
|
4733
|
+
"topaz-restore": [
|
|
4734
|
+
{ key: "model", type: "enum(Recover 3|Dust-Scratch V2)", fallback: "Recover 3" },
|
|
4735
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" }
|
|
4736
|
+
],
|
|
4737
|
+
"topaz-sharpen": [
|
|
4738
|
+
{ 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" },
|
|
4739
|
+
{ key: "output_format", type: "enum(jpeg|png)", fallback: "jpeg" }
|
|
4740
|
+
],
|
|
4741
|
+
"topaz-transparent": [
|
|
4742
|
+
{ key: "output_format", type: "string", fallback: "png" },
|
|
4743
|
+
{ key: "upscale_factor", type: "number", fallback: 2 }
|
|
4744
|
+
],
|
|
4745
|
+
"topaz-video": [
|
|
4746
|
+
{ key: "compression", type: "number" },
|
|
4747
|
+
{ key: "grain", type: "number" },
|
|
4748
|
+
{ key: "H264_output", type: "boolean", fallback: false },
|
|
4749
|
+
{ key: "halo", type: "number" },
|
|
4750
|
+
{ 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" },
|
|
4751
|
+
{ key: "noise", type: "number" },
|
|
4752
|
+
{ key: "recover_detail", type: "number" },
|
|
4753
|
+
{ key: "target_fps", type: "integer" },
|
|
4754
|
+
{ key: "upscale_factor", type: "number", fallback: 2 }
|
|
4755
|
+
],
|
|
4756
|
+
"trellis-2": [
|
|
4757
|
+
{ key: "decimation_target", type: "integer", fallback: 5e5 },
|
|
4758
|
+
{ key: "remesh", type: "boolean", fallback: true },
|
|
4759
|
+
{ key: "remesh_band", type: "number", fallback: 1 },
|
|
4760
|
+
{ key: "remesh_project", type: "number", fallback: 0 },
|
|
4761
|
+
{ key: "resolution", type: "enum(512|1024|1536)", fallback: 1024 },
|
|
4762
|
+
{ key: "seed", type: "integer" },
|
|
4763
|
+
{ key: "shape_slat_guidance_interval_end", type: "number", fallback: 1 },
|
|
4764
|
+
{ key: "shape_slat_guidance_interval_start", type: "number", fallback: 0.6 },
|
|
4765
|
+
{ key: "shape_slat_guidance_rescale", type: "number", fallback: 0.5 },
|
|
4766
|
+
{ key: "shape_slat_guidance_strength", type: "number", fallback: 7.5 },
|
|
4767
|
+
{ key: "shape_slat_rescale_t", type: "number", fallback: 3 },
|
|
4768
|
+
{ key: "shape_slat_sampling_steps", type: "integer", fallback: 12 },
|
|
4769
|
+
{ key: "ss_guidance_interval_end", type: "number", fallback: 1 },
|
|
4770
|
+
{ key: "ss_guidance_interval_start", type: "number", fallback: 0.6 },
|
|
4771
|
+
{ key: "ss_guidance_rescale", type: "number", fallback: 0.7 },
|
|
4772
|
+
{ key: "ss_guidance_strength", type: "number", fallback: 7.5 },
|
|
4773
|
+
{ key: "ss_rescale_t", type: "number", fallback: 5 },
|
|
4774
|
+
{ key: "ss_sampling_steps", type: "integer", fallback: 12 },
|
|
4775
|
+
{ key: "tex_slat_guidance_interval_end", type: "number", fallback: 0.9 },
|
|
4776
|
+
{ key: "tex_slat_guidance_interval_start", type: "number", fallback: 0.6 },
|
|
4777
|
+
{ key: "tex_slat_guidance_rescale", type: "number", fallback: 0 },
|
|
4778
|
+
{ key: "tex_slat_guidance_strength", type: "number", fallback: 1 },
|
|
4779
|
+
{ key: "tex_slat_rescale_t", type: "number", fallback: 3 },
|
|
4780
|
+
{ key: "tex_slat_sampling_steps", type: "integer", fallback: 12 },
|
|
4781
|
+
{ key: "texture_size", type: "enum(1024|2048|4096)", fallback: 2048 },
|
|
4782
|
+
{ key: "uv_unwrap_angle_threshold_deg", type: "number", fallback: 90 },
|
|
4783
|
+
{ key: "uv_unwrap_global_iterations", type: "integer", fallback: 1 },
|
|
4784
|
+
{ key: "uv_unwrap_refine_iterations", type: "integer", fallback: 0 },
|
|
4785
|
+
{ key: "uv_unwrap_smooth_strength", type: "number", fallback: 1 }
|
|
4786
|
+
],
|
|
4787
|
+
"zoe-depth": []
|
|
4788
|
+
};
|
|
4789
|
+
function falToolParameters(tool) {
|
|
4790
|
+
return FAL_TOOL_PARAMETERS[tool] ?? [];
|
|
4791
|
+
}
|
|
4792
|
+
|
|
4793
|
+
// src/model-output.generated.ts
|
|
4794
|
+
var MODEL_OUTPUT = {
|
|
4795
|
+
"banana": { container: "png", lossless: true, bitDepth: 8 },
|
|
4796
|
+
"banana2": { container: "png", lossless: true, bitDepth: 8 },
|
|
4797
|
+
"flux": { container: "jpeg", subsampling: "4:4:4", lossless: false, bitDepth: 8 },
|
|
4798
|
+
"flux-fast": { container: "jpeg", subsampling: "4:4:4", lossless: false, bitDepth: 8 },
|
|
4799
|
+
"flux2-dev": { container: "png", lossless: true, bitDepth: 8 },
|
|
4800
|
+
"flux2-flex": { container: "jpeg", subsampling: "4:4:4", lossless: false, bitDepth: 8 },
|
|
4801
|
+
"flux2-max": { container: "jpeg", subsampling: "4:4:4", lossless: false, bitDepth: 8 },
|
|
4802
|
+
"flux2-pro": { container: "jpeg", subsampling: "4:4:4", lossless: false, bitDepth: 8 },
|
|
4803
|
+
"flux2-turbo": { container: "png", lossless: true, bitDepth: 8 },
|
|
4804
|
+
"gemini": { container: "png", lossless: true, bitDepth: 8 },
|
|
4805
|
+
"gemini3": { container: "png", lossless: true, bitDepth: 8 },
|
|
4806
|
+
"gpt": { container: "png", lossless: true, bitDepth: 8 },
|
|
4807
|
+
"gpt2": { container: "png", lossless: true, bitDepth: 8 },
|
|
4808
|
+
"grok-image": { container: "png", lossless: true, bitDepth: 8 },
|
|
4809
|
+
"ideogram": { container: "png", lossless: true, bitDepth: 8 },
|
|
4810
|
+
"ideogram4": { container: "jpeg", subsampling: "4:4:4", lossless: false, bitDepth: 8 },
|
|
4811
|
+
"qwen": { container: "png", lossless: true, bitDepth: 8 },
|
|
4812
|
+
"qwen3": { container: "png", lossless: true, bitDepth: 8 },
|
|
4813
|
+
"recraft": { container: "webp (lossless)", lossless: true, hasAlpha: true, bitDepth: 8 },
|
|
4814
|
+
"recraft4": { container: "webp (lossless)", lossless: true, hasAlpha: true, bitDepth: 8 },
|
|
4815
|
+
"seedream4": { container: "jpeg", subsampling: "4:4:4", lossless: false, bitDepth: 8 },
|
|
4816
|
+
"seedream45": { container: "jpeg", subsampling: "4:2:0", lossless: false, bitDepth: 8 },
|
|
4817
|
+
"seedream5": { container: "jpeg", subsampling: "4:2:0", lossless: false, bitDepth: 8 },
|
|
4818
|
+
"seedream5-lite": { container: "jpeg", subsampling: "4:2:0", lossless: false, bitDepth: 8 }
|
|
4819
|
+
};
|
|
4820
|
+
|
|
4821
|
+
// src/model-output.ts
|
|
4822
|
+
function modelOutput(model) {
|
|
4823
|
+
return MODEL_OUTPUT[model];
|
|
4824
|
+
}
|
|
4825
|
+
function losslessAvailability(model) {
|
|
4826
|
+
const shape = MODEL_OUTPUT[model];
|
|
4827
|
+
if (shape === void 0) {
|
|
4828
|
+
return "unknown";
|
|
4829
|
+
}
|
|
4830
|
+
if (shape.lossless) {
|
|
4831
|
+
return "default";
|
|
4832
|
+
}
|
|
4833
|
+
return MODELS[model]?.supportsOutputFormat === true ? "on-request" : "unavailable";
|
|
4834
|
+
}
|
|
4835
|
+
function describeModelOutput(model) {
|
|
4836
|
+
const shape = MODEL_OUTPUT[model];
|
|
4837
|
+
if (shape === void 0) {
|
|
4838
|
+
return "not measured";
|
|
4839
|
+
}
|
|
4840
|
+
const base = shape.subsampling === void 0 || shape.subsampling === "" ? shape.container : `${shape.container} ${shape.subsampling}`;
|
|
4841
|
+
const suffix = {
|
|
4842
|
+
default: "lossless",
|
|
4843
|
+
"on-request": "lossless on request",
|
|
4844
|
+
unavailable: "no lossless route",
|
|
4845
|
+
unknown: "lossless route not measured"
|
|
4846
|
+
};
|
|
4847
|
+
return `${base}, ${suffix[losslessAvailability(model)]}`;
|
|
4848
|
+
}
|
|
4215
4849
|
export {
|
|
4216
4850
|
ASPECT_RATIOS,
|
|
4217
4851
|
CREATIVE_FIELDS,
|
|
@@ -4221,6 +4855,7 @@ export {
|
|
|
4221
4855
|
FAL_TOOLS,
|
|
4222
4856
|
FAL_TOOLS_CHECKED_AT,
|
|
4223
4857
|
FAL_TOOL_IDS,
|
|
4858
|
+
FAL_TOOL_PARAMETERS,
|
|
4224
4859
|
FORMAT_PRESETS,
|
|
4225
4860
|
FalClient,
|
|
4226
4861
|
GENERATION_MODELS,
|
|
@@ -4228,6 +4863,7 @@ export {
|
|
|
4228
4863
|
IMAGE_EDITING_TOP_20,
|
|
4229
4864
|
IMAGE_TEXT_TO_IMAGE_TOP_20,
|
|
4230
4865
|
MODELS,
|
|
4866
|
+
MODEL_OUTPUT,
|
|
4231
4867
|
MotifError,
|
|
4232
4868
|
RECRAFT_STYLES,
|
|
4233
4869
|
RESOLUTIONS,
|
|
@@ -4239,14 +4875,22 @@ export {
|
|
|
4239
4875
|
aspectToGptSize,
|
|
4240
4876
|
buildFalToolRequest,
|
|
4241
4877
|
buildGenerateBody,
|
|
4878
|
+
describeModelOutput,
|
|
4242
4879
|
enrichPrompt,
|
|
4243
4880
|
err3 as err,
|
|
4244
4881
|
estimateCost,
|
|
4245
4882
|
estimateVideoCost,
|
|
4883
|
+
falToolParameters,
|
|
4884
|
+
formatCost,
|
|
4246
4885
|
getFalKeyFromEnv,
|
|
4247
4886
|
isFalToolId,
|
|
4887
|
+
losslessAvailability,
|
|
4888
|
+
measuredToolCost,
|
|
4889
|
+
modelOutput,
|
|
4248
4890
|
motifEnvSchema,
|
|
4249
4891
|
ok3 as ok,
|
|
4250
4892
|
parseMotifEnv,
|
|
4251
|
-
|
|
4893
|
+
projectedToolCost,
|
|
4894
|
+
sanitizePrompt,
|
|
4895
|
+
sumCosts
|
|
4252
4896
|
};
|