@decartai/sdk 0.1.18 → 0.1.19
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/package.js +1 -1
- package/dist/process/types.d.ts +1 -1
- package/dist/shared/model.d.ts +22 -3
- package/dist/shared/model.js +32 -4
- package/package.json +1 -1
package/dist/package.js
CHANGED
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-2.5" | "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;
|
|
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.5" | "lucy-vton-2" | "lucy-vton-3" | "lucy-vton-3.5" | "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
|
@@ -7,6 +7,7 @@ declare const canonicalModelSchema: z.ZodEnum<{
|
|
|
7
7
|
"lucy-2.5": "lucy-2.5";
|
|
8
8
|
"lucy-vton-2": "lucy-vton-2";
|
|
9
9
|
"lucy-vton-3": "lucy-vton-3";
|
|
10
|
+
"lucy-vton-3.5": "lucy-vton-3.5";
|
|
10
11
|
"lucy-restyle-2": "lucy-restyle-2";
|
|
11
12
|
"lucy-clip": "lucy-clip";
|
|
12
13
|
"lucy-image-2": "lucy-image-2";
|
|
@@ -24,10 +25,10 @@ declare const modelAliases: {
|
|
|
24
25
|
};
|
|
25
26
|
/** @internal Test-only helper to reset deprecation warning tracking */
|
|
26
27
|
|
|
27
|
-
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<"lucy-2.1-vton-2">]>;
|
|
28
|
-
declare const videoModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, 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<"lucy-clip-latest">, z.ZodLiteral<"lucy-2.1-vton-2">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-restyle-v2v">]>;
|
|
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-vton-3.5">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, 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-2.5">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-vton-3">, z.ZodLiteral<"lucy-vton-3.5">, 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">]>;
|
|
29
30
|
declare const imageModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-image-2">, z.ZodLiteral<"lucy-image-latest">, z.ZodLiteral<"lucy-pro-i2i">]>;
|
|
30
|
-
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<"lucy-2.1-vton-2">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, 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<"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">]>]>;
|
|
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-vton-3.5">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-latest">, z.ZodLiteral<"lucy-vton-latest">, z.ZodLiteral<"lucy-restyle-latest">, z.ZodLiteral<"lucy-2.1-vton-2">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-2.5">, z.ZodLiteral<"lucy-vton-2">, z.ZodLiteral<"lucy-vton-3">, z.ZodLiteral<"lucy-vton-3.5">, 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">]>]>;
|
|
31
32
|
type Model = z.infer<typeof modelSchema>;
|
|
32
33
|
type RealTimeModels = z.infer<typeof realtimeModels>;
|
|
33
34
|
type VideoModels = z.infer<typeof videoModels>;
|
|
@@ -165,6 +166,22 @@ declare const modelInputSchemas: {
|
|
|
165
166
|
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
166
167
|
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
167
168
|
}, z.core.$strip>;
|
|
169
|
+
readonly "lucy-vton-3.5": z.ZodObject<{
|
|
170
|
+
prompt: z.ZodString;
|
|
171
|
+
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
172
|
+
uri: z.ZodString;
|
|
173
|
+
type: z.ZodString;
|
|
174
|
+
name: z.ZodString;
|
|
175
|
+
}, z.core.$strip>]>>;
|
|
176
|
+
data: z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
177
|
+
uri: z.ZodString;
|
|
178
|
+
type: z.ZodString;
|
|
179
|
+
name: z.ZodString;
|
|
180
|
+
}, z.core.$strip>]>;
|
|
181
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
182
|
+
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
183
|
+
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
184
|
+
}, z.core.$strip>;
|
|
168
185
|
readonly "lucy-latest": z.ZodObject<{
|
|
169
186
|
prompt: z.ZodString;
|
|
170
187
|
reference_image: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<File, unknown, z.core.$ZodTypeInternals<File, unknown>>, z.ZodType<Blob, unknown, z.core.$ZodTypeInternals<Blob, unknown>>, z.ZodType<ReadableStream<any>, unknown, z.core.$ZodTypeInternals<ReadableStream<any>, unknown>>, z.ZodType<URL, unknown, z.core.$ZodTypeInternals<URL, unknown>>, z.ZodURL, z.ZodObject<{
|
|
@@ -381,6 +398,7 @@ declare const models: {
|
|
|
381
398
|
* - `"lucy-2.5"` - Lucy 2.5 realtime video editing
|
|
382
399
|
* - `"lucy-vton-2"` - Lucy virtual try-on 2
|
|
383
400
|
* - `"lucy-vton-3"` - Lucy virtual try-on 3
|
|
401
|
+
* - `"lucy-vton-3.5"` - Lucy virtual try-on 3.5 (latest)
|
|
384
402
|
* - `"lucy-restyle-2"` - Realtime video restyling
|
|
385
403
|
*/
|
|
386
404
|
realtime: <T extends RealTimeModels>(model: T) => ModelDefinition<T>;
|
|
@@ -393,6 +411,7 @@ declare const models: {
|
|
|
393
411
|
* - `"lucy-2.5"` - Long-form video editing (Lucy 2.5)
|
|
394
412
|
* - `"lucy-vton-2"` - Virtual try-on 2 video editing
|
|
395
413
|
* - `"lucy-vton-3"` - Virtual try-on 3 video editing
|
|
414
|
+
* - `"lucy-vton-3.5"` - Virtual try-on 3.5 video editing (latest)
|
|
396
415
|
* - `"lucy-restyle-2"` - Video restyling
|
|
397
416
|
*/
|
|
398
417
|
video: <T extends VideoModels>(model: T) => ModelDefinition<T> & {
|
package/dist/shared/model.js
CHANGED
|
@@ -7,6 +7,7 @@ const CANONICAL_MODEL_NAMES = [
|
|
|
7
7
|
"lucy-2.5",
|
|
8
8
|
"lucy-vton-2",
|
|
9
9
|
"lucy-vton-3",
|
|
10
|
+
"lucy-vton-3.5",
|
|
10
11
|
"lucy-restyle-2",
|
|
11
12
|
"lucy-clip",
|
|
12
13
|
"lucy-image-2"
|
|
@@ -16,6 +17,7 @@ const CANONICAL_REALTIME_MODEL_NAMES = [
|
|
|
16
17
|
"lucy-2.5",
|
|
17
18
|
"lucy-vton-2",
|
|
18
19
|
"lucy-vton-3",
|
|
20
|
+
"lucy-vton-3.5",
|
|
19
21
|
"lucy-restyle-2"
|
|
20
22
|
];
|
|
21
23
|
const CANONICAL_VIDEO_MODEL_NAMES = [
|
|
@@ -24,6 +26,7 @@ const CANONICAL_VIDEO_MODEL_NAMES = [
|
|
|
24
26
|
"lucy-2.5",
|
|
25
27
|
"lucy-vton-2",
|
|
26
28
|
"lucy-vton-3",
|
|
29
|
+
"lucy-vton-3.5",
|
|
27
30
|
"lucy-restyle-2"
|
|
28
31
|
];
|
|
29
32
|
const CANONICAL_IMAGE_MODEL_NAMES = ["lucy-image-2"];
|
|
@@ -54,6 +57,7 @@ const realtimeModels = z.union([
|
|
|
54
57
|
z.literal("lucy-2.5"),
|
|
55
58
|
z.literal("lucy-vton-2"),
|
|
56
59
|
z.literal("lucy-vton-3"),
|
|
60
|
+
z.literal("lucy-vton-3.5"),
|
|
57
61
|
z.literal("lucy-restyle-2"),
|
|
58
62
|
z.literal("lucy-latest"),
|
|
59
63
|
z.literal("lucy-vton-latest"),
|
|
@@ -66,6 +70,7 @@ const videoModels = z.union([
|
|
|
66
70
|
z.literal("lucy-2.5"),
|
|
67
71
|
z.literal("lucy-vton-2"),
|
|
68
72
|
z.literal("lucy-vton-3"),
|
|
73
|
+
z.literal("lucy-vton-3.5"),
|
|
69
74
|
z.literal("lucy-restyle-2"),
|
|
70
75
|
z.literal("lucy-latest"),
|
|
71
76
|
z.literal("lucy-vton-latest"),
|
|
@@ -185,6 +190,7 @@ const modelInputSchemas = {
|
|
|
185
190
|
"lucy-2.5": videoEdit2Schema,
|
|
186
191
|
"lucy-vton-2": videoEdit2Schema,
|
|
187
192
|
"lucy-vton-3": videoEdit2Schema,
|
|
193
|
+
"lucy-vton-3.5": videoEdit2Schema,
|
|
188
194
|
"lucy-latest": videoEdit2Schema,
|
|
189
195
|
"lucy-vton-latest": videoEdit2Schema,
|
|
190
196
|
"lucy-restyle-latest": restyleSchema,
|
|
@@ -259,6 +265,17 @@ const _models = {
|
|
|
259
265
|
height: 624,
|
|
260
266
|
inputSchema: z.object({})
|
|
261
267
|
},
|
|
268
|
+
"lucy-vton-3.5": {
|
|
269
|
+
urlPath: "/v1/stream",
|
|
270
|
+
name: "lucy-vton-3.5",
|
|
271
|
+
fps: {
|
|
272
|
+
ideal: 30,
|
|
273
|
+
max: 30
|
|
274
|
+
},
|
|
275
|
+
width: 1280,
|
|
276
|
+
height: 720,
|
|
277
|
+
inputSchema: z.object({})
|
|
278
|
+
},
|
|
262
279
|
"lucy-restyle-2": {
|
|
263
280
|
urlPath: "/v1/stream",
|
|
264
281
|
name: "lucy-restyle-2",
|
|
@@ -288,8 +305,8 @@ const _models = {
|
|
|
288
305
|
ideal: 30,
|
|
289
306
|
max: 30
|
|
290
307
|
},
|
|
291
|
-
width:
|
|
292
|
-
height:
|
|
308
|
+
width: 1280,
|
|
309
|
+
height: 720,
|
|
293
310
|
inputSchema: z.object({})
|
|
294
311
|
},
|
|
295
312
|
"lucy-restyle-latest": {
|
|
@@ -390,6 +407,15 @@ const _models = {
|
|
|
390
407
|
height: 624,
|
|
391
408
|
inputSchema: modelInputSchemas["lucy-vton-3"]
|
|
392
409
|
},
|
|
410
|
+
"lucy-vton-3.5": {
|
|
411
|
+
urlPath: "/v1/generate/lucy-vton-3.5",
|
|
412
|
+
queueUrlPath: "/v1/jobs/lucy-vton-3.5",
|
|
413
|
+
name: "lucy-vton-3.5",
|
|
414
|
+
fps: 20,
|
|
415
|
+
width: 1280,
|
|
416
|
+
height: 720,
|
|
417
|
+
inputSchema: modelInputSchemas["lucy-vton-3.5"]
|
|
418
|
+
},
|
|
393
419
|
"lucy-restyle-2": {
|
|
394
420
|
urlPath: "/v1/generate/lucy-restyle-2",
|
|
395
421
|
queueUrlPath: "/v1/jobs/lucy-restyle-2",
|
|
@@ -413,8 +439,8 @@ const _models = {
|
|
|
413
439
|
queueUrlPath: "/v1/jobs/lucy-vton-latest",
|
|
414
440
|
name: "lucy-vton-latest",
|
|
415
441
|
fps: 20,
|
|
416
|
-
width:
|
|
417
|
-
height:
|
|
442
|
+
width: 1280,
|
|
443
|
+
height: 720,
|
|
418
444
|
inputSchema: modelInputSchemas["lucy-vton-latest"]
|
|
419
445
|
},
|
|
420
446
|
"lucy-restyle-latest": {
|
|
@@ -496,6 +522,7 @@ const models = {
|
|
|
496
522
|
* - `"lucy-2.5"` - Lucy 2.5 realtime video editing
|
|
497
523
|
* - `"lucy-vton-2"` - Lucy virtual try-on 2
|
|
498
524
|
* - `"lucy-vton-3"` - Lucy virtual try-on 3
|
|
525
|
+
* - `"lucy-vton-3.5"` - Lucy virtual try-on 3.5 (latest)
|
|
499
526
|
* - `"lucy-restyle-2"` - Realtime video restyling
|
|
500
527
|
*/
|
|
501
528
|
realtime: (model) => {
|
|
@@ -513,6 +540,7 @@ const models = {
|
|
|
513
540
|
* - `"lucy-2.5"` - Long-form video editing (Lucy 2.5)
|
|
514
541
|
* - `"lucy-vton-2"` - Virtual try-on 2 video editing
|
|
515
542
|
* - `"lucy-vton-3"` - Virtual try-on 3 video editing
|
|
543
|
+
* - `"lucy-vton-3.5"` - Virtual try-on 3.5 video editing (latest)
|
|
516
544
|
* - `"lucy-restyle-2"` - Video restyling
|
|
517
545
|
*/
|
|
518
546
|
video: (model) => {
|