@decartai/sdk 0.0.60 → 0.0.61
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 +2 -2
- package/dist/shared/model.d.ts +3 -37
- package/dist/shared/model.js +2 -44
- package/package.json +1 -1
package/dist/process/types.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ interface VideoEditInputs {
|
|
|
86
86
|
reference_image?: FileInput;
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
|
-
* Model-specific input documentation for
|
|
89
|
+
* Model-specific input documentation for Lucy 2.1 video editing models.
|
|
90
90
|
* Requires prompt (can be empty string). Optional reference_image can also be provided.
|
|
91
91
|
*/
|
|
92
92
|
interface VideoEdit2Inputs {
|
|
@@ -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
|
|
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-2.1-vton" ? 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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/shared/model.d.ts
|
|
4
|
-
declare const realtimeModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy">, z.ZodLiteral<"lucy-2
|
|
5
|
-
declare const videoModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2
|
|
4
|
+
declare const realtimeModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-restyle">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"live-avatar">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"live_avatar">]>;
|
|
5
|
+
declare const videoModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-motion">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"lucy-clip-latest">, z.ZodLiteral<"lucy-motion-latest">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-restyle-v2v">]>;
|
|
6
6
|
declare const imageModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-image-2">, z.ZodLiteral<"lucy-image-latest">, z.ZodLiteral<"lucy-pro-i2i">]>;
|
|
7
|
-
declare const modelSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"lucy">, z.ZodLiteral<"lucy-2
|
|
7
|
+
declare const modelSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"lucy">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-restyle">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"live-avatar">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"live_avatar">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.1-vton">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-motion">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"lucy-clip-latest">, z.ZodLiteral<"lucy-motion-latest">, 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">]>]>;
|
|
8
8
|
type Model = z.infer<typeof modelSchema>;
|
|
9
9
|
type RealTimeModels = z.infer<typeof realtimeModels>;
|
|
10
10
|
type VideoModels = z.infer<typeof videoModels>;
|
|
@@ -64,22 +64,6 @@ declare const modelInputSchemas: {
|
|
|
64
64
|
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
65
65
|
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
66
66
|
}, z.core.$strip>;
|
|
67
|
-
readonly "lucy-2": z.ZodObject<{
|
|
68
|
-
prompt: z.ZodString;
|
|
69
|
-
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<{
|
|
70
|
-
uri: z.ZodString;
|
|
71
|
-
type: z.ZodString;
|
|
72
|
-
name: z.ZodString;
|
|
73
|
-
}, z.core.$strip>]>>;
|
|
74
|
-
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<{
|
|
75
|
-
uri: z.ZodString;
|
|
76
|
-
type: z.ZodString;
|
|
77
|
-
name: z.ZodString;
|
|
78
|
-
}, z.core.$strip>]>;
|
|
79
|
-
seed: z.ZodOptional<z.ZodNumber>;
|
|
80
|
-
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
81
|
-
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
82
|
-
}, z.core.$strip>;
|
|
83
67
|
readonly "lucy-2.1": z.ZodObject<{
|
|
84
68
|
prompt: z.ZodString;
|
|
85
69
|
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<{
|
|
@@ -274,22 +258,6 @@ declare const modelInputSchemas: {
|
|
|
274
258
|
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
275
259
|
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
276
260
|
}, z.core.$strip>;
|
|
277
|
-
readonly "lucy-2-v2v": z.ZodObject<{
|
|
278
|
-
prompt: z.ZodString;
|
|
279
|
-
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<{
|
|
280
|
-
uri: z.ZodString;
|
|
281
|
-
type: z.ZodString;
|
|
282
|
-
name: z.ZodString;
|
|
283
|
-
}, z.core.$strip>]>>;
|
|
284
|
-
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<{
|
|
285
|
-
uri: z.ZodString;
|
|
286
|
-
type: z.ZodString;
|
|
287
|
-
name: z.ZodString;
|
|
288
|
-
}, z.core.$strip>]>;
|
|
289
|
-
seed: z.ZodOptional<z.ZodNumber>;
|
|
290
|
-
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
291
|
-
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
292
|
-
}, z.core.$strip>;
|
|
293
261
|
};
|
|
294
262
|
type ModelInputSchemas = typeof modelInputSchemas;
|
|
295
263
|
type ModelDefinition<T extends Model = Model> = {
|
|
@@ -330,7 +298,6 @@ declare const models: {
|
|
|
330
298
|
* Get a realtime streaming model identifier.
|
|
331
299
|
*
|
|
332
300
|
* Available options:
|
|
333
|
-
* - `"lucy-2"` - Lucy 2 realtime video editing (720p)
|
|
334
301
|
* - `"lucy-2.1"` - Lucy 2.1 realtime video editing
|
|
335
302
|
* - `"lucy-2.1-vton"` - Lucy 2.1 virtual try-on
|
|
336
303
|
* - `"lucy-restyle-2"` - Realtime video restyling
|
|
@@ -344,7 +311,6 @@ declare const models: {
|
|
|
344
311
|
*
|
|
345
312
|
* Available options:
|
|
346
313
|
* - `"lucy-clip"` - Video-to-video editing
|
|
347
|
-
* - `"lucy-2"` - Long-form video editing (720p)
|
|
348
314
|
* - `"lucy-2.1"` - Long-form video editing (Lucy 2.1)
|
|
349
315
|
* - `"lucy-2.1-vton"` - Virtual try-on video editing
|
|
350
316
|
* - `"lucy-restyle-2"` - Video restyling
|
package/dist/shared/model.js
CHANGED
|
@@ -10,11 +10,9 @@ const MODEL_ALIASES = {
|
|
|
10
10
|
mirage: "lucy-restyle",
|
|
11
11
|
mirage_v2: "lucy-restyle-2",
|
|
12
12
|
lucy_v2v_720p_rt: "lucy",
|
|
13
|
-
lucy_2_rt: "lucy-2",
|
|
14
13
|
live_avatar: "live-avatar",
|
|
15
14
|
"lucy-pro-v2v": "lucy-clip",
|
|
16
15
|
"lucy-restyle-v2v": "lucy-restyle-2",
|
|
17
|
-
"lucy-2-v2v": "lucy-2",
|
|
18
16
|
"lucy-pro-i2i": "lucy-image-2"
|
|
19
17
|
};
|
|
20
18
|
const _warnedAliases = /* @__PURE__ */ new Set();
|
|
@@ -27,7 +25,6 @@ function warnDeprecated(model) {
|
|
|
27
25
|
}
|
|
28
26
|
const realtimeModels = z.union([
|
|
29
27
|
z.literal("lucy"),
|
|
30
|
-
z.literal("lucy-2"),
|
|
31
28
|
z.literal("lucy-2.1"),
|
|
32
29
|
z.literal("lucy-2.1-vton"),
|
|
33
30
|
z.literal("lucy-restyle"),
|
|
@@ -39,12 +36,10 @@ const realtimeModels = z.union([
|
|
|
39
36
|
z.literal("mirage"),
|
|
40
37
|
z.literal("mirage_v2"),
|
|
41
38
|
z.literal("lucy_v2v_720p_rt"),
|
|
42
|
-
z.literal("lucy_2_rt"),
|
|
43
39
|
z.literal("live_avatar")
|
|
44
40
|
]);
|
|
45
41
|
const videoModels = z.union([
|
|
46
42
|
z.literal("lucy-clip"),
|
|
47
|
-
z.literal("lucy-2"),
|
|
48
43
|
z.literal("lucy-2.1"),
|
|
49
44
|
z.literal("lucy-2.1-vton"),
|
|
50
45
|
z.literal("lucy-restyle-2"),
|
|
@@ -55,8 +50,7 @@ const videoModels = z.union([
|
|
|
55
50
|
z.literal("lucy-clip-latest"),
|
|
56
51
|
z.literal("lucy-motion-latest"),
|
|
57
52
|
z.literal("lucy-pro-v2v"),
|
|
58
|
-
z.literal("lucy-restyle-v2v")
|
|
59
|
-
z.literal("lucy-2-v2v")
|
|
53
|
+
z.literal("lucy-restyle-v2v")
|
|
60
54
|
]);
|
|
61
55
|
const imageModels = z.union([
|
|
62
56
|
z.literal("lucy-image-2"),
|
|
@@ -140,7 +134,6 @@ const modelInputSchemas = {
|
|
|
140
134
|
"lucy-clip": videoEditSchema,
|
|
141
135
|
"lucy-image-2": imageEditSchema,
|
|
142
136
|
"lucy-restyle-2": restyleSchema,
|
|
143
|
-
"lucy-2": videoEdit2Schema,
|
|
144
137
|
"lucy-2.1": videoEdit2Schema,
|
|
145
138
|
"lucy-2.1-vton": videoEdit2Schema,
|
|
146
139
|
"lucy-motion": z.object({
|
|
@@ -170,8 +163,7 @@ const modelInputSchemas = {
|
|
|
170
163
|
"lucy-image-latest": imageEditSchema,
|
|
171
164
|
"lucy-pro-v2v": videoEditSchema,
|
|
172
165
|
"lucy-pro-i2i": imageEditSchema,
|
|
173
|
-
"lucy-restyle-v2v": restyleSchema
|
|
174
|
-
"lucy-2-v2v": videoEdit2Schema
|
|
166
|
+
"lucy-restyle-v2v": restyleSchema
|
|
175
167
|
};
|
|
176
168
|
const modelDefinitionSchema = z.object({
|
|
177
169
|
name: z.string(),
|
|
@@ -192,14 +184,6 @@ const _models = {
|
|
|
192
184
|
height: 704,
|
|
193
185
|
inputSchema: z.object({})
|
|
194
186
|
},
|
|
195
|
-
"lucy-2": {
|
|
196
|
-
urlPath: "/v1/stream",
|
|
197
|
-
name: "lucy-2",
|
|
198
|
-
fps: 20,
|
|
199
|
-
width: 1280,
|
|
200
|
-
height: 720,
|
|
201
|
-
inputSchema: z.object({})
|
|
202
|
-
},
|
|
203
187
|
"lucy-2.1": {
|
|
204
188
|
urlPath: "/v1/stream",
|
|
205
189
|
name: "lucy-2.1",
|
|
@@ -288,14 +272,6 @@ const _models = {
|
|
|
288
272
|
height: 704,
|
|
289
273
|
inputSchema: z.object({})
|
|
290
274
|
},
|
|
291
|
-
lucy_2_rt: {
|
|
292
|
-
urlPath: "/v1/stream",
|
|
293
|
-
name: "lucy_2_rt",
|
|
294
|
-
fps: 20,
|
|
295
|
-
width: 1280,
|
|
296
|
-
height: 720,
|
|
297
|
-
inputSchema: z.object({})
|
|
298
|
-
},
|
|
299
275
|
live_avatar: {
|
|
300
276
|
urlPath: "/v1/stream",
|
|
301
277
|
name: "live_avatar",
|
|
@@ -344,15 +320,6 @@ const _models = {
|
|
|
344
320
|
height: 704,
|
|
345
321
|
inputSchema: modelInputSchemas["lucy-clip"]
|
|
346
322
|
},
|
|
347
|
-
"lucy-2": {
|
|
348
|
-
urlPath: "/v1/generate/lucy-2",
|
|
349
|
-
queueUrlPath: "/v1/jobs/lucy-2",
|
|
350
|
-
name: "lucy-2",
|
|
351
|
-
fps: 20,
|
|
352
|
-
width: 1280,
|
|
353
|
-
height: 720,
|
|
354
|
-
inputSchema: modelInputSchemas["lucy-2"]
|
|
355
|
-
},
|
|
356
323
|
"lucy-2.1": {
|
|
357
324
|
urlPath: "/v1/generate/lucy-2.1",
|
|
358
325
|
queueUrlPath: "/v1/jobs/lucy-2.1",
|
|
@@ -451,15 +418,6 @@ const _models = {
|
|
|
451
418
|
width: 1280,
|
|
452
419
|
height: 704,
|
|
453
420
|
inputSchema: modelInputSchemas["lucy-restyle-v2v"]
|
|
454
|
-
},
|
|
455
|
-
"lucy-2-v2v": {
|
|
456
|
-
urlPath: "/v1/generate/lucy-2-v2v",
|
|
457
|
-
queueUrlPath: "/v1/jobs/lucy-2-v2v",
|
|
458
|
-
name: "lucy-2-v2v",
|
|
459
|
-
fps: 20,
|
|
460
|
-
width: 1280,
|
|
461
|
-
height: 720,
|
|
462
|
-
inputSchema: modelInputSchemas["lucy-2-v2v"]
|
|
463
421
|
}
|
|
464
422
|
}
|
|
465
423
|
};
|