@shop-os/modelkit 0.28.0 → 0.29.0

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/catalog.js CHANGED
@@ -5531,6 +5531,7 @@ var KLING_LOGO2 = "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.97.0
5531
5531
  var MINIMAX_LOGO4 = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/f4c2e906-28b7-4a4a-b491-df8fef7808ed.png";
5532
5532
  var BYTEDANCE_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png";
5533
5533
  var XAI_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/858b7fcc-9bd5-411d-aea1-a7b35ecfffab_compressed.png";
5534
+ var LIGHTRICKS_LOGO = "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.97.0/light/lightricks.png";
5534
5535
  var H3_RATIOS = ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"];
5535
5536
  var HAPPY_HORSE_RATIOS = [
5536
5537
  "16:9",
@@ -6129,6 +6130,77 @@ var VIDEO_FAMILY_MODELS = [
6129
6130
  description: "xAI Grok Imagine 1.5: text- and image-to-video at native 1080p with lip-synced audio, or up to 14 reference images and pinned first and last frames at 720p, up to 15 seconds."
6130
6131
  },
6131
6132
  capabilities: {}
6133
+ },
6134
+ {
6135
+ // https://fal.ai/models/fal-ai/ltx-2.3/text-to-video/api (+ /image-to-video): one row;
6136
+ // a start frame routes to image-to-video, else text-to-video. The kit's 2k/4k tiers
6137
+ // are fal's 1440p/2160p (adapters/fal-ltx.ts). "adaptive" is fal's "auto" on
6138
+ // image-to-video; text-to-video leaves an adaptive ratio at fal's 16:9 default.
6139
+ id: "ltx-2.3",
6140
+ aliases: ["ltx-2-3", "ltx23"],
6141
+ label: "LTX 2.3",
6142
+ type: "video",
6143
+ adapter: "fal",
6144
+ providerModelId: "fal-ai/ltx-2.3/text-to-video",
6145
+ lifecycle: "active",
6146
+ exposure: ["cowork", "space_builder"],
6147
+ constraints: {
6148
+ aspectRatios: ["adaptive", "16:9", "9:16"],
6149
+ resolutions: ["1080p", "2k", "4k"],
6150
+ durations: [6, 8, 10],
6151
+ supports: ["generateAudio", "lastFrame", "safetyChecker"],
6152
+ prompt: { referenceSyntax: "numbered", maxChars: 5e3 },
6153
+ audio: "optional"
6154
+ },
6155
+ defaults: {
6156
+ durationSeconds: 6,
6157
+ resolution: "1080p",
6158
+ aspectRatio: "adaptive",
6159
+ generateAudio: true
6160
+ },
6161
+ usage: { ...VIDEO_USAGE },
6162
+ pricingKind: "video_per_second",
6163
+ display: {
6164
+ provider: "lightricks",
6165
+ logo: LIGHTRICKS_LOGO,
6166
+ description: "Lightricks LTX 2.3 open-source text-to-video and start/end-frame image-to-video with native audio; 6, 8 or 10 seconds at up to 4K in landscape or portrait."
6167
+ },
6168
+ capabilities: { lastFrameRequiresFirstFrame: true }
6169
+ },
6170
+ {
6171
+ // https://fal.ai/models/fal-ai/ltx-2.3/text-to-video/fast/api (+ /image-to-video/fast):
6172
+ // the fast tier at the same resolutions; even durations 6-20 s, but over 10 s is
6173
+ // 1080p at 25 fps only (the kit never sends fps, so the rule checks the tier).
6174
+ id: "ltx-2.3-fast",
6175
+ aliases: ["ltx-2-3-fast", "ltx23-fast"],
6176
+ label: "LTX 2.3 Fast",
6177
+ type: "video",
6178
+ adapter: "fal",
6179
+ providerModelId: "fal-ai/ltx-2.3/text-to-video/fast",
6180
+ lifecycle: "active",
6181
+ exposure: ["cowork", "space_builder"],
6182
+ constraints: {
6183
+ aspectRatios: ["adaptive", "16:9", "9:16"],
6184
+ resolutions: ["1080p", "2k", "4k"],
6185
+ durations: [6, 8, 10, 12, 14, 16, 18, 20],
6186
+ supports: ["generateAudio", "lastFrame", "safetyChecker"],
6187
+ prompt: { referenceSyntax: "numbered", maxChars: 5e3 },
6188
+ audio: "optional"
6189
+ },
6190
+ defaults: {
6191
+ durationSeconds: 6,
6192
+ resolution: "1080p",
6193
+ aspectRatio: "adaptive",
6194
+ generateAudio: true
6195
+ },
6196
+ usage: { ...VIDEO_USAGE },
6197
+ pricingKind: "video_per_second",
6198
+ display: {
6199
+ provider: "lightricks",
6200
+ logo: LIGHTRICKS_LOGO,
6201
+ description: "Speed-optimized Lightricks LTX 2.3 Fast text-to-video and start/end-frame image-to-video with native audio; 6-20 seconds at up to 4K, over 10 seconds at 1080p."
6202
+ },
6203
+ capabilities: { lastFrameRequiresFirstFrame: true }
6132
6204
  }
6133
6205
  ];
6134
6206
 
@@ -9993,6 +10065,8 @@ var HAPPY_HORSE = "happyhorse-1.1";
9993
10065
  var HAPPY_HORSE_EDIT = "alibaba/happy-horse/video-edit";
9994
10066
  var VIDU_Q4 = "fal-ai/vidu/q4";
9995
10067
  var OMNIHUMAN_V2 = "bytedance/omnihuman/v2";
10068
+ var LTX_T2V = "fal-ai/ltx-2.3/text-to-video";
10069
+ var LTX_FAST_T2V = "fal-ai/ltx-2.3/text-to-video/fast";
9996
10070
  var KLING_O3_IMAGE_CAP = 7;
9997
10071
  var KLING_V4_IMAGE_CAP = 10;
9998
10072
  var TURBO_AUDIO_MIN_SECONDS = 2;
@@ -10169,6 +10243,20 @@ function imageAndAudio(req, audioSeconds) {
10169
10243
  }
10170
10244
  return inputSeconds("audio", audio, audioSeconds);
10171
10245
  }
10246
+ function ltx(fast) {
10247
+ return (req) => {
10248
+ if (req.lastFrame !== void 0 && req.firstFrame === void 0) {
10249
+ return missing("takes an end frame only together with a start frame");
10250
+ }
10251
+ if (count(req.referenceImages) + count(req.referenceVideos) + count(req.referenceAudios) > 0) {
10252
+ return unsupported2("takes no reference images, videos or audio");
10253
+ }
10254
+ if (fast && (req.durationSeconds ?? 6) > 10 && req.resolution !== void 0 && req.resolution !== "1080p") {
10255
+ return unsupported2("renders over 10 s at 1080p only");
10256
+ }
10257
+ return needsPrompt(req);
10258
+ };
10259
+ }
10172
10260
  var RULES = new Map([
10173
10261
  [MOTION_PRO, motionControl],
10174
10262
  [MOTION_STANDARD, motionControl],
@@ -10192,7 +10280,9 @@ var RULES = new Map([
10192
10280
  [OMNIHUMAN_V2, (req) => imageAndAudio(req, OMNIHUMAN_AUDIO_SECONDS)],
10193
10281
  ...AVATAR_AUDIO.map(
10194
10282
  ([id, limits]) => [id, (req) => imageAndAudio(req, limits)]
10195
- )
10283
+ ),
10284
+ [LTX_T2V, ltx(false)],
10285
+ [LTX_FAST_T2V, ltx(true)]
10196
10286
  ]);
10197
10287
  function falVideoProblem(providerModelId, req) {
10198
10288
  return RULES.get(providerModelId.toLowerCase())?.(req);