@decartai/sdk 0.0.59 → 0.0.60
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 +35 -2
- package/dist/shared/model.js +22 -0
- 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-v2v" | "lucy-2" | "lucy-2.1" ? 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-v2v" | "lucy-2" | "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
|
@@ -2,9 +2,9 @@ import { z } from "zod";
|
|
|
2
2
|
|
|
3
3
|
//#region src/shared/model.d.ts
|
|
4
4
|
declare const realtimeModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy">, z.ZodLiteral<"lucy-2">, 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<"lucy_2_rt">, z.ZodLiteral<"live_avatar">]>;
|
|
5
|
-
declare const videoModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-motion">, z.ZodLiteral<"lucy-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.ZodLiteral<"lucy-2-v2v">]>;
|
|
5
|
+
declare const videoModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2">, 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.ZodLiteral<"lucy-2-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">, 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<"lucy_2_rt">, z.ZodLiteral<"live_avatar">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2">, z.ZodLiteral<"lucy-2.1">, z.ZodLiteral<"lucy-restyle-2">, z.ZodLiteral<"lucy-motion">, z.ZodLiteral<"lucy-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.ZodLiteral<"lucy-2-v2v">]>, 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">, 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<"lucy_2_rt">, z.ZodLiteral<"live_avatar">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-clip">, z.ZodLiteral<"lucy-2">, 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.ZodLiteral<"lucy-2-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>;
|
|
@@ -96,6 +96,22 @@ declare const modelInputSchemas: {
|
|
|
96
96
|
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
97
97
|
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
98
98
|
}, z.core.$strip>;
|
|
99
|
+
readonly "lucy-2.1-vton": z.ZodObject<{
|
|
100
|
+
prompt: z.ZodString;
|
|
101
|
+
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<{
|
|
102
|
+
uri: z.ZodString;
|
|
103
|
+
type: z.ZodString;
|
|
104
|
+
name: z.ZodString;
|
|
105
|
+
}, z.core.$strip>]>>;
|
|
106
|
+
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<{
|
|
107
|
+
uri: z.ZodString;
|
|
108
|
+
type: z.ZodString;
|
|
109
|
+
name: z.ZodString;
|
|
110
|
+
}, z.core.$strip>]>;
|
|
111
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
113
|
+
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
114
|
+
}, z.core.$strip>;
|
|
99
115
|
readonly "lucy-motion": z.ZodObject<{
|
|
100
116
|
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<{
|
|
101
117
|
uri: z.ZodString;
|
|
@@ -126,6 +142,22 @@ declare const modelInputSchemas: {
|
|
|
126
142
|
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
127
143
|
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
128
144
|
}, z.core.$strip>;
|
|
145
|
+
readonly "lucy-vton-latest": z.ZodObject<{
|
|
146
|
+
prompt: z.ZodString;
|
|
147
|
+
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<{
|
|
148
|
+
uri: z.ZodString;
|
|
149
|
+
type: z.ZodString;
|
|
150
|
+
name: z.ZodString;
|
|
151
|
+
}, z.core.$strip>]>>;
|
|
152
|
+
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<{
|
|
153
|
+
uri: z.ZodString;
|
|
154
|
+
type: z.ZodString;
|
|
155
|
+
name: z.ZodString;
|
|
156
|
+
}, z.core.$strip>]>;
|
|
157
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
159
|
+
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
160
|
+
}, z.core.$strip>;
|
|
129
161
|
readonly "lucy-restyle-latest": z.ZodObject<{
|
|
130
162
|
prompt: z.ZodOptional<z.ZodString>;
|
|
131
163
|
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<{
|
|
@@ -314,6 +346,7 @@ declare const models: {
|
|
|
314
346
|
* - `"lucy-clip"` - Video-to-video editing
|
|
315
347
|
* - `"lucy-2"` - Long-form video editing (720p)
|
|
316
348
|
* - `"lucy-2.1"` - Long-form video editing (Lucy 2.1)
|
|
349
|
+
* - `"lucy-2.1-vton"` - Virtual try-on video editing
|
|
317
350
|
* - `"lucy-restyle-2"` - Video restyling
|
|
318
351
|
* - `"lucy-motion"` - Motion generation
|
|
319
352
|
*/
|
package/dist/shared/model.js
CHANGED
|
@@ -46,9 +46,11 @@ const videoModels = z.union([
|
|
|
46
46
|
z.literal("lucy-clip"),
|
|
47
47
|
z.literal("lucy-2"),
|
|
48
48
|
z.literal("lucy-2.1"),
|
|
49
|
+
z.literal("lucy-2.1-vton"),
|
|
49
50
|
z.literal("lucy-restyle-2"),
|
|
50
51
|
z.literal("lucy-motion"),
|
|
51
52
|
z.literal("lucy-latest"),
|
|
53
|
+
z.literal("lucy-vton-latest"),
|
|
52
54
|
z.literal("lucy-restyle-latest"),
|
|
53
55
|
z.literal("lucy-clip-latest"),
|
|
54
56
|
z.literal("lucy-motion-latest"),
|
|
@@ -140,6 +142,7 @@ const modelInputSchemas = {
|
|
|
140
142
|
"lucy-restyle-2": restyleSchema,
|
|
141
143
|
"lucy-2": videoEdit2Schema,
|
|
142
144
|
"lucy-2.1": videoEdit2Schema,
|
|
145
|
+
"lucy-2.1-vton": videoEdit2Schema,
|
|
143
146
|
"lucy-motion": z.object({
|
|
144
147
|
data: fileInputSchema.describe("The image data to use for generation (File, Blob, ReadableStream, URL, or string URL). Output video is limited to 5 seconds."),
|
|
145
148
|
trajectory: z.array(z.object({
|
|
@@ -151,6 +154,7 @@ const modelInputSchemas = {
|
|
|
151
154
|
resolution: motionResolutionSchema
|
|
152
155
|
}),
|
|
153
156
|
"lucy-latest": videoEdit2Schema,
|
|
157
|
+
"lucy-vton-latest": videoEdit2Schema,
|
|
154
158
|
"lucy-restyle-latest": restyleSchema,
|
|
155
159
|
"lucy-clip-latest": videoEditSchema,
|
|
156
160
|
"lucy-motion-latest": z.object({
|
|
@@ -358,6 +362,15 @@ const _models = {
|
|
|
358
362
|
height: 624,
|
|
359
363
|
inputSchema: modelInputSchemas["lucy-2.1"]
|
|
360
364
|
},
|
|
365
|
+
"lucy-2.1-vton": {
|
|
366
|
+
urlPath: "/v1/generate/lucy-2.1-vton",
|
|
367
|
+
queueUrlPath: "/v1/jobs/lucy-2.1-vton",
|
|
368
|
+
name: "lucy-2.1-vton",
|
|
369
|
+
fps: 20,
|
|
370
|
+
width: 1088,
|
|
371
|
+
height: 624,
|
|
372
|
+
inputSchema: modelInputSchemas["lucy-2.1-vton"]
|
|
373
|
+
},
|
|
361
374
|
"lucy-restyle-2": {
|
|
362
375
|
urlPath: "/v1/generate/lucy-restyle-2",
|
|
363
376
|
queueUrlPath: "/v1/jobs/lucy-restyle-2",
|
|
@@ -385,6 +398,15 @@ const _models = {
|
|
|
385
398
|
height: 624,
|
|
386
399
|
inputSchema: modelInputSchemas["lucy-latest"]
|
|
387
400
|
},
|
|
401
|
+
"lucy-vton-latest": {
|
|
402
|
+
urlPath: "/v1/generate/lucy-vton-latest",
|
|
403
|
+
queueUrlPath: "/v1/jobs/lucy-vton-latest",
|
|
404
|
+
name: "lucy-vton-latest",
|
|
405
|
+
fps: 20,
|
|
406
|
+
width: 1088,
|
|
407
|
+
height: 624,
|
|
408
|
+
inputSchema: modelInputSchemas["lucy-vton-latest"]
|
|
409
|
+
},
|
|
388
410
|
"lucy-restyle-latest": {
|
|
389
411
|
urlPath: "/v1/generate/lucy-restyle-latest",
|
|
390
412
|
queueUrlPath: "/v1/jobs/lucy-restyle-latest",
|