@decartai/sdk 0.0.57 → 0.0.59
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/client.js +1 -1
- package/dist/process/types.d.ts +6 -1
- package/dist/realtime/client.js +1 -1
- package/dist/realtime/webrtc-connection.js +1 -1
- package/dist/shared/model.d.ts +206 -14
- package/dist/shared/model.js +292 -48
- package/package.json +1 -1
package/dist/process/client.js
CHANGED
|
@@ -10,7 +10,7 @@ const createProcessClient = (opts) => {
|
|
|
10
10
|
const parsedInputs = model.inputSchema.safeParse(inputs);
|
|
11
11
|
if (!parsedInputs.success) throw createInvalidInputError(`Invalid inputs for ${model.name}: ${parsedInputs.error.message}`);
|
|
12
12
|
const processedInputs = {};
|
|
13
|
-
for (const [key, value] of Object.entries(parsedInputs.data)) if (key === "data" || key === "start" || key === "end") processedInputs[key] = await fileInputToBlob(value);
|
|
13
|
+
for (const [key, value] of Object.entries(parsedInputs.data)) if (key === "data" || key === "start" || key === "end" || key === "reference_image") processedInputs[key] = await fileInputToBlob(value);
|
|
14
14
|
else processedInputs[key] = value;
|
|
15
15
|
return await sendRequest({
|
|
16
16
|
baseUrl,
|
package/dist/process/types.d.ts
CHANGED
|
@@ -40,6 +40,11 @@ interface ImageEditingInputs {
|
|
|
40
40
|
* Can be a File, Blob, ReadableStream, URL, or string URL.
|
|
41
41
|
*/
|
|
42
42
|
data?: FileInput;
|
|
43
|
+
/**
|
|
44
|
+
* Optional reference image to guide the edit.
|
|
45
|
+
* Can be a File, Blob, ReadableStream, URL, or string URL.
|
|
46
|
+
*/
|
|
47
|
+
reference_image?: FileInput;
|
|
43
48
|
}
|
|
44
49
|
/**
|
|
45
50
|
* Model-specific input documentation for video models.
|
|
@@ -138,7 +143,7 @@ interface PromptInput {
|
|
|
138
143
|
* This allows different models to have field-specific documentation while maintaining type safety.
|
|
139
144
|
* Specific models are checked first, then falls back to category-based selection.
|
|
140
145
|
*/
|
|
141
|
-
type ModelSpecificInputs<T extends ModelDefinition> = T["name"] extends "lucy-pro-i2i" ? ImageEditingInputs : T["name"] extends "lucy-restyle-v2v" ? VideoRestyleInputs : T["name"] extends "lucy-2-v2v" ? VideoEdit2Inputs : T["name"] extends "lucy-pro-v2v" ? 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" ? VideoEdit2Inputs : T["name"] extends "lucy-pro-v2v" | "lucy-clip" ? VideoEditInputs : T["name"] extends ImageModels ? ImageGenerationInputs : T["name"] extends VideoModels ? VideoModelInputs : PromptInput;
|
|
142
147
|
interface ProcessInputs {
|
|
143
148
|
/**
|
|
144
149
|
* Random seed for reproducible results.
|
package/dist/realtime/client.js
CHANGED
|
@@ -64,7 +64,7 @@ const createRealTimeClient = (opts) => {
|
|
|
64
64
|
const connect = async (stream, options) => {
|
|
65
65
|
const parsedOptions = realTimeClientConnectOptionsSchema.safeParse(options);
|
|
66
66
|
if (!parsedOptions.success) throw parsedOptions.error;
|
|
67
|
-
const isAvatarLive = options.model.name === "live_avatar";
|
|
67
|
+
const isAvatarLive = options.model.name === "live_avatar" || options.model.name === "live-avatar";
|
|
68
68
|
const { onRemoteStream, initialState } = parsedOptions.data;
|
|
69
69
|
let audioStreamManager;
|
|
70
70
|
let inputStream;
|
|
@@ -312,7 +312,7 @@ var WebRTCConnection = class {
|
|
|
312
312
|
this.pc = new RTCPeerConnection({ iceServers: ICE_SERVERS });
|
|
313
313
|
this.setState("connecting");
|
|
314
314
|
if (this.localStream) {
|
|
315
|
-
if (this.callbacks.modelName === "live_avatar") this.pc.addTransceiver("video", { direction: "recvonly" });
|
|
315
|
+
if (this.callbacks.modelName === "live_avatar" || this.callbacks.modelName === "live-avatar") this.pc.addTransceiver("video", { direction: "recvonly" });
|
|
316
316
|
this.localStream.getTracks().forEach((track) => {
|
|
317
317
|
if (this.pc && this.localStream) this.pc.addTrack(track, this.localStream);
|
|
318
318
|
});
|
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<"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-
|
|
6
|
-
declare const imageModels: z.ZodLiteral<"lucy-pro-i2i">;
|
|
7
|
-
declare const modelSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [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-
|
|
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">]>;
|
|
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">]>]>;
|
|
8
8
|
type Model = z.infer<typeof modelSchema>;
|
|
9
9
|
type RealTimeModels = z.infer<typeof realtimeModels>;
|
|
10
10
|
type VideoModels = z.infer<typeof videoModels>;
|
|
@@ -13,7 +13,7 @@ declare function isRealtimeModel(model: string): model is RealTimeModels;
|
|
|
13
13
|
declare function isVideoModel(model: string): model is VideoModels;
|
|
14
14
|
declare function isImageModel(model: string): model is ImageModels;
|
|
15
15
|
declare const modelInputSchemas: {
|
|
16
|
-
readonly "lucy-
|
|
16
|
+
readonly "lucy-clip": z.ZodObject<{
|
|
17
17
|
prompt: z.ZodString;
|
|
18
18
|
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<{
|
|
19
19
|
uri: z.ZodString;
|
|
@@ -29,13 +29,18 @@ declare const modelInputSchemas: {
|
|
|
29
29
|
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
30
30
|
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
31
31
|
}, z.core.$strip>;
|
|
32
|
-
readonly "lucy-
|
|
32
|
+
readonly "lucy-image-2": z.ZodObject<{
|
|
33
33
|
prompt: z.ZodString;
|
|
34
34
|
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<{
|
|
35
35
|
uri: z.ZodString;
|
|
36
36
|
type: z.ZodString;
|
|
37
37
|
name: z.ZodString;
|
|
38
38
|
}, z.core.$strip>]>;
|
|
39
|
+
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<{
|
|
40
|
+
uri: z.ZodString;
|
|
41
|
+
type: z.ZodString;
|
|
42
|
+
name: z.ZodString;
|
|
43
|
+
}, z.core.$strip>]>>;
|
|
39
44
|
seed: z.ZodOptional<z.ZodNumber>;
|
|
40
45
|
resolution: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
41
46
|
"720p": "720p";
|
|
@@ -43,6 +48,54 @@ declare const modelInputSchemas: {
|
|
|
43
48
|
}>>>;
|
|
44
49
|
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
45
50
|
}, z.core.$strip>;
|
|
51
|
+
readonly "lucy-restyle-2": z.ZodObject<{
|
|
52
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
53
|
+
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<{
|
|
54
|
+
uri: z.ZodString;
|
|
55
|
+
type: z.ZodString;
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
}, z.core.$strip>]>>;
|
|
58
|
+
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<{
|
|
59
|
+
uri: z.ZodString;
|
|
60
|
+
type: z.ZodString;
|
|
61
|
+
name: z.ZodString;
|
|
62
|
+
}, z.core.$strip>]>;
|
|
63
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
65
|
+
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
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
|
+
readonly "lucy-2.1": z.ZodObject<{
|
|
84
|
+
prompt: z.ZodString;
|
|
85
|
+
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<{
|
|
86
|
+
uri: z.ZodString;
|
|
87
|
+
type: z.ZodString;
|
|
88
|
+
name: z.ZodString;
|
|
89
|
+
}, z.core.$strip>]>>;
|
|
90
|
+
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<{
|
|
91
|
+
uri: z.ZodString;
|
|
92
|
+
type: z.ZodString;
|
|
93
|
+
name: z.ZodString;
|
|
94
|
+
}, z.core.$strip>]>;
|
|
95
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
97
|
+
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
+
}, z.core.$strip>;
|
|
46
99
|
readonly "lucy-motion": z.ZodObject<{
|
|
47
100
|
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<{
|
|
48
101
|
uri: z.ZodString;
|
|
@@ -57,6 +110,122 @@ declare const modelInputSchemas: {
|
|
|
57
110
|
seed: z.ZodOptional<z.ZodNumber>;
|
|
58
111
|
resolution: z.ZodOptional<z.ZodDefault<z.ZodLiteral<"720p">>>;
|
|
59
112
|
}, z.core.$strip>;
|
|
113
|
+
readonly "lucy-latest": z.ZodObject<{
|
|
114
|
+
prompt: z.ZodString;
|
|
115
|
+
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<{
|
|
116
|
+
uri: z.ZodString;
|
|
117
|
+
type: z.ZodString;
|
|
118
|
+
name: z.ZodString;
|
|
119
|
+
}, z.core.$strip>]>>;
|
|
120
|
+
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<{
|
|
121
|
+
uri: z.ZodString;
|
|
122
|
+
type: z.ZodString;
|
|
123
|
+
name: z.ZodString;
|
|
124
|
+
}, z.core.$strip>]>;
|
|
125
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
126
|
+
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
127
|
+
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
readonly "lucy-restyle-latest": z.ZodObject<{
|
|
130
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
131
|
+
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<{
|
|
132
|
+
uri: z.ZodString;
|
|
133
|
+
type: z.ZodString;
|
|
134
|
+
name: z.ZodString;
|
|
135
|
+
}, z.core.$strip>]>>;
|
|
136
|
+
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<{
|
|
137
|
+
uri: z.ZodString;
|
|
138
|
+
type: z.ZodString;
|
|
139
|
+
name: z.ZodString;
|
|
140
|
+
}, z.core.$strip>]>;
|
|
141
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
143
|
+
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
readonly "lucy-clip-latest": z.ZodObject<{
|
|
146
|
+
prompt: z.ZodString;
|
|
147
|
+
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<{
|
|
148
|
+
uri: z.ZodString;
|
|
149
|
+
type: z.ZodString;
|
|
150
|
+
name: z.ZodString;
|
|
151
|
+
}, z.core.$strip>]>;
|
|
152
|
+
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<{
|
|
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>;
|
|
161
|
+
readonly "lucy-motion-latest": z.ZodObject<{
|
|
162
|
+
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<{
|
|
163
|
+
uri: z.ZodString;
|
|
164
|
+
type: z.ZodString;
|
|
165
|
+
name: z.ZodString;
|
|
166
|
+
}, z.core.$strip>]>;
|
|
167
|
+
trajectory: z.ZodArray<z.ZodObject<{
|
|
168
|
+
frame: z.ZodNumber;
|
|
169
|
+
x: z.ZodNumber;
|
|
170
|
+
y: z.ZodNumber;
|
|
171
|
+
}, z.core.$strip>>;
|
|
172
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
173
|
+
resolution: z.ZodOptional<z.ZodDefault<z.ZodLiteral<"720p">>>;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
readonly "lucy-image-latest": z.ZodObject<{
|
|
176
|
+
prompt: z.ZodString;
|
|
177
|
+
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<{
|
|
178
|
+
uri: z.ZodString;
|
|
179
|
+
type: z.ZodString;
|
|
180
|
+
name: z.ZodString;
|
|
181
|
+
}, z.core.$strip>]>;
|
|
182
|
+
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<{
|
|
183
|
+
uri: z.ZodString;
|
|
184
|
+
type: z.ZodString;
|
|
185
|
+
name: z.ZodString;
|
|
186
|
+
}, z.core.$strip>]>>;
|
|
187
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
188
|
+
resolution: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
189
|
+
"720p": "720p";
|
|
190
|
+
"480p": "480p";
|
|
191
|
+
}>>>;
|
|
192
|
+
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
193
|
+
}, z.core.$strip>;
|
|
194
|
+
readonly "lucy-pro-v2v": z.ZodObject<{
|
|
195
|
+
prompt: z.ZodString;
|
|
196
|
+
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<{
|
|
197
|
+
uri: z.ZodString;
|
|
198
|
+
type: z.ZodString;
|
|
199
|
+
name: z.ZodString;
|
|
200
|
+
}, z.core.$strip>]>;
|
|
201
|
+
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<{
|
|
202
|
+
uri: z.ZodString;
|
|
203
|
+
type: z.ZodString;
|
|
204
|
+
name: z.ZodString;
|
|
205
|
+
}, z.core.$strip>]>>;
|
|
206
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
207
|
+
resolution: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"720p">>>;
|
|
208
|
+
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
209
|
+
}, z.core.$strip>;
|
|
210
|
+
readonly "lucy-pro-i2i": z.ZodObject<{
|
|
211
|
+
prompt: z.ZodString;
|
|
212
|
+
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<{
|
|
213
|
+
uri: z.ZodString;
|
|
214
|
+
type: z.ZodString;
|
|
215
|
+
name: z.ZodString;
|
|
216
|
+
}, z.core.$strip>]>;
|
|
217
|
+
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<{
|
|
218
|
+
uri: z.ZodString;
|
|
219
|
+
type: z.ZodString;
|
|
220
|
+
name: z.ZodString;
|
|
221
|
+
}, z.core.$strip>]>>;
|
|
222
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
223
|
+
resolution: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
224
|
+
"720p": "720p";
|
|
225
|
+
"480p": "480p";
|
|
226
|
+
}>>>;
|
|
227
|
+
enhance_prompt: z.ZodOptional<z.ZodBoolean>;
|
|
228
|
+
}, z.core.$strip>;
|
|
60
229
|
readonly "lucy-restyle-v2v": z.ZodObject<{
|
|
61
230
|
prompt: z.ZodOptional<z.ZodString>;
|
|
62
231
|
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<{
|
|
@@ -111,32 +280,55 @@ type CustomModelDefinition = Omit<ModelDefinition, "name" | "inputSchema"> & {
|
|
|
111
280
|
/**
|
|
112
281
|
* Type alias for model definitions that support synchronous processing.
|
|
113
282
|
* Only image models support the sync/process API.
|
|
283
|
+
* Requires `queueUrlPath` to distinguish from realtime definitions of the same model name.
|
|
114
284
|
*/
|
|
115
|
-
type ImageModelDefinition = ModelDefinition<ImageModels
|
|
285
|
+
type ImageModelDefinition = ModelDefinition<ImageModels> & {
|
|
286
|
+
queueUrlPath: string;
|
|
287
|
+
};
|
|
116
288
|
/**
|
|
117
289
|
* Type alias for model definitions that support queue processing.
|
|
118
290
|
* Only video models support the queue API.
|
|
291
|
+
* Requires `queueUrlPath` to distinguish from realtime definitions of the same model name.
|
|
119
292
|
*/
|
|
120
|
-
type VideoModelDefinition = ModelDefinition<VideoModels
|
|
293
|
+
type VideoModelDefinition = ModelDefinition<VideoModels> & {
|
|
294
|
+
queueUrlPath: string;
|
|
295
|
+
};
|
|
121
296
|
declare const models: {
|
|
297
|
+
/**
|
|
298
|
+
* Get a realtime streaming model identifier.
|
|
299
|
+
*
|
|
300
|
+
* Available options:
|
|
301
|
+
* - `"lucy-2"` - Lucy 2 realtime video editing (720p)
|
|
302
|
+
* - `"lucy-2.1"` - Lucy 2.1 realtime video editing
|
|
303
|
+
* - `"lucy-2.1-vton"` - Lucy 2.1 virtual try-on
|
|
304
|
+
* - `"lucy-restyle-2"` - Realtime video restyling
|
|
305
|
+
* - `"lucy-restyle"` - Legacy realtime restyling
|
|
306
|
+
* - `"lucy"` - Legacy Lucy realtime
|
|
307
|
+
* - `"live-avatar"` - Live avatar
|
|
308
|
+
*/
|
|
122
309
|
realtime: <T extends RealTimeModels>(model: T) => ModelDefinition<T>;
|
|
123
310
|
/**
|
|
124
311
|
* Get a video model identifier.
|
|
125
312
|
*
|
|
126
313
|
* Available options:
|
|
127
|
-
* - `"lucy-
|
|
128
|
-
* - `"lucy-
|
|
129
|
-
* - `"lucy-2
|
|
314
|
+
* - `"lucy-clip"` - Video-to-video editing
|
|
315
|
+
* - `"lucy-2"` - Long-form video editing (720p)
|
|
316
|
+
* - `"lucy-2.1"` - Long-form video editing (Lucy 2.1)
|
|
317
|
+
* - `"lucy-restyle-2"` - Video restyling
|
|
130
318
|
* - `"lucy-motion"` - Motion generation
|
|
131
319
|
*/
|
|
132
|
-
video: <T extends VideoModels>(model: T) => ModelDefinition<T
|
|
320
|
+
video: <T extends VideoModels>(model: T) => ModelDefinition<T> & {
|
|
321
|
+
queueUrlPath: string;
|
|
322
|
+
};
|
|
133
323
|
/**
|
|
134
324
|
* Get an image model identifier.
|
|
135
325
|
*
|
|
136
326
|
* Available options:
|
|
137
|
-
* - `"lucy-
|
|
327
|
+
* - `"lucy-image-2"` - Image-to-image editing
|
|
138
328
|
*/
|
|
139
|
-
image: <T extends ImageModels>(model: T) => ModelDefinition<T
|
|
329
|
+
image: <T extends ImageModels>(model: T) => ModelDefinition<T> & {
|
|
330
|
+
queueUrlPath: string;
|
|
331
|
+
};
|
|
140
332
|
};
|
|
141
333
|
//#endregion
|
|
142
334
|
export { CustomModelDefinition, ImageModelDefinition, ImageModels, Model, ModelDefinition, ModelInputSchemas, RealTimeModels, VideoModelDefinition, VideoModels, isImageModel, isRealtimeModel, isVideoModel, models };
|
package/dist/shared/model.js
CHANGED
|
@@ -2,7 +2,40 @@ import { createModelNotFoundError } from "../utils/errors.js";
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/shared/model.ts
|
|
5
|
+
/**
|
|
6
|
+
* Map of deprecated model names to their canonical replacements.
|
|
7
|
+
* Old names still work but will log a deprecation warning.
|
|
8
|
+
*/
|
|
9
|
+
const MODEL_ALIASES = {
|
|
10
|
+
mirage: "lucy-restyle",
|
|
11
|
+
mirage_v2: "lucy-restyle-2",
|
|
12
|
+
lucy_v2v_720p_rt: "lucy",
|
|
13
|
+
lucy_2_rt: "lucy-2",
|
|
14
|
+
live_avatar: "live-avatar",
|
|
15
|
+
"lucy-pro-v2v": "lucy-clip",
|
|
16
|
+
"lucy-restyle-v2v": "lucy-restyle-2",
|
|
17
|
+
"lucy-2-v2v": "lucy-2",
|
|
18
|
+
"lucy-pro-i2i": "lucy-image-2"
|
|
19
|
+
};
|
|
20
|
+
const _warnedAliases = /* @__PURE__ */ new Set();
|
|
21
|
+
function warnDeprecated(model) {
|
|
22
|
+
const canonical = MODEL_ALIASES[model];
|
|
23
|
+
if (canonical && !_warnedAliases.has(model)) {
|
|
24
|
+
_warnedAliases.add(model);
|
|
25
|
+
console.warn(`[Decart SDK] Model "${model}" is deprecated. Use "${canonical}" instead. See https://docs.platform.decart.ai/models for details.`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
5
28
|
const realtimeModels = z.union([
|
|
29
|
+
z.literal("lucy"),
|
|
30
|
+
z.literal("lucy-2"),
|
|
31
|
+
z.literal("lucy-2.1"),
|
|
32
|
+
z.literal("lucy-2.1-vton"),
|
|
33
|
+
z.literal("lucy-restyle"),
|
|
34
|
+
z.literal("lucy-restyle-2"),
|
|
35
|
+
z.literal("live-avatar"),
|
|
36
|
+
z.literal("lucy-latest"),
|
|
37
|
+
z.literal("lucy-vton-latest"),
|
|
38
|
+
z.literal("lucy-restyle-latest"),
|
|
6
39
|
z.literal("mirage"),
|
|
7
40
|
z.literal("mirage_v2"),
|
|
8
41
|
z.literal("lucy_v2v_720p_rt"),
|
|
@@ -10,12 +43,24 @@ const realtimeModels = z.union([
|
|
|
10
43
|
z.literal("live_avatar")
|
|
11
44
|
]);
|
|
12
45
|
const videoModels = z.union([
|
|
13
|
-
z.literal("lucy-
|
|
46
|
+
z.literal("lucy-clip"),
|
|
47
|
+
z.literal("lucy-2"),
|
|
48
|
+
z.literal("lucy-2.1"),
|
|
49
|
+
z.literal("lucy-restyle-2"),
|
|
14
50
|
z.literal("lucy-motion"),
|
|
51
|
+
z.literal("lucy-latest"),
|
|
52
|
+
z.literal("lucy-restyle-latest"),
|
|
53
|
+
z.literal("lucy-clip-latest"),
|
|
54
|
+
z.literal("lucy-motion-latest"),
|
|
55
|
+
z.literal("lucy-pro-v2v"),
|
|
15
56
|
z.literal("lucy-restyle-v2v"),
|
|
16
57
|
z.literal("lucy-2-v2v")
|
|
17
58
|
]);
|
|
18
|
-
const imageModels = z.
|
|
59
|
+
const imageModels = z.union([
|
|
60
|
+
z.literal("lucy-image-2"),
|
|
61
|
+
z.literal("lucy-image-latest"),
|
|
62
|
+
z.literal("lucy-pro-i2i")
|
|
63
|
+
]);
|
|
19
64
|
const modelSchema = z.union([
|
|
20
65
|
realtimeModels,
|
|
21
66
|
videoModels,
|
|
@@ -54,25 +99,47 @@ const proResolutionSchema = () => {
|
|
|
54
99
|
*/
|
|
55
100
|
const motionResolutionSchema = z.literal("720p").default("720p").optional().describe("The resolution to use for the generation");
|
|
56
101
|
/**
|
|
57
|
-
* Resolution schema for
|
|
102
|
+
* Resolution schema for video-to-video models (supports 720p).
|
|
58
103
|
*/
|
|
59
|
-
const
|
|
104
|
+
const v2vResolutionSchema = z.literal("720p").optional().describe("The resolution to use for the generation").default("720p");
|
|
105
|
+
const videoEditSchema = z.object({
|
|
106
|
+
prompt: z.string().min(1).max(1e3).describe("The prompt to use for the generation"),
|
|
107
|
+
data: fileInputSchema.describe("The video data to use for generation (File, Blob, ReadableStream, URL, or string URL). Output video is limited to 5 seconds."),
|
|
108
|
+
reference_image: fileInputSchema.optional().describe("Optional reference image to guide what to add to the video (File, Blob, ReadableStream, URL, or string URL)"),
|
|
109
|
+
seed: z.number().optional().describe("The seed to use for the generation"),
|
|
110
|
+
resolution: v2vResolutionSchema,
|
|
111
|
+
enhance_prompt: z.boolean().optional().describe("Whether to enhance the prompt")
|
|
112
|
+
});
|
|
113
|
+
const imageEditSchema = z.object({
|
|
114
|
+
prompt: z.string().min(1).max(1e3).describe("The prompt to use for the generation"),
|
|
115
|
+
data: fileInputSchema.describe("The image data to use for generation (File, Blob, ReadableStream, URL, or string URL)"),
|
|
116
|
+
reference_image: fileInputSchema.optional().describe("Optional reference image to guide the edit (File, Blob, ReadableStream, URL, or string URL)"),
|
|
117
|
+
seed: z.number().optional().describe("The seed to use for the generation"),
|
|
118
|
+
resolution: proResolutionSchema(),
|
|
119
|
+
enhance_prompt: z.boolean().optional().describe("Whether to enhance the prompt")
|
|
120
|
+
});
|
|
121
|
+
const restyleSchema = z.object({
|
|
122
|
+
prompt: z.string().min(1).max(1e3).optional().describe("Text prompt for the video editing"),
|
|
123
|
+
reference_image: fileInputSchema.optional().describe("Reference image to transform into a prompt (File, Blob, ReadableStream, URL, or string URL)"),
|
|
124
|
+
data: fileInputSchema.describe("Video file to process (File, Blob, ReadableStream, URL, or string URL)"),
|
|
125
|
+
seed: z.number().optional().describe("Seed for the video generation"),
|
|
126
|
+
resolution: v2vResolutionSchema,
|
|
127
|
+
enhance_prompt: z.boolean().optional().describe("Whether to enhance the prompt (only valid with text prompt, defaults to true on backend)")
|
|
128
|
+
}).refine((data) => data.prompt !== void 0 !== (data.reference_image !== void 0), { message: "Must provide either 'prompt' or 'reference_image', but not both" }).refine((data) => !(data.reference_image !== void 0 && data.enhance_prompt !== void 0), { message: "'enhance_prompt' is only valid when using 'prompt', not 'reference_image'" });
|
|
129
|
+
const videoEdit2Schema = z.object({
|
|
130
|
+
prompt: z.string().max(1e3).describe("Text prompt for the video editing. Send an empty string if you want no text prompt."),
|
|
131
|
+
reference_image: fileInputSchema.optional().describe("Optional reference image to guide the edit (File, Blob, ReadableStream, URL, or string URL)"),
|
|
132
|
+
data: fileInputSchema.describe("Video file to process (File, Blob, ReadableStream, URL, or string URL)"),
|
|
133
|
+
seed: z.number().optional().describe("The seed to use for the generation"),
|
|
134
|
+
resolution: v2vResolutionSchema,
|
|
135
|
+
enhance_prompt: z.boolean().optional().describe("Whether to enhance the prompt")
|
|
136
|
+
});
|
|
60
137
|
const modelInputSchemas = {
|
|
61
|
-
"lucy-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
resolution: proV2vResolutionSchema,
|
|
67
|
-
enhance_prompt: z.boolean().optional().describe("Whether to enhance the prompt")
|
|
68
|
-
}),
|
|
69
|
-
"lucy-pro-i2i": z.object({
|
|
70
|
-
prompt: z.string().min(1).max(1e3).describe("The prompt to use for the generation"),
|
|
71
|
-
data: fileInputSchema.describe("The image data to use for generation (File, Blob, ReadableStream, URL, or string URL)"),
|
|
72
|
-
seed: z.number().optional().describe("The seed to use for the generation"),
|
|
73
|
-
resolution: proResolutionSchema(),
|
|
74
|
-
enhance_prompt: z.boolean().optional().describe("Whether to enhance the prompt")
|
|
75
|
-
}),
|
|
138
|
+
"lucy-clip": videoEditSchema,
|
|
139
|
+
"lucy-image-2": imageEditSchema,
|
|
140
|
+
"lucy-restyle-2": restyleSchema,
|
|
141
|
+
"lucy-2": videoEdit2Schema,
|
|
142
|
+
"lucy-2.1": videoEdit2Schema,
|
|
76
143
|
"lucy-motion": z.object({
|
|
77
144
|
data: fileInputSchema.describe("The image data to use for generation (File, Blob, ReadableStream, URL, or string URL). Output video is limited to 5 seconds."),
|
|
78
145
|
trajectory: z.array(z.object({
|
|
@@ -83,22 +150,24 @@ const modelInputSchemas = {
|
|
|
83
150
|
seed: z.number().optional().describe("The seed to use for the generation"),
|
|
84
151
|
resolution: motionResolutionSchema
|
|
85
152
|
}),
|
|
86
|
-
"lucy-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
reference_image: fileInputSchema.optional().describe("Optional reference image to guide the edit (File, Blob, ReadableStream, URL, or string URL)"),
|
|
97
|
-
data: fileInputSchema.describe("Video file to process (File, Blob, ReadableStream, URL, or string URL)"),
|
|
153
|
+
"lucy-latest": videoEdit2Schema,
|
|
154
|
+
"lucy-restyle-latest": restyleSchema,
|
|
155
|
+
"lucy-clip-latest": videoEditSchema,
|
|
156
|
+
"lucy-motion-latest": z.object({
|
|
157
|
+
data: fileInputSchema.describe("The image data to use for generation (File, Blob, ReadableStream, URL, or string URL). Output video is limited to 5 seconds."),
|
|
158
|
+
trajectory: z.array(z.object({
|
|
159
|
+
frame: z.number().min(0),
|
|
160
|
+
x: z.number().min(0),
|
|
161
|
+
y: z.number().min(0)
|
|
162
|
+
})).min(2).max(1e3).describe("The trajectory of the desired movement of the object in the image"),
|
|
98
163
|
seed: z.number().optional().describe("The seed to use for the generation"),
|
|
99
|
-
resolution:
|
|
100
|
-
|
|
101
|
-
|
|
164
|
+
resolution: motionResolutionSchema
|
|
165
|
+
}),
|
|
166
|
+
"lucy-image-latest": imageEditSchema,
|
|
167
|
+
"lucy-pro-v2v": videoEditSchema,
|
|
168
|
+
"lucy-pro-i2i": imageEditSchema,
|
|
169
|
+
"lucy-restyle-v2v": restyleSchema,
|
|
170
|
+
"lucy-2-v2v": videoEdit2Schema
|
|
102
171
|
};
|
|
103
172
|
const modelDefinitionSchema = z.object({
|
|
104
173
|
name: z.string(),
|
|
@@ -111,6 +180,86 @@ const modelDefinitionSchema = z.object({
|
|
|
111
180
|
});
|
|
112
181
|
const _models = {
|
|
113
182
|
realtime: {
|
|
183
|
+
lucy: {
|
|
184
|
+
urlPath: "/v1/stream",
|
|
185
|
+
name: "lucy",
|
|
186
|
+
fps: 25,
|
|
187
|
+
width: 1280,
|
|
188
|
+
height: 704,
|
|
189
|
+
inputSchema: z.object({})
|
|
190
|
+
},
|
|
191
|
+
"lucy-2": {
|
|
192
|
+
urlPath: "/v1/stream",
|
|
193
|
+
name: "lucy-2",
|
|
194
|
+
fps: 20,
|
|
195
|
+
width: 1280,
|
|
196
|
+
height: 720,
|
|
197
|
+
inputSchema: z.object({})
|
|
198
|
+
},
|
|
199
|
+
"lucy-2.1": {
|
|
200
|
+
urlPath: "/v1/stream",
|
|
201
|
+
name: "lucy-2.1",
|
|
202
|
+
fps: 20,
|
|
203
|
+
width: 1088,
|
|
204
|
+
height: 624,
|
|
205
|
+
inputSchema: z.object({})
|
|
206
|
+
},
|
|
207
|
+
"lucy-2.1-vton": {
|
|
208
|
+
urlPath: "/v1/stream",
|
|
209
|
+
name: "lucy-2.1-vton",
|
|
210
|
+
fps: 20,
|
|
211
|
+
width: 1088,
|
|
212
|
+
height: 624,
|
|
213
|
+
inputSchema: z.object({})
|
|
214
|
+
},
|
|
215
|
+
"lucy-restyle": {
|
|
216
|
+
urlPath: "/v1/stream",
|
|
217
|
+
name: "lucy-restyle",
|
|
218
|
+
fps: 25,
|
|
219
|
+
width: 1280,
|
|
220
|
+
height: 704,
|
|
221
|
+
inputSchema: z.object({})
|
|
222
|
+
},
|
|
223
|
+
"lucy-restyle-2": {
|
|
224
|
+
urlPath: "/v1/stream",
|
|
225
|
+
name: "lucy-restyle-2",
|
|
226
|
+
fps: 22,
|
|
227
|
+
width: 1280,
|
|
228
|
+
height: 704,
|
|
229
|
+
inputSchema: z.object({})
|
|
230
|
+
},
|
|
231
|
+
"live-avatar": {
|
|
232
|
+
urlPath: "/v1/stream",
|
|
233
|
+
name: "live-avatar",
|
|
234
|
+
fps: 25,
|
|
235
|
+
width: 1280,
|
|
236
|
+
height: 720,
|
|
237
|
+
inputSchema: z.object({})
|
|
238
|
+
},
|
|
239
|
+
"lucy-latest": {
|
|
240
|
+
urlPath: "/v1/stream",
|
|
241
|
+
name: "lucy-latest",
|
|
242
|
+
fps: 20,
|
|
243
|
+
width: 1088,
|
|
244
|
+
height: 624,
|
|
245
|
+
inputSchema: z.object({})
|
|
246
|
+
},
|
|
247
|
+
"lucy-vton-latest": {
|
|
248
|
+
urlPath: "/v1/stream",
|
|
249
|
+
name: "lucy-vton-latest",
|
|
250
|
+
fps: 20,
|
|
251
|
+
width: 1088,
|
|
252
|
+
height: 624,
|
|
253
|
+
inputSchema: z.object({})
|
|
254
|
+
},
|
|
255
|
+
"lucy-restyle-latest": {
|
|
256
|
+
urlPath: "/v1/stream",
|
|
257
|
+
name: "lucy-restyle-latest",
|
|
258
|
+
fps: 22,
|
|
259
|
+
width: 1280,
|
|
260
|
+
height: 704,
|
|
261
|
+
inputSchema: z.object({})
|
|
262
|
+
},
|
|
114
263
|
mirage: {
|
|
115
264
|
urlPath: "/v1/stream",
|
|
116
265
|
name: "mirage",
|
|
@@ -152,24 +301,71 @@ const _models = {
|
|
|
152
301
|
inputSchema: z.object({})
|
|
153
302
|
}
|
|
154
303
|
},
|
|
155
|
-
image: {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
304
|
+
image: {
|
|
305
|
+
"lucy-image-2": {
|
|
306
|
+
urlPath: "/v1/generate/lucy-image-2",
|
|
307
|
+
queueUrlPath: "/v1/jobs/lucy-image-2",
|
|
308
|
+
name: "lucy-image-2",
|
|
309
|
+
fps: 25,
|
|
310
|
+
width: 1280,
|
|
311
|
+
height: 704,
|
|
312
|
+
inputSchema: modelInputSchemas["lucy-image-2"]
|
|
313
|
+
},
|
|
314
|
+
"lucy-image-latest": {
|
|
315
|
+
urlPath: "/v1/generate/lucy-image-latest",
|
|
316
|
+
queueUrlPath: "/v1/jobs/lucy-image-latest",
|
|
317
|
+
name: "lucy-image-latest",
|
|
318
|
+
fps: 25,
|
|
319
|
+
width: 1280,
|
|
320
|
+
height: 704,
|
|
321
|
+
inputSchema: modelInputSchemas["lucy-image-latest"]
|
|
322
|
+
},
|
|
323
|
+
"lucy-pro-i2i": {
|
|
324
|
+
urlPath: "/v1/generate/lucy-pro-i2i",
|
|
325
|
+
queueUrlPath: "/v1/jobs/lucy-pro-i2i",
|
|
326
|
+
name: "lucy-pro-i2i",
|
|
327
|
+
fps: 25,
|
|
328
|
+
width: 1280,
|
|
329
|
+
height: 704,
|
|
330
|
+
inputSchema: modelInputSchemas["lucy-pro-i2i"]
|
|
331
|
+
}
|
|
332
|
+
},
|
|
164
333
|
video: {
|
|
165
|
-
"lucy-
|
|
166
|
-
urlPath: "/v1/generate/lucy-
|
|
167
|
-
queueUrlPath: "/v1/jobs/lucy-
|
|
168
|
-
name: "lucy-
|
|
334
|
+
"lucy-clip": {
|
|
335
|
+
urlPath: "/v1/generate/lucy-clip",
|
|
336
|
+
queueUrlPath: "/v1/jobs/lucy-clip",
|
|
337
|
+
name: "lucy-clip",
|
|
169
338
|
fps: 25,
|
|
170
339
|
width: 1280,
|
|
171
340
|
height: 704,
|
|
172
|
-
inputSchema: modelInputSchemas["lucy-
|
|
341
|
+
inputSchema: modelInputSchemas["lucy-clip"]
|
|
342
|
+
},
|
|
343
|
+
"lucy-2": {
|
|
344
|
+
urlPath: "/v1/generate/lucy-2",
|
|
345
|
+
queueUrlPath: "/v1/jobs/lucy-2",
|
|
346
|
+
name: "lucy-2",
|
|
347
|
+
fps: 20,
|
|
348
|
+
width: 1280,
|
|
349
|
+
height: 720,
|
|
350
|
+
inputSchema: modelInputSchemas["lucy-2"]
|
|
351
|
+
},
|
|
352
|
+
"lucy-2.1": {
|
|
353
|
+
urlPath: "/v1/generate/lucy-2.1",
|
|
354
|
+
queueUrlPath: "/v1/jobs/lucy-2.1",
|
|
355
|
+
name: "lucy-2.1",
|
|
356
|
+
fps: 20,
|
|
357
|
+
width: 1088,
|
|
358
|
+
height: 624,
|
|
359
|
+
inputSchema: modelInputSchemas["lucy-2.1"]
|
|
360
|
+
},
|
|
361
|
+
"lucy-restyle-2": {
|
|
362
|
+
urlPath: "/v1/generate/lucy-restyle-2",
|
|
363
|
+
queueUrlPath: "/v1/jobs/lucy-restyle-2",
|
|
364
|
+
name: "lucy-restyle-2",
|
|
365
|
+
fps: 22,
|
|
366
|
+
width: 1280,
|
|
367
|
+
height: 704,
|
|
368
|
+
inputSchema: modelInputSchemas["lucy-restyle-2"]
|
|
173
369
|
},
|
|
174
370
|
"lucy-motion": {
|
|
175
371
|
urlPath: "/v1/generate/lucy-motion",
|
|
@@ -180,6 +376,51 @@ const _models = {
|
|
|
180
376
|
height: 704,
|
|
181
377
|
inputSchema: modelInputSchemas["lucy-motion"]
|
|
182
378
|
},
|
|
379
|
+
"lucy-latest": {
|
|
380
|
+
urlPath: "/v1/generate/lucy-latest",
|
|
381
|
+
queueUrlPath: "/v1/jobs/lucy-latest",
|
|
382
|
+
name: "lucy-latest",
|
|
383
|
+
fps: 20,
|
|
384
|
+
width: 1088,
|
|
385
|
+
height: 624,
|
|
386
|
+
inputSchema: modelInputSchemas["lucy-latest"]
|
|
387
|
+
},
|
|
388
|
+
"lucy-restyle-latest": {
|
|
389
|
+
urlPath: "/v1/generate/lucy-restyle-latest",
|
|
390
|
+
queueUrlPath: "/v1/jobs/lucy-restyle-latest",
|
|
391
|
+
name: "lucy-restyle-latest",
|
|
392
|
+
fps: 22,
|
|
393
|
+
width: 1280,
|
|
394
|
+
height: 704,
|
|
395
|
+
inputSchema: modelInputSchemas["lucy-restyle-latest"]
|
|
396
|
+
},
|
|
397
|
+
"lucy-clip-latest": {
|
|
398
|
+
urlPath: "/v1/generate/lucy-clip-latest",
|
|
399
|
+
queueUrlPath: "/v1/jobs/lucy-clip-latest",
|
|
400
|
+
name: "lucy-clip-latest",
|
|
401
|
+
fps: 25,
|
|
402
|
+
width: 1280,
|
|
403
|
+
height: 704,
|
|
404
|
+
inputSchema: modelInputSchemas["lucy-clip-latest"]
|
|
405
|
+
},
|
|
406
|
+
"lucy-motion-latest": {
|
|
407
|
+
urlPath: "/v1/generate/lucy-motion-latest",
|
|
408
|
+
queueUrlPath: "/v1/jobs/lucy-motion-latest",
|
|
409
|
+
name: "lucy-motion-latest",
|
|
410
|
+
fps: 25,
|
|
411
|
+
width: 1280,
|
|
412
|
+
height: 704,
|
|
413
|
+
inputSchema: modelInputSchemas["lucy-motion-latest"]
|
|
414
|
+
},
|
|
415
|
+
"lucy-pro-v2v": {
|
|
416
|
+
urlPath: "/v1/generate/lucy-pro-v2v",
|
|
417
|
+
queueUrlPath: "/v1/jobs/lucy-pro-v2v",
|
|
418
|
+
name: "lucy-pro-v2v",
|
|
419
|
+
fps: 25,
|
|
420
|
+
width: 1280,
|
|
421
|
+
height: 704,
|
|
422
|
+
inputSchema: modelInputSchemas["lucy-pro-v2v"]
|
|
423
|
+
},
|
|
183
424
|
"lucy-restyle-v2v": {
|
|
184
425
|
urlPath: "/v1/generate/lucy-restyle-v2v",
|
|
185
426
|
queueUrlPath: "/v1/jobs/lucy-restyle-v2v",
|
|
@@ -202,16 +443,19 @@ const _models = {
|
|
|
202
443
|
};
|
|
203
444
|
const models = {
|
|
204
445
|
realtime: (model) => {
|
|
446
|
+
warnDeprecated(model);
|
|
205
447
|
const modelDefinition = _models.realtime[model];
|
|
206
448
|
if (!modelDefinition) throw createModelNotFoundError(model);
|
|
207
449
|
return modelDefinition;
|
|
208
450
|
},
|
|
209
451
|
video: (model) => {
|
|
452
|
+
warnDeprecated(model);
|
|
210
453
|
const modelDefinition = _models.video[model];
|
|
211
454
|
if (!modelDefinition) throw createModelNotFoundError(model);
|
|
212
455
|
return modelDefinition;
|
|
213
456
|
},
|
|
214
457
|
image: (model) => {
|
|
458
|
+
warnDeprecated(model);
|
|
215
459
|
const modelDefinition = _models.image[model];
|
|
216
460
|
if (!modelDefinition) throw createModelNotFoundError(model);
|
|
217
461
|
return modelDefinition;
|