@qvac/inference 0.19.1 → 0.20.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/NOTICE +43 -11
- package/dist/api/audio-gen.d.ts +42 -1
- package/dist/api/audio-gen.js +137 -51
- package/dist/api/index.d.ts +2 -1
- package/dist/api/index.js +2 -1
- package/dist/api/text-to-speech.d.ts +31 -4
- package/dist/api/text-to-speech.js +117 -21
- package/dist/api/vector-index.d.ts +142 -0
- package/dist/api/vector-index.js +168 -0
- package/dist/api/world.d.ts +2 -2
- package/dist/errors/index.d.ts +12 -0
- package/dist/errors/index.js +21 -0
- package/dist/handlers/vector-index.d.ts +2 -0
- package/dist/handlers/vector-index.js +40 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/models/registry/models.d.ts +351 -12
- package/dist/models/registry/models.js +2271 -1957
- package/dist/models/registry/resource-profiles.js +135 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-edit-stream.d.ts +2 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-edit-stream.js +65 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-input.d.ts +9 -1
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-input.js +24 -7
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-run.d.ts +46 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-run.js +218 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-stream.d.ts +1 -1
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-stream.js +56 -225
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-understand.d.ts +8 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-understand.js +28 -0
- package/dist/plugins/builtin/audiogen-ggml/plugin.d.ts +248 -0
- package/dist/plugins/builtin/audiogen-ggml/plugin.js +17 -1
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.d.ts +5 -2
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.js +1 -2
- package/dist/plugins/builtin/ggml-ocr/plugin.d.ts +1 -1
- package/dist/plugins/builtin/ggml-ocr/plugin.js +1 -2
- package/dist/plugins/builtin/llamacpp-completion/ops/batch-completion-stream.js +6 -4
- package/dist/plugins/builtin/llamacpp-completion/ops/cache-logger.d.ts +1 -2
- package/dist/plugins/builtin/llamacpp-completion/ops/cache-logger.js +0 -4
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stats.d.ts +1 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stats.js +3 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.d.ts +9 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.js +96 -89
- package/dist/plugins/builtin/llamacpp-completion/ops/context-overflow.d.ts +0 -1
- package/dist/plugins/builtin/llamacpp-completion/ops/context-overflow.js +0 -31
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.d.ts +40 -24
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.js +187 -123
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-state.d.ts +11 -4
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-state.js +18 -16
- package/dist/plugins/builtin/llamacpp-completion/plugin.d.ts +8 -4
- package/dist/plugins/builtin/llamacpp-completion/plugin.js +1 -2
- package/dist/plugins/builtin/llamacpp-embedding/plugin.d.ts +1 -2
- package/dist/plugins/builtin/llamacpp-embedding/plugin.js +2 -38
- package/dist/plugins/builtin/llamacpp-embedding/transform.d.ts +9 -0
- package/dist/plugins/builtin/llamacpp-embedding/transform.js +42 -0
- package/dist/plugins/builtin/nmtcpp-translation/plugin.d.ts +1 -1
- package/dist/plugins/builtin/nmtcpp-translation/plugin.js +1 -2
- package/dist/plugins/builtin/parakeet-transcription/plugin.d.ts +1 -1
- package/dist/plugins/builtin/parakeet-transcription/plugin.js +1 -2
- package/dist/plugins/builtin/sdcpp-generation/ops/video.d.ts +1 -0
- package/dist/plugins/builtin/sdcpp-generation/ops/video.js +8 -2
- package/dist/plugins/builtin/sdcpp-generation/plugin.d.ts +9 -4
- package/dist/plugins/builtin/sdcpp-generation/plugin.js +51 -19
- package/dist/plugins/builtin/tts-ggml/ops/cancel-binding.d.ts +29 -0
- package/dist/plugins/builtin/tts-ggml/ops/cancel-binding.js +66 -0
- package/dist/plugins/builtin/tts-ggml/ops/parler-options.js +10 -0
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.d.ts +3 -5
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.js +143 -28
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.d.ts +5 -2
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.js +182 -66
- package/dist/plugins/builtin/tts-ggml/plugin.d.ts +267 -22
- package/dist/plugins/builtin/tts-ggml/plugin.js +94 -35
- package/dist/plugins/builtin/whispercpp-transcription/plugin.d.ts +1 -1
- package/dist/plugins/builtin/whispercpp-transcription/plugin.js +1 -2
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/ops/load-model.js +22 -2
- package/dist/plugins/ops/translate.js +58 -12
- package/dist/plugins/ops/translatepsy-utils.d.ts +17 -0
- package/dist/plugins/ops/translatepsy-utils.js +32 -0
- package/dist/plugins/registry.d.ts +15 -0
- package/dist/plugins/registry.js +133 -15
- package/dist/plugins/turbovec-backend.d.ts +17 -0
- package/dist/plugins/turbovec-backend.js +99 -0
- package/dist/registry.js +4 -0
- package/dist/resources/model-fit/native-probe/advisory-fit.d.ts +46 -0
- package/dist/resources/model-fit/native-probe/advisory-fit.js +214 -0
- package/dist/resources/model-fit/native-probe/create-llama-fit-request.d.ts +26 -0
- package/dist/resources/model-fit/native-probe/create-llama-fit-request.js +171 -0
- package/dist/resources/model-fit/native-probe/run-in-process-fit.d.ts +42 -0
- package/dist/resources/model-fit/native-probe/run-in-process-fit.js +192 -0
- package/dist/resources/model-fit/native-probe/run-isolated-fit.d.ts +70 -0
- package/dist/resources/model-fit/native-probe/run-isolated-fit.js +372 -0
- package/dist/runtime/env.d.ts +2 -0
- package/dist/runtime/env.js +9 -2
- package/dist/runtime/lifecycle.js +2 -0
- package/dist/runtime/model-registry.d.ts +3 -1
- package/dist/runtime/model-registry.js +2 -1
- package/dist/runtime/request-context.js +17 -0
- package/dist/runtime/vector-index-backend.d.ts +25 -0
- package/dist/runtime/vector-index-backend.js +1 -0
- package/dist/runtime/vector-index-registry.d.ts +76 -0
- package/dist/runtime/vector-index-registry.js +161 -0
- package/dist/schemas/assess-model-fit.d.ts +44 -0
- package/dist/schemas/assess-model-fit.js +40 -0
- package/dist/schemas/audio-gen.d.ts +479 -4
- package/dist/schemas/audio-gen.js +376 -17
- package/dist/schemas/batch-completion-stream.d.ts +7 -0
- package/dist/schemas/batch-completion-stream.js +5 -3
- package/dist/schemas/common.d.ts +749 -15
- package/dist/schemas/common.js +8 -1
- package/dist/schemas/completion-event.d.ts +11 -1
- package/dist/schemas/completion-event.js +3 -0
- package/dist/schemas/completion-stream.d.ts +20 -0
- package/dist/schemas/completion-stream.js +41 -4
- package/dist/schemas/config.d.ts +48 -30
- package/dist/schemas/errors.d.ts +4 -0
- package/dist/schemas/errors.js +22 -0
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/llamacpp-config.d.ts +4 -8
- package/dist/schemas/llamacpp-config.js +4 -4
- package/dist/schemas/load-model.d.ts +2503 -139
- package/dist/schemas/model-config-schemas.d.ts +228 -5
- package/dist/schemas/plugin.d.ts +10 -0
- package/dist/schemas/sdcpp-config.d.ts +221 -4
- package/dist/schemas/sdcpp-config.js +128 -22
- package/dist/schemas/text-to-speech.d.ts +780 -19
- package/dist/schemas/text-to-speech.js +298 -44
- package/dist/schemas/transcription-config.js +7 -4
- package/dist/schemas/vector-index.d.ts +194 -0
- package/dist/schemas/vector-index.js +185 -0
- package/dist/utils/addon-responses.d.ts +29 -3
- package/dist/utils/aggregate-events.d.ts +3 -1
- package/dist/utils/aggregate-events.js +7 -1
- package/dist/utils/tts-stats.d.ts +15 -11
- package/dist/utils/tts-stats.js +33 -11
- package/package.json +28 -25
|
@@ -41,6 +41,24 @@ const cacheModeSchema = z.enum([
|
|
|
41
41
|
'taylorseer',
|
|
42
42
|
'cache-dit'
|
|
43
43
|
]);
|
|
44
|
+
function removedBackendOption(key, guidance) {
|
|
45
|
+
return (z
|
|
46
|
+
.custom(() => false, {
|
|
47
|
+
// Keep unions from replacing the migration error with a fallback error.
|
|
48
|
+
abort: false,
|
|
49
|
+
error: (issue) => `${key} is no longer supported. ` +
|
|
50
|
+
(issue.input === false ||
|
|
51
|
+
issue.input === 0 ||
|
|
52
|
+
issue.input === 'false' ||
|
|
53
|
+
issue.input === '0'
|
|
54
|
+
? 'Remove it; no replacement is needed when it is false.'
|
|
55
|
+
: guidance)
|
|
56
|
+
})
|
|
57
|
+
.optional()
|
|
58
|
+
.describe(`Removed. ${guidance}`)
|
|
59
|
+
// JSON Schema cannot infer the custom check's rejection of every value.
|
|
60
|
+
.meta({ not: {}, deprecated: true }));
|
|
61
|
+
}
|
|
44
62
|
export const sdcppConfigSchema = z.object({
|
|
45
63
|
mode: z
|
|
46
64
|
.enum(['diffusion', 'upscale', 'video', 'world'])
|
|
@@ -56,7 +74,9 @@ export const sdcppConfigSchema = z.object({
|
|
|
56
74
|
'The video layout is selected from the auxiliary sources: supplying ' +
|
|
57
75
|
'`embeddingsConnectorsModelSrc` loads the LTX-2 layout (Gemma text encoder ' +
|
|
58
76
|
'via `llmModelSrc` + video VAE + connectors, optional `audioVaeModelSrc` for ' +
|
|
59
|
-
'synchronized audio)
|
|
77
|
+
'synchronized audio). Without connectors, `llmModelSrc` + `vaeModelSrc` + ' +
|
|
78
|
+
'`audioVaeModelSrc` selects MiniMax-H3 text-to-audio-video; otherwise ' +
|
|
79
|
+
'the Wan layout is used (UMT5 text encoder ' +
|
|
60
80
|
'via `t5XxlModelSrc` + VAE). ' +
|
|
61
81
|
'On React Native, loading the video model on-device will likely fail ' +
|
|
62
82
|
'because the video diffusion models currently ' +
|
|
@@ -115,8 +135,6 @@ export const sdcppConfigSchema = z.object({
|
|
|
115
135
|
.enum(['cpu', 'cuda', 'std_default'])
|
|
116
136
|
.optional()
|
|
117
137
|
.describe('Sampler RNG type override. Default: auto (follows `rng`).'),
|
|
118
|
-
clip_on_cpu: z.boolean().optional().describe('Force CLIP text encoder to run on CPU'),
|
|
119
|
-
vae_on_cpu: z.boolean().optional().describe('Force VAE decoder to run on CPU'),
|
|
120
138
|
vae_auto_cpu_fallback: z
|
|
121
139
|
.boolean()
|
|
122
140
|
.optional()
|
|
@@ -131,7 +149,46 @@ export const sdcppConfigSchema = z.object({
|
|
|
131
149
|
offload_to_cpu: z
|
|
132
150
|
.boolean()
|
|
133
151
|
.optional()
|
|
134
|
-
.describe('Keep model weights in CPU memory and offload them during GPU compute'
|
|
152
|
+
.describe('Keep model weights in CPU memory and offload them during GPU compute. ' +
|
|
153
|
+
"Supplies a '*=cpu' parameter residency default; explicit params_backend assignments override it per module."),
|
|
154
|
+
control_net_cpu: removedBackendOption('control_net_cpu', "Use modelConfig.backend: 'controlnet=cpu' to run the ControlNet graph on CPU."),
|
|
155
|
+
clip_on_cpu: removedBackendOption('clip_on_cpu', "Use modelConfig.params_backend: 'te=cpu' to keep text encoder parameters in CPU RAM, " +
|
|
156
|
+
"or modelConfig.backend: 'te=cpu' to run its graph on CPU."),
|
|
157
|
+
vae_on_cpu: removedBackendOption('vae_on_cpu', "Use modelConfig.params_backend: 'vae=cpu' to keep VAE parameters in CPU RAM, " +
|
|
158
|
+
"or modelConfig.backend: 'vae=cpu' to run its graph on CPU."),
|
|
159
|
+
backend: z
|
|
160
|
+
.string()
|
|
161
|
+
.max(4096)
|
|
162
|
+
.optional()
|
|
163
|
+
.describe('Runtime backend for diffusion and video graphs, globally or per module, ' +
|
|
164
|
+
"for example 'cuda0' or 'diffusion=vulkan0,te=cpu,vae=cpu'."),
|
|
165
|
+
params_backend: z
|
|
166
|
+
.string()
|
|
167
|
+
.max(4096)
|
|
168
|
+
.optional()
|
|
169
|
+
.describe('Parameter residency for diffusion and video, independent of graph execution. ' +
|
|
170
|
+
"'diffusion=cpu' stages weights from CPU RAM; 'diffusion=disk' reads weights " +
|
|
171
|
+
'from the local model file on demand and releases them after use. Disk is ' +
|
|
172
|
+
'never selected automatically. With offload_to_cpu enabled, explicit ' +
|
|
173
|
+
'assignments override CPU residency only for the specified modules.'),
|
|
174
|
+
max_vram: z
|
|
175
|
+
// No .max() on the string arm: a constraint here makes datamodel-codegen
|
|
176
|
+
// wrap it in a `MaxVram(RootModel[str])`, so Python callers read back a
|
|
177
|
+
// wrapper instead of a str. backend/params_backend keep their cap because
|
|
178
|
+
// they are not union members. The addon parses the spec either way.
|
|
179
|
+
.union([z.number().finite(), z.string()])
|
|
180
|
+
.optional()
|
|
181
|
+
.describe('VRAM budget in GiB for diffusion and video graph-cut execution. Positive ' +
|
|
182
|
+
'values set a budget; negative values use free VRAM minus the absolute ' +
|
|
183
|
+
'value as headroom; 0 disables graph cutting. Accepts per-device assignments ' +
|
|
184
|
+
"such as 'cuda0=6,vulkan0=4'. Works without stream_layers. Default: 0."),
|
|
185
|
+
stream_layers: z
|
|
186
|
+
.boolean()
|
|
187
|
+
.optional()
|
|
188
|
+
.describe('Prefetch and evict diffusion layers from CPU RAM in diffusion and video ' +
|
|
189
|
+
'mode. Only takes effect with graph cutting enabled by max_vram and CPU ' +
|
|
190
|
+
'diffusion parameter residency. Does not stream from disk; use ' +
|
|
191
|
+
"params_backend: 'diffusion=disk' for on-demand file reads. Default: false."),
|
|
135
192
|
flash_attn: z.boolean().optional().describe('Enable flash attention to reduce memory usage'),
|
|
136
193
|
diffusion_fa: z
|
|
137
194
|
.boolean()
|
|
@@ -164,11 +221,11 @@ export const sdcppConfigSchema = z.object({
|
|
|
164
221
|
llmModelSrc: modelSrcInputSchema
|
|
165
222
|
.optional()
|
|
166
223
|
.describe('LLM text encoder model — required for FLUX.2 [klein] (Qwen3), ' +
|
|
167
|
-
'Ideogram 4 (Qwen3-VL),
|
|
224
|
+
'Ideogram 4 (Qwen3-VL), LTX-2 video (Gemma), and MiniMax-H3 (H3-specific Qwen3-VL).'),
|
|
168
225
|
vaeModelSrc: modelSrcInputSchema
|
|
169
226
|
.optional()
|
|
170
|
-
.describe('VAE decoder model — required for FLUX.2 [klein], Ideogram 4,
|
|
171
|
-
'LTX-2 video
|
|
227
|
+
.describe('VAE decoder model — required for FLUX.2 [klein], Ideogram 4, ' +
|
|
228
|
+
'LTX-2 video, and MiniMax-H3 video; optional for SDXL.'),
|
|
172
229
|
highNoiseDiffusionModelSrc: modelSrcInputSchema
|
|
173
230
|
.optional()
|
|
174
231
|
.describe('High-noise diffusion expert — required for Wan 2.2 A14B ' +
|
|
@@ -188,9 +245,9 @@ export const sdcppConfigSchema = z.object({
|
|
|
188
245
|
'Not used by LTX-2 (its img2vid path needs no CLIP-vision projection).'),
|
|
189
246
|
audioVaeModelSrc: modelSrcInputSchema
|
|
190
247
|
.optional()
|
|
191
|
-
.describe('Audio VAE decoder model —
|
|
192
|
-
'
|
|
193
|
-
'
|
|
248
|
+
.describe('Audio VAE decoder model — required for MiniMax-H3, optional for LTX-2. ' +
|
|
249
|
+
'Enables synchronized audio muxed into the output AVI. ' +
|
|
250
|
+
'Omit for silent LTX-2 video; unsupported by Wan.'),
|
|
194
251
|
embeddingsConnectorsModelSrc: modelSrcInputSchema
|
|
195
252
|
.optional()
|
|
196
253
|
.describe('Text-embedding connector weights — required for LTX-2 video. Its ' +
|
|
@@ -404,7 +461,7 @@ export const videoStatsSchema = diffusionStatsSchema
|
|
|
404
461
|
hasAudio: z
|
|
405
462
|
.boolean()
|
|
406
463
|
.optional()
|
|
407
|
-
.describe('True when the output AVI includes a muxed audio track (LTX-2 loaded ' +
|
|
464
|
+
.describe('True when the output AVI includes a muxed audio track (MiniMax-H3 or LTX-2 loaded ' +
|
|
408
465
|
'with audioVaeModelSrc), false otherwise.'),
|
|
409
466
|
audioSampleRate: z
|
|
410
467
|
.number()
|
|
@@ -603,8 +660,8 @@ const videoGenerationBaseSchema = z.object({
|
|
|
603
660
|
.positive()
|
|
604
661
|
.multipleOf(16)
|
|
605
662
|
.optional()
|
|
606
|
-
.describe('Video width in pixels (must be a multiple of 16). LTX-2 and Wan 2.2 ' +
|
|
607
|
-
'TI2V-5B additionally require a multiple of 32. LTX-2
|
|
663
|
+
.describe('Video width in pixels (must be a multiple of 16). LTX-2, MiniMax-H3 and Wan 2.2 ' +
|
|
664
|
+
'TI2V-5B additionally require a multiple of 32. LTX-2 and MiniMax-H3 are validated ' +
|
|
608
665
|
'against the loaded model before generation; the TI2V requirement is ' +
|
|
609
666
|
'enforced natively, derived from the loaded GGUF rather than its filename.'),
|
|
610
667
|
height: z
|
|
@@ -613,20 +670,17 @@ const videoGenerationBaseSchema = z.object({
|
|
|
613
670
|
.positive()
|
|
614
671
|
.multipleOf(16)
|
|
615
672
|
.optional()
|
|
616
|
-
.describe('Video height in pixels (must be a multiple of 16). LTX-2 and Wan 2.2 ' +
|
|
617
|
-
'TI2V-5B additionally require a multiple of 32. LTX-2
|
|
673
|
+
.describe('Video height in pixels (must be a multiple of 16). LTX-2, MiniMax-H3 and Wan 2.2 ' +
|
|
674
|
+
'TI2V-5B additionally require a multiple of 32. LTX-2 and MiniMax-H3 are validated ' +
|
|
618
675
|
'against the loaded model before generation; the TI2V requirement is ' +
|
|
619
676
|
'enforced natively, derived from the loaded GGUF rather than its filename.'),
|
|
620
677
|
video_frames: z
|
|
621
678
|
.number()
|
|
622
679
|
.int()
|
|
623
|
-
.
|
|
624
|
-
message: 'video_frames must be an integer >= 5 of the form (4*k + 1)'
|
|
625
|
-
})
|
|
680
|
+
.positive()
|
|
626
681
|
.optional()
|
|
627
|
-
.describe('Frame count
|
|
628
|
-
'LTX-2
|
|
629
|
-
'validated against the loaded model before generation.'),
|
|
682
|
+
.describe('Frame count validated against the loaded model: Wan uses 4*k+1 (k>=1), ' +
|
|
683
|
+
'LTX-2 uses 8*k+1 (9–257 frames), and MiniMax-H3 uses 17*k+5 (k>=0).'),
|
|
630
684
|
fps: z
|
|
631
685
|
.number()
|
|
632
686
|
.positive()
|
|
@@ -805,7 +859,7 @@ function refineLtxVideoRequest(data, ctx) {
|
|
|
805
859
|
});
|
|
806
860
|
}
|
|
807
861
|
if (data.video_frames !== undefined &&
|
|
808
|
-
(data.video_frames > 257 || (data.video_frames - 1) % 8 !== 0)) {
|
|
862
|
+
(data.video_frames < 9 || data.video_frames > 257 || (data.video_frames - 1) % 8 !== 0)) {
|
|
809
863
|
ctx.addIssue({
|
|
810
864
|
code: 'custom',
|
|
811
865
|
path: ['video_frames'],
|
|
@@ -848,6 +902,58 @@ function refineLtxVideoRequest(data, ctx) {
|
|
|
848
902
|
}
|
|
849
903
|
}
|
|
850
904
|
export const ltxVideoRequestSchema = videoRequestSchema.superRefine(refineLtxVideoRequest);
|
|
905
|
+
export const wanVideoRequestSchema = videoRequestSchema.superRefine((data, ctx) => {
|
|
906
|
+
if (data.video_frames !== undefined &&
|
|
907
|
+
(data.video_frames < 5 || (data.video_frames - 1) % 4 !== 0)) {
|
|
908
|
+
ctx.addIssue({
|
|
909
|
+
code: 'custom',
|
|
910
|
+
path: ['video_frames'],
|
|
911
|
+
message: 'Wan video_frames must be an integer >= 5 of the form (4*k + 1).'
|
|
912
|
+
});
|
|
913
|
+
}
|
|
914
|
+
});
|
|
915
|
+
export const h3VideoRequestSchema = videoRequestSchema.superRefine((data, ctx) => {
|
|
916
|
+
for (const field of ['width', 'height']) {
|
|
917
|
+
if (data[field] !== undefined && data[field] % 32 !== 0) {
|
|
918
|
+
ctx.addIssue({
|
|
919
|
+
code: 'custom',
|
|
920
|
+
path: [field],
|
|
921
|
+
message: `MiniMax-H3 ${field} must be a multiple of 32.`
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
if (data.video_frames !== undefined &&
|
|
926
|
+
(data.video_frames < 5 || (data.video_frames - 5) % 17 !== 0)) {
|
|
927
|
+
ctx.addIssue({
|
|
928
|
+
code: 'custom',
|
|
929
|
+
path: ['video_frames'],
|
|
930
|
+
message: 'MiniMax-H3 video_frames must satisfy 17*k+5, where k>=0.'
|
|
931
|
+
});
|
|
932
|
+
}
|
|
933
|
+
for (const [field, value] of [
|
|
934
|
+
['mode', 'txt2vid'],
|
|
935
|
+
['fps', 24],
|
|
936
|
+
['cfg_scale', 1],
|
|
937
|
+
['scheduler', 'discrete']
|
|
938
|
+
]) {
|
|
939
|
+
if (data[field] !== undefined && data[field] !== value) {
|
|
940
|
+
ctx.addIssue({
|
|
941
|
+
code: 'custom',
|
|
942
|
+
path: [field],
|
|
943
|
+
message: `MiniMax-H3 requires ${field} to be ${value}.`
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
for (const field of ['init_image', 'control_frames', 'vace_strength', 'strength']) {
|
|
948
|
+
if (data[field] !== undefined) {
|
|
949
|
+
ctx.addIssue({
|
|
950
|
+
code: 'custom',
|
|
951
|
+
path: [field],
|
|
952
|
+
message: `MiniMax-H3 does not support ${field}.`
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
});
|
|
851
957
|
const nonLtxVideoMask = {
|
|
852
958
|
lora: true,
|
|
853
959
|
lora_strength: true,
|