@decartai/sdk 0.1.15 → 0.1.16
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 +3 -22
- package/dist/shared/model.js +0 -28
- 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-
|
|
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;
|
|
147
147
|
interface ProcessInputs {
|
|
148
148
|
/**
|
|
149
149
|
* Random seed for reproducible results.
|
package/dist/shared/model.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ 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";
|
|
11
10
|
"lucy-restyle-2": "lucy-restyle-2";
|
|
12
11
|
"lucy-clip": "lucy-clip";
|
|
13
12
|
"lucy-image-2": "lucy-image-2";
|
|
@@ -25,10 +24,10 @@ declare const modelAliases: {
|
|
|
25
24
|
};
|
|
26
25
|
/** @internal Test-only helper to reset deprecation warning tracking */
|
|
27
26
|
|
|
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-
|
|
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-
|
|
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">]>;
|
|
30
29
|
declare const imageModels: 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-
|
|
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">]>]>;
|
|
32
31
|
type Model = z.infer<typeof modelSchema>;
|
|
33
32
|
type RealTimeModels = z.infer<typeof realtimeModels>;
|
|
34
33
|
type VideoModels = z.infer<typeof videoModels>;
|
|
@@ -166,22 +165,6 @@ declare const modelInputSchemas: {
|
|
|
166
165
|
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
167
166
|
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
168
167
|
}, 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>;
|
|
185
168
|
readonly "lucy-latest": z.ZodObject<{
|
|
186
169
|
prompt: z.ZodString;
|
|
187
170
|
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<{
|
|
@@ -398,7 +381,6 @@ declare const models: {
|
|
|
398
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
|
-
* - `"lucy-vton-3.5"` - Lucy virtual try-on 3.5 (latest)
|
|
402
384
|
* - `"lucy-restyle-2"` - Realtime video restyling
|
|
403
385
|
*/
|
|
404
386
|
realtime: <T extends RealTimeModels>(model: T) => ModelDefinition<T>;
|
|
@@ -411,7 +393,6 @@ declare const models: {
|
|
|
411
393
|
* - `"lucy-2.5"` - Long-form video editing (Lucy 2.5)
|
|
412
394
|
* - `"lucy-vton-2"` - Virtual try-on 2 video editing
|
|
413
395
|
* - `"lucy-vton-3"` - Virtual try-on 3 video editing
|
|
414
|
-
* - `"lucy-vton-3.5"` - Virtual try-on 3.5 video editing (latest)
|
|
415
396
|
* - `"lucy-restyle-2"` - Video restyling
|
|
416
397
|
*/
|
|
417
398
|
video: <T extends VideoModels>(model: T) => ModelDefinition<T> & {
|
package/dist/shared/model.js
CHANGED
|
@@ -7,7 +7,6 @@ const CANONICAL_MODEL_NAMES = [
|
|
|
7
7
|
"lucy-2.5",
|
|
8
8
|
"lucy-vton-2",
|
|
9
9
|
"lucy-vton-3",
|
|
10
|
-
"lucy-vton-3.5",
|
|
11
10
|
"lucy-restyle-2",
|
|
12
11
|
"lucy-clip",
|
|
13
12
|
"lucy-image-2"
|
|
@@ -17,7 +16,6 @@ const CANONICAL_REALTIME_MODEL_NAMES = [
|
|
|
17
16
|
"lucy-2.5",
|
|
18
17
|
"lucy-vton-2",
|
|
19
18
|
"lucy-vton-3",
|
|
20
|
-
"lucy-vton-3.5",
|
|
21
19
|
"lucy-restyle-2"
|
|
22
20
|
];
|
|
23
21
|
const CANONICAL_VIDEO_MODEL_NAMES = [
|
|
@@ -26,7 +24,6 @@ const CANONICAL_VIDEO_MODEL_NAMES = [
|
|
|
26
24
|
"lucy-2.5",
|
|
27
25
|
"lucy-vton-2",
|
|
28
26
|
"lucy-vton-3",
|
|
29
|
-
"lucy-vton-3.5",
|
|
30
27
|
"lucy-restyle-2"
|
|
31
28
|
];
|
|
32
29
|
const CANONICAL_IMAGE_MODEL_NAMES = ["lucy-image-2"];
|
|
@@ -57,7 +54,6 @@ const realtimeModels = z.union([
|
|
|
57
54
|
z.literal("lucy-2.5"),
|
|
58
55
|
z.literal("lucy-vton-2"),
|
|
59
56
|
z.literal("lucy-vton-3"),
|
|
60
|
-
z.literal("lucy-vton-3.5"),
|
|
61
57
|
z.literal("lucy-restyle-2"),
|
|
62
58
|
z.literal("lucy-latest"),
|
|
63
59
|
z.literal("lucy-vton-latest"),
|
|
@@ -70,7 +66,6 @@ const videoModels = z.union([
|
|
|
70
66
|
z.literal("lucy-2.5"),
|
|
71
67
|
z.literal("lucy-vton-2"),
|
|
72
68
|
z.literal("lucy-vton-3"),
|
|
73
|
-
z.literal("lucy-vton-3.5"),
|
|
74
69
|
z.literal("lucy-restyle-2"),
|
|
75
70
|
z.literal("lucy-latest"),
|
|
76
71
|
z.literal("lucy-vton-latest"),
|
|
@@ -190,7 +185,6 @@ const modelInputSchemas = {
|
|
|
190
185
|
"lucy-2.5": videoEdit2Schema,
|
|
191
186
|
"lucy-vton-2": videoEdit2Schema,
|
|
192
187
|
"lucy-vton-3": videoEdit2Schema,
|
|
193
|
-
"lucy-vton-3.5": videoEdit2Schema,
|
|
194
188
|
"lucy-latest": videoEdit2Schema,
|
|
195
189
|
"lucy-vton-latest": videoEdit2Schema,
|
|
196
190
|
"lucy-restyle-latest": restyleSchema,
|
|
@@ -265,17 +259,6 @@ const _models = {
|
|
|
265
259
|
height: 624,
|
|
266
260
|
inputSchema: z.object({})
|
|
267
261
|
},
|
|
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: 1088,
|
|
276
|
-
height: 624,
|
|
277
|
-
inputSchema: z.object({})
|
|
278
|
-
},
|
|
279
262
|
"lucy-restyle-2": {
|
|
280
263
|
urlPath: "/v1/stream",
|
|
281
264
|
name: "lucy-restyle-2",
|
|
@@ -407,15 +390,6 @@ const _models = {
|
|
|
407
390
|
height: 624,
|
|
408
391
|
inputSchema: modelInputSchemas["lucy-vton-3"]
|
|
409
392
|
},
|
|
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: 1088,
|
|
416
|
-
height: 624,
|
|
417
|
-
inputSchema: modelInputSchemas["lucy-vton-3.5"]
|
|
418
|
-
},
|
|
419
393
|
"lucy-restyle-2": {
|
|
420
394
|
urlPath: "/v1/generate/lucy-restyle-2",
|
|
421
395
|
queueUrlPath: "/v1/jobs/lucy-restyle-2",
|
|
@@ -522,7 +496,6 @@ const models = {
|
|
|
522
496
|
* - `"lucy-2.5"` - Lucy 2.5 realtime video editing
|
|
523
497
|
* - `"lucy-vton-2"` - Lucy virtual try-on 2
|
|
524
498
|
* - `"lucy-vton-3"` - Lucy virtual try-on 3
|
|
525
|
-
* - `"lucy-vton-3.5"` - Lucy virtual try-on 3.5 (latest)
|
|
526
499
|
* - `"lucy-restyle-2"` - Realtime video restyling
|
|
527
500
|
*/
|
|
528
501
|
realtime: (model) => {
|
|
@@ -540,7 +513,6 @@ const models = {
|
|
|
540
513
|
* - `"lucy-2.5"` - Long-form video editing (Lucy 2.5)
|
|
541
514
|
* - `"lucy-vton-2"` - Virtual try-on 2 video editing
|
|
542
515
|
* - `"lucy-vton-3"` - Virtual try-on 3 video editing
|
|
543
|
-
* - `"lucy-vton-3.5"` - Virtual try-on 3.5 video editing (latest)
|
|
544
516
|
* - `"lucy-restyle-2"` - Video restyling
|
|
545
517
|
*/
|
|
546
518
|
video: (model) => {
|