@decartai/sdk 0.1.9 → 0.1.11
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/process/types.d.ts +1 -1
- package/dist/shared/model.d.ts +6 -24
- package/dist/shared/model.js +7 -45
- package/package.json +1 -1
package/dist/process/types.d.ts
CHANGED
|
@@ -143,7 +143,7 @@ interface PromptInput {
|
|
|
143
143
|
* This allows different models to have field-specific documentation while maintaining type safety.
|
|
144
144
|
* Specific models are checked first, then falls back to category-based selection.
|
|
145
145
|
*/
|
|
146
|
-
type ModelSpecificInputs<T extends ModelDefinition> = T["name"] extends "lucy-pro-i2i" | "lucy-image-2" ? ImageEditingInputs : T["name"] extends "lucy-restyle-v2v" | "lucy-restyle-2" ? VideoRestyleInputs : T["name"] extends "lucy-2.1" | "lucy-
|
|
146
|
+
type ModelSpecificInputs<T extends ModelDefinition> = T["name"] extends "lucy-pro-i2i" | "lucy-image-2" ? ImageEditingInputs : T["name"] extends "lucy-restyle-v2v" | "lucy-restyle-2" ? VideoRestyleInputs : T["name"] extends "lucy-2.1" | "lucy-vton-2" | "lucy-vton-3" | "lucy-2.1-vton-2" | "lucy-vton-latest" ? VideoEdit2Inputs : T["name"] extends "lucy-pro-v2v" | "lucy-clip" ? VideoEditInputs : T["name"] extends ImageModels ? ImageGenerationInputs : T["name"] extends VideoModels ? VideoModelInputs : PromptInput;
|
|
147
147
|
interface ProcessInputs {
|
|
148
148
|
/**
|
|
149
149
|
* Random seed for reproducible results.
|
package/dist/shared/model.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { z } from "zod";
|
|
|
4
4
|
|
|
5
5
|
declare const canonicalModelSchema: z.ZodEnum<{
|
|
6
6
|
"lucy-2.1": "lucy-2.1";
|
|
7
|
-
"lucy-2.
|
|
7
|
+
"lucy-2.5": "lucy-2.5";
|
|
8
8
|
"lucy-vton-2": "lucy-vton-2";
|
|
9
9
|
"lucy-vton-3": "lucy-vton-3";
|
|
10
10
|
"lucy-restyle-2": "lucy-restyle-2";
|
|
@@ -18,7 +18,6 @@ type CanonicalModel = z.infer<typeof canonicalModelSchema>;
|
|
|
18
18
|
*/
|
|
19
19
|
declare const modelAliases: {
|
|
20
20
|
readonly mirage_v2: "lucy-restyle-2";
|
|
21
|
-
readonly "lucy-vton": "lucy-2.1-vton";
|
|
22
21
|
readonly "lucy-2.1-vton-2": "lucy-vton-2";
|
|
23
22
|
readonly "lucy-pro-v2v": "lucy-clip";
|
|
24
23
|
readonly "lucy-restyle-v2v": "lucy-restyle-2";
|
|
@@ -26,10 +25,10 @@ declare const modelAliases: {
|
|
|
26
25
|
};
|
|
27
26
|
/** @internal Test-only helper to reset deprecation warning tracking */
|
|
28
27
|
|
|
29
|
-
declare const realtimeModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.
|
|
30
|
-
declare const videoModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-
|
|
28
|
+
declare const realtimeModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.5">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-vton-3">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy-2.1-vton-2">]>;
|
|
29
|
+
declare const videoModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-vton-3">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"lucy-clip-latest">, z.ZodLiteral<"lucy-2.1-vton-2">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-restyle-v2v">]>;
|
|
31
30
|
declare const imageModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-image-2">, z.ZodLiteral<"lucy-image-latest">, z.ZodLiteral<"lucy-pro-i2i">]>;
|
|
32
|
-
declare const modelSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.
|
|
31
|
+
declare const modelSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.5">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-vton-3">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy-2.1-vton-2">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-vton-3">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"lucy-clip-latest">, z.ZodLiteral<"lucy-2.1-vton-2">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-restyle-v2v">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-image-2">, z.ZodLiteral<"lucy-image-latest">, z.ZodLiteral<"lucy-pro-i2i">]>]>;
|
|
33
32
|
type Model = z.infer<typeof modelSchema>;
|
|
34
33
|
type RealTimeModels = z.infer<typeof realtimeModels>;
|
|
35
34
|
type VideoModels = z.infer<typeof videoModels>;
|
|
@@ -119,7 +118,7 @@ declare const modelInputSchemas: {
|
|
|
119
118
|
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
120
119
|
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
121
120
|
}, z.core.$strip>;
|
|
122
|
-
readonly "lucy-2.
|
|
121
|
+
readonly "lucy-2.5": z.ZodObject<{
|
|
123
122
|
prompt: z.ZodString;
|
|
124
123
|
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<File, File>, z.ZodCustom<Blob, Blob>, z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>, z.ZodCustom<URL, URL>, z.ZodURL, z.ZodObject<{
|
|
125
124
|
uri: z.ZodString;
|
|
@@ -250,22 +249,6 @@ declare const modelInputSchemas: {
|
|
|
250
249
|
}>>>;
|
|
251
250
|
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
252
251
|
}, z.core.$strip>;
|
|
253
|
-
readonly "lucy-vton": z.ZodObject<{
|
|
254
|
-
prompt: z.ZodString;
|
|
255
|
-
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<File, File>, z.ZodCustom<Blob, Blob>, z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>, z.ZodCustom<URL, URL>, z.ZodURL, z.ZodObject<{
|
|
256
|
-
uri: z.ZodString;
|
|
257
|
-
type: z.ZodString;
|
|
258
|
-
name: z.ZodString;
|
|
259
|
-
}, z.core.$strip>]>>;
|
|
260
|
-
data: z.ZodUnion<readonly [z.ZodCustom<File, File>, z.ZodCustom<Blob, Blob>, z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>, z.ZodCustom<URL, URL>, z.ZodURL, z.ZodObject<{
|
|
261
|
-
uri: z.ZodString;
|
|
262
|
-
type: z.ZodString;
|
|
263
|
-
name: z.ZodString;
|
|
264
|
-
}, z.core.$strip>]>;
|
|
265
|
-
seed: z.ZodOptional<z.ZodNumber>;
|
|
266
|
-
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
267
|
-
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
268
|
-
}, z.core.$strip>;
|
|
269
252
|
readonly "lucy-2.1-vton-2": z.ZodObject<{
|
|
270
253
|
prompt: z.ZodString;
|
|
271
254
|
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<File, File>, z.ZodCustom<Blob, Blob>, z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>, z.ZodCustom<URL, URL>, z.ZodURL, z.ZodObject<{
|
|
@@ -395,7 +378,7 @@ declare const models: {
|
|
|
395
378
|
*
|
|
396
379
|
* Available options:
|
|
397
380
|
* - `"lucy-2.1"` - Lucy 2.1 realtime video editing
|
|
398
|
-
* - `"lucy-2.
|
|
381
|
+
* - `"lucy-2.5"` - Lucy 2.5 realtime video editing
|
|
399
382
|
* - `"lucy-vton-2"` - Lucy virtual try-on 2
|
|
400
383
|
* - `"lucy-vton-3"` - Lucy virtual try-on 3
|
|
401
384
|
* - `"lucy-restyle-2"` - Realtime video restyling
|
|
@@ -407,7 +390,6 @@ declare const models: {
|
|
|
407
390
|
* Available options:
|
|
408
391
|
* - `"lucy-clip"` - Video-to-video editing
|
|
409
392
|
* - `"lucy-2.1"` - Long-form video editing (Lucy 2.1)
|
|
410
|
-
* - `"lucy-2.1-vton"` - Virtual try-on video editing
|
|
411
393
|
* - `"lucy-vton-2"` - Virtual try-on 2 video editing
|
|
412
394
|
* - `"lucy-vton-3"` - Virtual try-on 3 video editing
|
|
413
395
|
* - `"lucy-restyle-2"` - Video restyling
|
package/dist/shared/model.js
CHANGED
|
@@ -3,7 +3,7 @@ import { z } from "zod";
|
|
|
3
3
|
//#region src/shared/model.ts
|
|
4
4
|
const CANONICAL_MODEL_NAMES = [
|
|
5
5
|
"lucy-2.1",
|
|
6
|
-
"lucy-2.
|
|
6
|
+
"lucy-2.5",
|
|
7
7
|
"lucy-vton-2",
|
|
8
8
|
"lucy-vton-3",
|
|
9
9
|
"lucy-restyle-2",
|
|
@@ -12,7 +12,7 @@ const CANONICAL_MODEL_NAMES = [
|
|
|
12
12
|
];
|
|
13
13
|
const CANONICAL_REALTIME_MODEL_NAMES = [
|
|
14
14
|
"lucy-2.1",
|
|
15
|
-
"lucy-2.
|
|
15
|
+
"lucy-2.5",
|
|
16
16
|
"lucy-vton-2",
|
|
17
17
|
"lucy-vton-3",
|
|
18
18
|
"lucy-restyle-2"
|
|
@@ -20,7 +20,6 @@ const CANONICAL_REALTIME_MODEL_NAMES = [
|
|
|
20
20
|
const CANONICAL_VIDEO_MODEL_NAMES = [
|
|
21
21
|
"lucy-clip",
|
|
22
22
|
"lucy-2.1",
|
|
23
|
-
"lucy-2.1-vton",
|
|
24
23
|
"lucy-vton-2",
|
|
25
24
|
"lucy-vton-3",
|
|
26
25
|
"lucy-restyle-2"
|
|
@@ -36,7 +35,6 @@ const canonicalModelSchema = z.enum(CANONICAL_MODEL_NAMES);
|
|
|
36
35
|
*/
|
|
37
36
|
const modelAliases = {
|
|
38
37
|
mirage_v2: "lucy-restyle-2",
|
|
39
|
-
"lucy-vton": "lucy-2.1-vton",
|
|
40
38
|
"lucy-2.1-vton-2": "lucy-vton-2",
|
|
41
39
|
"lucy-pro-v2v": "lucy-clip",
|
|
42
40
|
"lucy-restyle-v2v": "lucy-restyle-2",
|
|
@@ -52,7 +50,7 @@ function warnDeprecated(model) {
|
|
|
52
50
|
}
|
|
53
51
|
const realtimeModels = z.union([
|
|
54
52
|
z.literal("lucy-2.1"),
|
|
55
|
-
z.literal("lucy-2.
|
|
53
|
+
z.literal("lucy-2.5"),
|
|
56
54
|
z.literal("lucy-vton-2"),
|
|
57
55
|
z.literal("lucy-vton-3"),
|
|
58
56
|
z.literal("lucy-restyle-2"),
|
|
@@ -60,13 +58,11 @@ const realtimeModels = z.union([
|
|
|
60
58
|
z.literal("lucy-vton-latest"),
|
|
61
59
|
z.literal("lucy-restyle-latest"),
|
|
62
60
|
z.literal("mirage_v2"),
|
|
63
|
-
z.literal("lucy-vton"),
|
|
64
61
|
z.literal("lucy-2.1-vton-2")
|
|
65
62
|
]);
|
|
66
63
|
const videoModels = z.union([
|
|
67
64
|
z.literal("lucy-clip"),
|
|
68
65
|
z.literal("lucy-2.1"),
|
|
69
|
-
z.literal("lucy-2.1-vton"),
|
|
70
66
|
z.literal("lucy-vton-2"),
|
|
71
67
|
z.literal("lucy-vton-3"),
|
|
72
68
|
z.literal("lucy-restyle-2"),
|
|
@@ -74,7 +70,6 @@ const videoModels = z.union([
|
|
|
74
70
|
z.literal("lucy-vton-latest"),
|
|
75
71
|
z.literal("lucy-restyle-latest"),
|
|
76
72
|
z.literal("lucy-clip-latest"),
|
|
77
|
-
z.literal("lucy-vton"),
|
|
78
73
|
z.literal("lucy-2.1-vton-2"),
|
|
79
74
|
z.literal("lucy-pro-v2v"),
|
|
80
75
|
z.literal("lucy-restyle-v2v")
|
|
@@ -186,7 +181,7 @@ const modelInputSchemas = {
|
|
|
186
181
|
"lucy-image-2": imageEditSchema,
|
|
187
182
|
"lucy-restyle-2": restyleSchema,
|
|
188
183
|
"lucy-2.1": videoEdit2Schema,
|
|
189
|
-
"lucy-2.
|
|
184
|
+
"lucy-2.5": videoEdit2Schema,
|
|
190
185
|
"lucy-vton-2": videoEdit2Schema,
|
|
191
186
|
"lucy-vton-3": videoEdit2Schema,
|
|
192
187
|
"lucy-latest": videoEdit2Schema,
|
|
@@ -194,7 +189,6 @@ const modelInputSchemas = {
|
|
|
194
189
|
"lucy-restyle-latest": restyleSchema,
|
|
195
190
|
"lucy-clip-latest": videoEditSchema,
|
|
196
191
|
"lucy-image-latest": imageEditSchema,
|
|
197
|
-
"lucy-vton": videoEdit2Schema,
|
|
198
192
|
"lucy-2.1-vton-2": videoEdit2Schema,
|
|
199
193
|
"lucy-pro-v2v": videoEditSchema,
|
|
200
194
|
"lucy-pro-i2i": imageEditSchema,
|
|
@@ -231,13 +225,10 @@ const _models = {
|
|
|
231
225
|
height: 624,
|
|
232
226
|
inputSchema: z.object({})
|
|
233
227
|
},
|
|
234
|
-
"lucy-2.
|
|
228
|
+
"lucy-2.5": {
|
|
235
229
|
urlPath: "/v1/stream",
|
|
236
|
-
name: "lucy-2.
|
|
237
|
-
fps:
|
|
238
|
-
ideal: 30,
|
|
239
|
-
max: 30
|
|
240
|
-
},
|
|
230
|
+
name: "lucy-2.5",
|
|
231
|
+
fps: 20,
|
|
241
232
|
width: 1088,
|
|
242
233
|
height: 624,
|
|
243
234
|
inputSchema: z.object({})
|
|
@@ -319,17 +310,6 @@ const _models = {
|
|
|
319
310
|
height: 704,
|
|
320
311
|
inputSchema: z.object({})
|
|
321
312
|
},
|
|
322
|
-
"lucy-vton": {
|
|
323
|
-
urlPath: "/v1/stream",
|
|
324
|
-
name: "lucy-vton",
|
|
325
|
-
fps: {
|
|
326
|
-
ideal: 30,
|
|
327
|
-
max: 30
|
|
328
|
-
},
|
|
329
|
-
width: 1088,
|
|
330
|
-
height: 624,
|
|
331
|
-
inputSchema: z.object({})
|
|
332
|
-
},
|
|
333
313
|
"lucy-2.1-vton-2": {
|
|
334
314
|
urlPath: "/v1/stream",
|
|
335
315
|
name: "lucy-2.1-vton-2",
|
|
@@ -390,15 +370,6 @@ const _models = {
|
|
|
390
370
|
height: 624,
|
|
391
371
|
inputSchema: modelInputSchemas["lucy-2.1"]
|
|
392
372
|
},
|
|
393
|
-
"lucy-2.1-vton": {
|
|
394
|
-
urlPath: "/v1/generate/lucy-2.1-vton",
|
|
395
|
-
queueUrlPath: "/v1/jobs/lucy-2.1-vton",
|
|
396
|
-
name: "lucy-2.1-vton",
|
|
397
|
-
fps: 20,
|
|
398
|
-
width: 1088,
|
|
399
|
-
height: 624,
|
|
400
|
-
inputSchema: modelInputSchemas["lucy-2.1-vton"]
|
|
401
|
-
},
|
|
402
373
|
"lucy-vton-2": {
|
|
403
374
|
urlPath: "/v1/generate/lucy-vton-2",
|
|
404
375
|
queueUrlPath: "/v1/jobs/lucy-vton-2",
|
|
@@ -462,15 +433,6 @@ const _models = {
|
|
|
462
433
|
height: 704,
|
|
463
434
|
inputSchema: modelInputSchemas["lucy-clip-latest"]
|
|
464
435
|
},
|
|
465
|
-
"lucy-vton": {
|
|
466
|
-
urlPath: "/v1/generate/lucy-vton",
|
|
467
|
-
queueUrlPath: "/v1/jobs/lucy-vton",
|
|
468
|
-
name: "lucy-vton",
|
|
469
|
-
fps: 20,
|
|
470
|
-
width: 1088,
|
|
471
|
-
height: 624,
|
|
472
|
-
inputSchema: modelInputSchemas["lucy-vton"]
|
|
473
|
-
},
|
|
474
436
|
"lucy-2.1-vton-2": {
|
|
475
437
|
urlPath: "/v1/generate/lucy-2.1-vton-2",
|
|
476
438
|
queueUrlPath: "/v1/jobs/lucy-2.1-vton-2",
|