@sogni-ai/sogni-creative-agent-skill 3.25.0 → 3.26.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sogni-creative-agent",
3
- "version": "3.25.0",
3
+ "version": "3.26.0",
4
4
  "description": "Sogni Creative Agent: image, video, and music generation via Sogni AI's decentralized GPU network. Supports personas, persistent memories, style transfer, and multi-step creative workflows.",
5
5
  "author": {
6
6
  "name": "Sogni AI",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sogni-creative-agent",
3
- "version": "3.25.0",
3
+ "version": "3.26.0",
4
4
  "description": "Create images, generative video, music, and polished image-folder loops with Sogni AI.",
5
5
  "author": {
6
6
  "name": "Sogni AI",
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [3.26.0](https://github.com/Sogni-AI/sogni-creative-agent-skill/compare/v3.25.0...v3.26.0) (2026-08-04)
2
+
3
+
4
+ ### Features
5
+
6
+ * **video:** support MiniMax H3 multimodal workflows ([d9f1737](https://github.com/Sogni-AI/sogni-creative-agent-skill/commit/d9f17378db498d73bf231b286affe34f26b97c57))
7
+
1
8
  # [3.25.0](https://github.com/Sogni-AI/sogni-creative-agent-skill/compare/v3.24.0...v3.25.0) (2026-08-04)
2
9
 
3
10
 
package/README.md CHANGED
@@ -407,6 +407,13 @@ sogni-agent --video -m seedance2 --workflow t2v \
407
407
  --ref-audio https://cdn.example.com/music.m4a \
408
408
  "Use @Image1 for product identity, @Video1 for camera movement, and @Audio1 for music rhythm"
409
409
 
410
+ # MiniMax H3 text/image/reference-to-video (native 32 kHz stereo audio)
411
+ sogni-agent --video -m minimax-h3 --duration 10 "<timed H3 prose prompt with audio direction>"
412
+ sogni-agent --video -m minimax-h3-i2v --ref first.png --duration 8 "<H3 image-to-video prompt>"
413
+ sogni-agent --video -m minimax-h3-r2v --ref identity.png -c wardrobe.png \
414
+ --ref-video motion.mp4 --ref-audio voice.m4a \
415
+ "<Picture 1> controls identity. <Picture 2> controls wardrobe. <Video 1> controls motion. <Audio 1> controls voice."
416
+
410
417
  # Image-to-video (i2v; defaults to wan_v2.2-14b-fp8_i2v_lightx2v)
411
418
  sogni-agent --video --ref cat.jpg "gentle camera pan"
412
419
 
@@ -514,9 +521,10 @@ Run `sogni-agent --help` for the full CLI. Below are the options and tables most
514
521
  | `--video` | Generate video instead of image |
515
522
  | `--music` | Generate music/audio instead of image |
516
523
  | `--lyrics`, `--bpm`, `--keyscale`, `--timesig` | Music generation controls |
517
- | `--ref`, `--ref-audio`, `--ref-video` | Image/audio/video references; HTTPS refs are forwarded as URL context for Seedance |
524
+ | `--ref`, `-c`, `--ref-audio`, `--ref-video` | Frame/loose image/audio/video references; audio/video repeat for H3 r2v and Seedance loose refs |
518
525
  | `--target-resolution <px>` | Target the short side, preserving aspect ratio |
519
- | `--workflow <type>` | Force `t2v`, `i2v`, `s2v`, `ia2v`, `a2v`, `v2v`, or animate workflows |
526
+ | `--workflow <type>` | Force `t2v`, `i2v`, `r2v`, `s2v`, `ia2v`, `a2v`, `v2v`, or animate workflows |
527
+ | `--generate-audio`, `--no-generate-audio` | Keep or strip MiniMax H3's generated audio track; also controls generated-keyframe workflows |
520
528
  | `--api-chat` | Use `/v1/chat/completions` with Sogni creative-agent tools |
521
529
  | `--api-workflow` | Start a `/v1/creative-agent/workflows` durable workflow with explicit `input.steps`; optional `storyboard-video` preset |
522
530
  | `--workflow-input <json\|@path>` | Explicit durable workflow input JSON. Use `@path` to load JSON from a file. |
@@ -577,6 +585,7 @@ Prefer `-Q fast|hq|pro` for images and automatic workflow routing for video. Pas
577
585
  | MiniMax H3 text-to-video with native stereo audio | `minimax-h3` or `minimax-h3-t2v` |
578
586
  | MiniMax H3 image-to-video | `minimax-h3-i2v` |
579
587
  | MiniMax H3 first-frame → last-frame video | `minimax-h3-flf2v` with `--ref A --ref-end B` |
588
+ | MiniMax H3 reference-to-video | `minimax-h3-r2v` with up to 9 images, 3 videos, 3 audios / 12 files total |
580
589
  | Text-to-video with native dialogue/audio | `ltx23-22b-fp8_t2v_distilled` |
581
590
  | Explicit uncensored image-to-video on 30GB+ GPUs | `ltx23-eros` with `--no-filter` |
582
591
  | Image+audio-to-video | `ltx23-22b-fp8_ia2v_distilled` |
@@ -595,7 +604,7 @@ Music generation uses `--music` and outputs `mp3` by default. `--audio` remains
595
604
  ## Video Sizing & Aspect Ratios
596
605
 
597
606
  - **WAN models** use dimensions divisible by 16, min 480 px, max 1536 px.
598
- - **MiniMax H3** uses a 32 px grid, fixed 24 fps, native 32 kHz stereo audio, 124–362 frames (`124 + n×17`, i.e. 5.17–15.08 s), and a 1,032,192-pixel render cap (normally 1344×768 or 768×1344). Steps 20 and guidance 1 are fixed and it takes no negative prompt (state negatives in the prompt text instead). Its prompt is natural cinematic prose — a timed shot list with bracketed timecodes plus explicit audio direction works best; see `references/video-prompting.md` § MiniMax H3 Prompting. This is the 768p-class open-weights release, not MiniMax's hosted 2K stage. The initial Sogni release requires a 32 GB-class worker.
607
+ - **MiniMax H3** uses a 32 px grid, fixed 24 fps, native 32 kHz stereo audio, 124–362 frames (`124 + n×17`, i.e. 5.17–15.08 s), and a 1,032,192-pixel render cap (normally 1344×768 or 768×1344). Steps 20 and guidance 1 are fixed and it takes no negative prompt (state negatives in the prompt text instead). Its prompt is natural cinematic prose — a timed shot list with bracketed timecodes plus explicit audio direction works best; see `references/video-prompting.md` § MiniMax H3 Prompting. The separate `minimax-h3-r2v` checkpoint accepts up to 9 images (`--ref` plus `-c`), 3 videos, and 3 audios, capped at 12 files; at least one image is required, r2v is never inferred, and prompts use per-type `<Picture 1>` / `<Video 1>` / `<Audio 1>` tags. `--no-generate-audio` strips the jointly generated track from the result. This is the 768p-class open-weights release, not MiniMax's hosted 2K stage. The initial Sogni release requires a 32 GB-class worker.
599
608
  - **LTX family** (`ltx2-*`, `ltx23-*`) uses dimensions divisible by 64. The current wrapper caps non-WAN video dimensions at 2048 px on the long side.
600
609
  - **Seedance** runs at fixed 24 fps and supports 4–15 s durations. Full `seedance2` supports native 4K via `--target-resolution 2160`; `seedance2-mini` and `seedance2-fast` remain capped to the 720p lower-resolution path. Other default/WAN paths support up to 10 s; LTX and WAN animate workflows support up to 20 s.
601
610
  - For spoken dialogue, budget roughly 3 words per second plus about 1 second for each meaningful acting beat or pause. Keep quoted speech under the model's hard per-clip word budget.
package/SKILL.md CHANGED
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: sogni-creative-agent-skill
3
- description: "Sogni Creative Agent Skill: agent skill and CLI for image, video, and music generation using Sogni AI's decentralized GPU network. Supports one-click image-folder loop reels, personas (named people with saved reference photos and voice clips), persistent memories, custom personality, style transfer, angle synthesis, Seedance/HappyHorse/LTX/WAN video, music/lyrics, hosted chat, durable workflows, replay records, and multi-step creative workflows. Ask the agent to \"draw\", \"generate\", \"create an image\", \"make a video/animate\", \"turn this image folder into a loop\", \"make music\", \"apply a style\", or \"generate me as a superhero\"."
3
+ description: "Sogni Creative Agent Skill: agent skill and CLI for image, video, and music generation using Sogni AI's decentralized GPU network. Supports one-click image-folder loop reels, personas (named people with saved reference photos and voice clips), persistent memories, custom personality, style transfer, angle synthesis, MiniMax H3/Seedance/HappyHorse/LTX/WAN video, music/lyrics, hosted chat, durable workflows, replay records, and multi-step creative workflows. Ask the agent to \"draw\", \"generate\", \"create an image\", \"make a video/animate\", \"turn this image folder into a loop\", \"make music\", \"apply a style\", or \"generate me as a superhero\"."
4
4
  metadata:
5
- version: "3.25.0"
5
+ version: "3.26.0"
6
6
  homepage: https://sogni.ai
7
7
  openclaw:
8
8
  emoji: "🎨"
@@ -168,10 +168,11 @@ sogni-agent --video -m seedance2 --target-resolution 2160 --duration 8 "A polish
168
168
 
169
169
  # MiniMax H3 (fixed 24fps, native stereo audio + dialogue; natural prose prompt
170
170
  # with a timed shot list and audio direction — see references/video-prompting.md).
171
- # t2v default; --ref = i2v; --ref + --ref-end = flf2v.
171
+ # t2v default; --ref = i2v; --ref + --ref-end = flf2v; r2v is explicit.
172
172
  sogni-agent --video -m minimax-h3 --duration 10 -w 1344 -h 768 "<H3 prose prompt>"
173
173
  sogni-agent --video -m minimax-h3-i2v --ref first.png --duration 8 "<H3 prose prompt>"
174
174
  sogni-agent --video -m minimax-h3-flf2v --ref first.png --ref-end last.png --duration 8 "<H3 prose prompt>"
175
+ sogni-agent --video -m minimax-h3-r2v --ref identity.png -c wardrobe.png --ref-video motion.mp4 --ref-audio voice.m4a "<H3 prompt using <Picture 1>/<Picture 2>/<Video 1>/<Audio 1>>"
175
176
 
176
177
  # HappyHorse 1.1 (3-15s vendor video, fixed 24fps, native audio). t2v default;
177
178
  # i2v from one first-frame image (--ref); r2v from 1-9 reference images (-c).
@@ -204,8 +205,9 @@ sogni-agent doctor --json
204
205
  | `-w` / `-h` | Width / height | 512×512 |
205
206
  | `-n <num>` | Output count (`{a\|b\|c}` prompt variations cycle); capped at 16, raise with `SOGNI_MAX_COUNT` | 1 |
206
207
  | `--video`, `--music` | Generate video / music instead of image | - |
207
- | `--workflow <t>` | Force `t2v\|i2v\|s2v\|ia2v\|a2v\|v2v\|animate-move\|animate-replace` | inferred |
208
- | `--ref`, `--ref-end`, `--ref-audio`, `--ref-video`, `--mask` | Start frame / end frame / audio / video / inpaint mask references | - |
208
+ | `--workflow <t>` | Force `t2v\|i2v\|r2v\|s2v\|ia2v\|a2v\|v2v\|animate-move\|animate-replace` | inferred |
209
+ | `--ref`, `-c`, `--ref-end`, `--ref-audio`, `--ref-video`, `--mask` | Frame / loose image / audio / video / mask references; audio/video repeat for H3 r2v | - |
210
+ | `--generate-audio`, `--no-generate-audio` | Keep or strip MiniMax H3's jointly generated audio track | keep |
209
211
  | `--control-type`, `--outpaint-position`, `--outpaint-aspect-ratio` | LTX-2.3 v2v control mode and outpaint canvas controls | - |
210
212
  | `--duration <sec>` | Video or music length | video 5, music 30 |
211
213
  | `--target-resolution <px>` | Short-side target preserving aspect ratio (use `2160` for Seedance 4K) | - |
@@ -251,7 +253,7 @@ tokens in that scoped reference rather than ordinary model recommendations.
251
253
 
252
254
  ### High-res video
253
255
 
254
- MiniMax H3 is an explicit model choice, not a universal default. Use `-m minimax-h3` for text-to-video, `-m minimax-h3-i2v --ref A` for first-frame animation, or `-m minimax-h3-flf2v --ref A --ref-end B` for a first/last-frame transition. H3 generates picture and **native 32 kHz stereo audio jointly** at fixed 24 fps, so dialogue, foley, and score must be described in the prompt. `generateAudio=false` can strip that generated track from the delivered file; it does not skip audio generation. Frames snap to the `124 + n×17` grid (5.17-15.08 s); use `-w 1344 -h 768` or `-w 768 -h 1344`; send no steps, guidance, sampler, scheduler, or negative prompt. It is the 768p-class open-weights release — do not claim 2K. The initial Sogni release is routed to 32 GB-class workers.
256
+ MiniMax H3 is an explicit model choice, not a universal default. Use `-m minimax-h3` for text-to-video, `-m minimax-h3-i2v --ref A` for first-frame animation, `-m minimax-h3-flf2v --ref A --ref-end B` for a first/last-frame transition, or explicitly select `-m minimax-h3-r2v` for a loose reference set. H3 r2v accepts up to **9 images** (`--ref` then repeatable `-c`), **3 videos** (repeat `--ref-video`), and **3 audio clips** (repeat `--ref-audio`), with **12 files total** and at least one image; it is never inferred. Address them as `<Picture 1>`, `<Video 1>`, and `<Audio 1>` in per-type submission order, give every reference one job, and never use `--ref-end` for r2v. H3 generates picture and **native 32 kHz stereo audio jointly** at fixed 24 fps, so dialogue, foley, and score must be described in the prompt. `--no-generate-audio` strips that generated track from the delivered file; it does not skip audio generation. Frames snap to the `124 + n×17` grid (5.17-15.08 s); use `-w 1344 -h 768` or `-w 768 -h 1344`; send no steps, guidance, sampler, scheduler, or negative prompt. It is the 768p-class open-weights release — do not claim 2K. The initial Sogni release is routed to 32 GB-class workers.
255
257
 
256
258
  **H3 takes natural cinematic prose**, not a required structured document. Expand the user's one-liner into a directed scene: a **timed shot list** with bracketed timecodes (`[0-2 seconds] …`) for anything longer than one beat, deliberate **audio direction** (ambience, specific SFX, music by instrumentation and timing; say so when you want no music), dialogue as ordinary quoted prose, and negative direction stated in the prompt text since there is no negative-prompt field. MiniMax's `<d>[Language] …</d>` + `(S1)` markup and three-field IR document are optional input forms; never invent or strip that markup when a user supplied it. Read [`references/video-prompting.md`](./references/video-prompting.md) § MiniMax H3 Prompting before writing an H3 prompt.
257
259
 
@@ -2,7 +2,7 @@
2
2
  "manifest_version": "0.3",
3
3
  "name": "sogni-creative-agent",
4
4
  "display_name": "Sogni Creative Agent",
5
- "version": "3.25.0",
5
+ "version": "3.26.0",
6
6
  "description": "Generate images, video, and music on Sogni AI's decentralized GPU network — with personas, memories, and safe video editing tools.",
7
7
  "author": { "name": "Sogni AI", "url": "https://sogni.ai" },
8
8
  "homepage": "https://sogni.ai",
@@ -75,6 +75,8 @@ export const TOOLS = [
75
75
  'Generate a video from a text prompt, optionally driven by reference media. ' +
76
76
  'ref = start frame image (alone defaults to wan_v2.2-14b-fp8_i2v_lightx2v), ' +
77
77
  'ref_end = end frame (with ref, defaults to ltx23-22b-fp8_i2v_distilled and its auto-applied transition/morph LoRA), ' +
78
+ 'MiniMax H3 supports t2v, i2v, first/last-frame, and r2v; H3 r2v accepts up to 9 images, 3 videos, ' +
79
+ 'and 3 audios (12 files total) through the repeatable reference arrays and uses <Picture 1>/<Video 1>/<Audio 1> prompt tags. ' +
78
80
  'ref_audio = soundtrack/lip-sync audio, ref_video = motion reference. ' +
79
81
  'Rendering takes minutes; prefer output_path (absolute .mp4). ' + CHAT_ATTACHMENT_NOTE,
80
82
  inputSchema: {
@@ -83,12 +85,16 @@ export const TOOLS = [
83
85
  prompt: str('Motion/scene description'),
84
86
  output_path: str('Absolute .mp4 path to save (optional)'),
85
87
  model: str('Video model id (optional)'),
86
- workflow: { type: 'string', enum: ['t2v', 'i2v', 's2v', 'ia2v', 'a2v', 'v2v', 'animate-move', 'animate-replace'] },
88
+ workflow: { type: 'string', enum: ['t2v', 'i2v', 'r2v', 's2v', 'ia2v', 'a2v', 'v2v', 'animate-move', 'animate-replace'] },
87
89
  duration: num('Duration in seconds (default 5)'),
88
- ref: str('Absolute path or URL of the start-frame image'),
90
+ ref: str('Absolute path or URL of the start-frame image; loose Picture 1 for MiniMax H3 r2v'),
89
91
  ref_end: str('Absolute path or URL of the end-frame image'),
90
92
  ref_audio: str('Absolute path or URL of reference audio'),
91
93
  ref_video: str('Absolute path or URL of reference video'),
94
+ reference_images: { type: 'array', items: { type: 'string' }, description: 'Loose image reference paths/URLs (-c); repeatable for MiniMax H3 r2v' },
95
+ reference_audios: { type: 'array', items: { type: 'string' }, description: 'Additional reference audio paths/URLs; MiniMax H3 r2v supports up to 3 total' },
96
+ reference_videos: { type: 'array', items: { type: 'string' }, description: 'Additional reference video paths/URLs; MiniMax H3 r2v supports up to 3 total' },
97
+ generate_audio: { type: 'boolean', description: 'For MiniMax H3, keep generated audio (true) or strip it from the returned video (false)' },
92
98
  persona: str('Saved persona name (reference frame)'),
93
99
  target_resolution: num('Short-side target in px, preserves aspect'),
94
100
  timeout_seconds: num('Generation timeout override (default 1800)'),
@@ -105,7 +111,12 @@ export const TOOLS = [
105
111
  push(args, '--ref', input.ref);
106
112
  push(args, '--ref-end', input.ref_end);
107
113
  push(args, '--ref-audio', input.ref_audio);
114
+ for (const refAudio of input.reference_audios ?? []) push(args, '--ref-audio', refAudio);
108
115
  push(args, '--ref-video', input.ref_video);
116
+ for (const refVideo of input.reference_videos ?? []) push(args, '--ref-video', refVideo);
117
+ for (const refImage of input.reference_images ?? []) push(args, '-c', refImage);
118
+ if (input.generate_audio === true) args.push('--generate-audio');
119
+ if (input.generate_audio === false) args.push('--no-generate-audio');
109
120
  push(args, '--persona', input.persona);
110
121
  push(args, '--target-resolution', input.target_resolution);
111
122
  push(args, '-t', input.timeout_seconds);
@@ -2,7 +2,7 @@
2
2
  "id": "sogni-creative-agent-skill",
3
3
  "name": "Sogni Creative Agent Skill — Image, Video & Music Generation",
4
4
  "description": "Agent skill and CLI for Sogni AI image, video, and music generation.",
5
- "version": "3.25.0",
5
+ "version": "3.26.0",
6
6
  "skills": [
7
7
  "."
8
8
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sogni-ai/sogni-creative-agent-skill",
3
- "version": "3.25.0",
3
+ "version": "3.26.0",
4
4
  "description": "Sogni Creative Agent Skill: agent skill and CLI for Sogni AI image, video, and music generation.",
5
5
  "type": "module",
6
6
  "main": "sogni-agent.mjs",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: sogni-creative-agent
3
- description: "Sogni Creative Agent: image, video, and music generation using Sogni AI's decentralized GPU network. Supports personas, persistent memories, custom personality, style transfer, angle synthesis, Seedance/HappyHorse/LTX/WAN video, music/lyrics, hosted chat, durable workflows, replay records, and multi-step creative workflows. Invoke when the user asks to \"draw\", \"generate\", \"create an image\", \"make a video\", \"animate\", \"make music\", \"apply a style\", or \"generate me as a superhero\"."
3
+ description: "Sogni Creative Agent: image, video, and music generation using Sogni AI's decentralized GPU network. Supports personas, persistent memories, custom personality, style transfer, angle synthesis, MiniMax H3/Seedance/HappyHorse/LTX/WAN video, music/lyrics, hosted chat, durable workflows, replay records, and multi-step creative workflows. Invoke when the user asks to \"draw\", \"generate\", \"create an image\", \"make a video\", \"animate\", \"make music\", \"apply a style\", or \"generate me as a superhero\"."
4
4
  ---
5
5
 
6
6
  # Sogni Creative Agent
@@ -29,6 +29,7 @@ Do not run the default `npx setup-sogni-agent-skill` from an installed plugin un
29
29
  - Image edit: `sogni-agent -c <path> "make it night, add fireflies"`
30
30
  - Video (image-to-video): `sogni-agent --video --ref <path> "gentle camera pan"` (defaults to `wan_v2.2-14b-fp8_i2v_lightx2v`)
31
31
  - Animate two images (first frame → last frame): `sogni-agent --video --ref <first> --ref-end <last> "smooth morph into the final frame"` (defaults to `ltx23-22b-fp8_i2v_distilled`; the transition/morph LoRA auto-applies)
32
+ - MiniMax H3 reference-to-video: `sogni-agent --video -m minimax-h3-r2v --ref <identity> -c <wardrobe> --ref-video <motion> --ref-audio <voice> "<Picture 1> controls identity; <Picture 2> controls wardrobe; <Video 1> controls motion; <Audio 1> controls voice."`
32
33
  - One-click image-folder loop: `/sogni-creative-agent:loop-maker ./images`
33
34
  - One-click image-folder loop in Codex: `$sogni-creative-agent:loop-maker ./images`
34
35
  - Music: `sogni-agent --music "ambient drone, 30 seconds"`
@@ -147,7 +147,7 @@ direct music generation. Music controls: `--lyrics`, `--language`, `--bpm`
147
147
  | `minimax-h3` / `minimax-h3-t2v` | Standard | MiniMax H3 text-to-video at 24 fps with native stereo audio |
148
148
  | `minimax-h3-i2v` | Standard | MiniMax H3 first-frame image-to-video with native stereo audio |
149
149
  | `minimax-h3-flf2v` | Standard | MiniMax H3 first-frame → last-frame video; pass both `--ref` and `--ref-end` |
150
- | `minimax-h3-r2v` | Standard | MiniMax H3 reference-to-video from a whole reference SET (up to 9 images / 3 videos / 3 audio); available through the SDK and creative-agent tool, with no CLI selector yet |
150
+ | `minimax-h3-r2v` | Standard | MiniMax H3 reference-to-video from a whole reference set (up to 9 images / 3 videos / 3 audio, 12 files total) |
151
151
  | `wan_v2.2-14b-fp8_i2v_lightx2v` | Fast | **Default single-image image-to-video** (one `--ref`, no end frame) |
152
152
  | `wan_v2.2-14b-fp8_i2v` | Slow | Higher quality video |
153
153
  | `wan_v2.2-14b-fp8_t2v_lightx2v` | Fast | Text-to-video |
@@ -235,8 +235,8 @@ and short in-scene text.
235
235
 
236
236
  MiniMax H3 is a Sogni-hosted video family (four discrete modes, no mini/fast
237
237
  variants) that generates picture and **native 32 kHz stereo audio jointly**.
238
- `generateAudio=false` strips the generated track from the delivered file rather
239
- than skipping audio generation. It is an explicit model choice, never a
238
+ `--no-generate-audio` (SDK `generateAudio=false`) strips the generated track
239
+ from the delivered file rather than skipping audio generation. It is an explicit model choice, never a
240
240
  universal default. The bare `minimax-h3` selector resolves to the mode inferred
241
241
  from your references; **`minimax-h3-r2v` is never inferred** — it runs a
242
242
  different checkpoint and must be asked for by name.
@@ -252,10 +252,9 @@ The first three modes share the FL2VA checkpoint: worker ids
252
252
  `minimax-h3-fl2va-fp8_t2v`, `minimax-h3-fl2va-fp8_i2v`, and
253
253
  `minimax-h3-fl2va-fp8_flf2v`. The CLI resolves those three short selectors,
254
254
  picking i2v vs flf2v from whether `--ref-end` is present. Reference-to-video is a
255
- SEPARATE checkpoint — worker id `minimax-h3-ref2va-fp8_r2v` — and is not one of
256
- the CLI's `-m` selectors today; reach it through the SDK's native upload fields
257
- or the creative-agent `generate_video` tool with
258
- `videoModel="minimax-h3-r2v"` (including callers such as Sogni Chat).
255
+ SEPARATE checkpoint — worker id `minimax-h3-ref2va-fp8_r2v` — selected directly
256
+ with `-m minimax-h3-r2v`, or through the creative-agent `generate_video` tool
257
+ with `videoModel="minimax-h3-r2v"` (including callers such as Sogni Chat).
259
258
 
260
259
  The **fl2va** modes (t2v / i2v / flf2v) take image references only — they do not
261
260
  accept reference video or reference audio, because audio is generated natively.
@@ -283,6 +282,7 @@ initial Sogni release is routed to 32 GB-class workers.
283
282
  sogni-agent -q --video -m minimax-h3 --duration 10 -w 1344 -h 768 -o ./video.mp4 "<H3 prose prompt>"
284
283
  sogni-agent -q --video -m minimax-h3-i2v --ref first.png --duration 8 -o ./video.mp4 "<H3 prose prompt>"
285
284
  sogni-agent -q --video -m minimax-h3-flf2v --ref first.png --ref-end last.png --duration 8 -o ./video.mp4 "<H3 prose prompt>"
285
+ sogni-agent -q --video -m minimax-h3-r2v --ref identity.png -c wardrobe.png --ref-video motion.mp4 --ref-audio voice.m4a -o ./video.mp4 "<H3 prompt using <Picture 1>/<Picture 2>/<Video 1>/<Audio 1>>"
286
286
  ```
287
287
 
288
288
  ### MiniMax H3 prompting
@@ -316,10 +316,11 @@ the optional/advanced markup reference before writing an H3 prompt.
316
316
  `minimax-h3-r2v` (worker id `minimax-h3-ref2va-fp8_r2v`) is the one H3 mode that
317
317
  conditions on a whole **reference set** instead of one or two locked frames. It
318
318
  runs its own ref2va checkpoint, so it is **never inferred** from stray uploads
319
- the way HappyHorse r2v is — the user or the plan must name it. It is reached
320
- through the SDK's native upload fields or the creative-agent `generate_video`
321
- tool (`videoModel="minimax-h3-r2v"`, including callers such as Sogni Chat);
322
- `sogni-agent` has no `-m minimax-h3-r2v` selector yet.
319
+ the way HappyHorse r2v is — the user or the plan must name it. Direct CLI uses
320
+ `-m minimax-h3-r2v`: `--ref` is optional loose image 1, repeatable `-c` supplies
321
+ the remaining images, and repeatable `--ref-video` / `--ref-audio` supply those
322
+ modalities. The creative-agent `generate_video` tool uses
323
+ `videoModel="minimax-h3-r2v"` plus its typed reference-index arrays.
323
324
 
324
325
  Everything in [MiniMax H3 models](#minimax-h3-models) above still applies: 24 fps,
325
326
  the `124 + n×17` frame grid (5.17–15.08 s), dimensions divisible by 32 inside the
@@ -485,7 +486,7 @@ model recommendations.
485
486
  | MiniMax H3 text-to-video with native stereo audio | `minimax-h3` (or `minimax-h3-t2v`) |
486
487
  | MiniMax H3 image-to-video from one first frame | `minimax-h3-i2v` with `--ref` |
487
488
  | MiniMax H3 first frame → last frame transition | `minimax-h3-flf2v` with `--ref A --ref-end B` |
488
- | MiniMax H3 from a set of loose references (identity + wardrobe + location, a motion clip, a voice clip) | `minimax-h3-r2v` — SDK / `generate_video`; no CLI selector yet |
489
+ | MiniMax H3 from a set of loose references (identity + wardrobe + location, a motion clip, a voice clip) | `minimax-h3-r2v` with `--ref`/`-c`, repeatable `--ref-video`, and repeatable `--ref-audio` |
489
490
  | Face lip-sync with uploaded audio | `wan_v2.2-14b-fp8_s2v_lightx2v` |
490
491
 
491
492
  ## Video sizing & aspect ratios
@@ -363,10 +363,11 @@ transition), and `S.SS` is the effective duration to exactly two decimal places
363
363
  locked frames: up to **9 reference images** (at least one is required),
364
364
  **3 reference videos** (24 fps, 2–15 s, each with an optional soundtrack) and
365
365
  **3 standalone audio clips**, **12 files maximum in total**. It runs a separate
366
- ref2va checkpoint, so it is never inferred — it must be chosen by name through
367
- the SDK's native upload fields or the `generate_video` tool with
368
- `videoModel="minimax-h3-r2v"` (including callers such as Sogni Chat;
369
- `sogni-agent` has no `-m minimax-h3-r2v` selector yet). Reference videos and
366
+ ref2va checkpoint, so it is never inferred — it must be chosen by name with
367
+ direct CLI `-m minimax-h3-r2v` or the `generate_video` tool's
368
+ `videoModel="minimax-h3-r2v"` (including callers such as Sogni Chat). Direct CLI
369
+ uses `--ref` then repeatable `-c` for images, plus repeatable `--ref-video` and
370
+ `--ref-audio` for those modalities. Reference videos and
370
371
  audio are additions to the image set, never replacements for it, and r2v has no
371
372
  frame anchors at all — for a locked opening frame use `minimax-h3-i2v`, and for a
372
373
  first-to-last-frame transition use `minimax-h3-flf2v`.
@@ -455,6 +456,9 @@ sogni-agent -q --video -m minimax-h3-i2v --ref ./first.png --duration 8 -w 768 -
455
456
 
456
457
  # First frame -> last frame transition
457
458
  sogni-agent -q --video -m minimax-h3-flf2v --ref ./first.png --ref-end ./last.png --duration 8 -w 1344 -h 768 -o ./video.mp4 "<H3 prose prompt describing the motion path between the two frames>"
459
+
460
+ # Reference-to-video (reference order defines the prompt ordinals)
461
+ sogni-agent -q --video -m minimax-h3-r2v --ref ./identity.png -c ./wardrobe.png --ref-video ./motion.mp4 --ref-audio ./voice.m4a --duration 8 -w 1344 -h 768 -o ./video.mp4 "<H3 prose assigning jobs to <Picture 1>, <Picture 2>, <Video 1>, and <Audio 1>>"
458
462
  ```
459
463
 
460
464
  ## High-Res Video Routing
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: video_editing
3
- description: Source-conditioned video flows: animate a photo, audio-driven motion, video style transfer, Seedance/HappyHorse references, stitching, orbits, dance-montage compositions, segment extend/replace, and pure-ffmpeg post-production (overlay, subtitles).
3
+ description: Source-conditioned video flows: animate a photo, audio-driven motion, video style transfer, Seedance/HappyHorse/MiniMax H3 references, stitching, orbits, dance-montage compositions, segment extend/replace, and pure-ffmpeg post-production (overlay, subtitles).
4
4
  always_loaded: false
5
5
  tool_names:
6
6
  - animate_photo
@@ -17,11 +17,11 @@ tool_names:
17
17
 
18
18
  # Video editing
19
19
 
20
- Convert a still image, audio track, or existing clip into video, plus Seedance multimodal references, HappyHorse image references, stitching, orbits, dance-montage compositions, segment extend/replace, and pure-ffmpeg post-production (overlay, subtitles) over previously rendered or uploaded clips.
20
+ Convert a still image, audio track, or existing clip into video, plus Seedance and MiniMax H3 multimodal references, HappyHorse image references, stitching, orbits, dance-montage compositions, segment extend/replace, and pure-ffmpeg post-production (overlay, subtitles) over previously rendered or uploaded clips.
21
21
 
22
22
  ## Tools
23
23
 
24
- - `animate_photo` — photo-to-video animation with LTX/WAN/Seedance/HappyHorse routing.
24
+ - `animate_photo` — photo-to-video animation with LTX/WAN/Seedance/HappyHorse/MiniMax H3 i2v and first/last-frame routing.
25
25
  - `sound_to_video` — audio-synced video generation.
26
26
  - `video_to_video` — video style transfer with ControlNet.
27
27
  - `stitch_video` — concatenate previously rendered clips.
@@ -39,3 +39,4 @@ Convert a still image, audio track, or existing clip into video, plus Seedance m
39
39
  - For multiple prompt-only takes from one fixed source/end image and shared settings, prefer one Dynamic Prompt request with `numberOfVariations`/`-n`, then stitch the returned clips if the user asked for a single final video.
40
40
  - Keep per-clip prompt arrays and source/end image arrays when clips need different assets, durations, audio windows, or other per-output settings.
41
41
  - HappyHorse i2v uses exactly one first-frame image and r2v uses 1-9 image references; do not attach reference audio, reference video, ControlNet, or negative prompts.
42
+ - MiniMax H3 i2v uses one first frame and H3 flf2v uses both first and last frames. For a loose image/video/audio set use `generate_video` with explicit `minimax-h3-r2v`; r2v references are roles, not frame anchors.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: video_generation
3
- description: Text-to-video synthesis with LTX-2.3, WAN 2.2, Seedance 2.0, and HappyHorse 1.1.
3
+ description: Text-to-video synthesis with LTX-2.3, WAN 2.2, Seedance 2.0, HappyHorse 1.1, and MiniMax H3.
4
4
  always_loaded: false
5
5
  tool_names:
6
6
  - generate_video
@@ -8,14 +8,15 @@ tool_names:
8
8
 
9
9
  # Video generation
10
10
 
11
- Text-to-video synthesis with LTX-2.3, WAN 2.2, Seedance 2.0, and HappyHorse 1.1. Use when the user wants a new video clip generated from a prompt with no source image, audio, or clip.
11
+ Text-to-video synthesis with LTX-2.3, WAN 2.2, Seedance 2.0, HappyHorse 1.1, and MiniMax H3. Use when the user wants a new video clip generated from a prompt or a loose multimodal reference set.
12
12
 
13
13
  ## Tools
14
14
 
15
- - `generate_video` — produce a video clip from text, Seedance multimodal references, or HappyHorse image references.
15
+ - `generate_video` — produce a video clip from text, Seedance/H3 multimodal references, or HappyHorse image references.
16
16
 
17
17
  ## Constraints
18
18
 
19
19
  - Persona-driven video requests must always go through `image_editing` first to produce a conditioned image; never go straight to text-to-video for personas.
20
20
  - For prompt-only variants with the same model, duration, dimensions, and references, use one Dynamic Prompt branch with `numberOfVariations`/`-n` instead of serial video calls.
21
21
  - HappyHorse 1.1 is a Premium Spark vendor path: t2v is prompt-only, i2v uses one first-frame image, and r2v uses 1-9 image references. It accepts no reference audio or video.
22
+ - MiniMax H3 t2v uses `minimax-h3-t2v`; H3 r2v must be selected explicitly as `minimax-h3-r2v` and accepts up to 9 images, 3 videos, and 3 audio clips, capped at 12 files with at least one image. Address references with per-type `<Picture 1>` / `<Video 1>` / `<Audio 1>` tags and assign each one a role.
package/sogni-agent.mjs CHANGED
@@ -1867,8 +1867,16 @@ const LTX23_10EROS_MODEL_ID = 'ltx23-22b-10eros-v1.4-fp8mixed_i2v';
1867
1867
  const MINIMAX_H3_MODEL_IDS = new Set([
1868
1868
  'minimax-h3-fl2va-fp8_t2v',
1869
1869
  'minimax-h3-fl2va-fp8_i2v',
1870
- 'minimax-h3-fl2va-fp8_flf2v'
1870
+ 'minimax-h3-fl2va-fp8_flf2v',
1871
+ 'minimax-h3-ref2va-fp8_r2v'
1871
1872
  ]);
1873
+ const MINIMAX_H3_R2V_MODEL_ID = 'minimax-h3-ref2va-fp8_r2v';
1874
+ const MINIMAX_H3_REFERENCE_LIMITS = Object.freeze({
1875
+ images: 9,
1876
+ videos: 3,
1877
+ audios: 3,
1878
+ assets: 12
1879
+ });
1872
1880
  const LTX23_10EROS_FIXED_SETTINGS = Object.freeze({
1873
1881
  steps: 9,
1874
1882
  guidance: 1,
@@ -1887,6 +1895,7 @@ const DR34ML4Y_SUPPORTED_MODEL_IDS = new Set([
1887
1895
  function resolveSkillVideoModelAlias(modelId, workflow = null, hasEndFrame = false) {
1888
1896
  const normalized = String(modelId || '').trim().toLowerCase();
1889
1897
  if (normalized === 'minimax-h3' && workflow) {
1898
+ if (workflow === 'r2v') return MINIMAX_H3_R2V_MODEL_ID;
1890
1899
  if (workflow === 'i2v') {
1891
1900
  return hasEndFrame ? 'minimax-h3-fl2va-fp8_flf2v' : 'minimax-h3-fl2va-fp8_i2v';
1892
1901
  }
@@ -1897,6 +1906,7 @@ function resolveSkillVideoModelAlias(modelId, workflow = null, hasEndFrame = fal
1897
1906
  }
1898
1907
  if (normalized === 'minimax-h3-i2v') return 'minimax-h3-fl2va-fp8_i2v';
1899
1908
  if (normalized === 'minimax-h3-flf2v') return 'minimax-h3-fl2va-fp8_flf2v';
1909
+ if (normalized === 'minimax-h3-r2v') return MINIMAX_H3_R2V_MODEL_ID;
1900
1910
  return normalized === '10eros' || normalized === 'ltx23-eros'
1901
1911
  ? LTX23_10EROS_MODEL_ID
1902
1912
  : modelId;
@@ -1906,6 +1916,29 @@ function isMiniMaxH3Model(modelId) {
1906
1916
  return MINIMAX_H3_MODEL_IDS.has(String(modelId || '').trim().toLowerCase());
1907
1917
  }
1908
1918
 
1919
+ function isMiniMaxH3R2vModel(modelId) {
1920
+ return String(modelId || '').trim().toLowerCase() === MINIMAX_H3_R2V_MODEL_ID;
1921
+ }
1922
+
1923
+ function isMiniMaxH3ModelSelectionLocal(modelId) {
1924
+ const normalized = String(modelId || '').trim().toLowerCase();
1925
+ return normalized === 'minimax-h3'
1926
+ || normalized === 'minimax-h3-t2v'
1927
+ || normalized === 'minimax-h3-i2v'
1928
+ || normalized === 'minimax-h3-flf2v'
1929
+ || normalized === 'minimax-h3-r2v'
1930
+ || isMiniMaxH3Model(normalized);
1931
+ }
1932
+
1933
+ function miniMaxH3ModeFromModelId(modelId) {
1934
+ const normalized = String(modelId || '').trim().toLowerCase();
1935
+ if (normalized === 'minimax-h3-t2v' || normalized === 'minimax-h3-fl2va-fp8_t2v') return 't2v';
1936
+ if (normalized === 'minimax-h3-i2v' || normalized === 'minimax-h3-fl2va-fp8_i2v') return 'i2v';
1937
+ if (normalized === 'minimax-h3-flf2v' || normalized === 'minimax-h3-fl2va-fp8_flf2v') return 'flf2v';
1938
+ if (normalized === 'minimax-h3-r2v' || normalized === MINIMAX_H3_R2V_MODEL_ID) return 'r2v';
1939
+ return null;
1940
+ }
1941
+
1909
1942
  function normalizeMultiAngleValue(value, aliases, allowedKeys, label) {
1910
1943
  if (!value) return null;
1911
1944
  const normalized = value.toLowerCase().replace(/_/g, '-').replace(/\s+/g, ' ').trim();
@@ -3302,7 +3335,7 @@ Music Options:
3302
3335
 
3303
3336
  Video Options:
3304
3337
  --video, -v Generate video instead of image
3305
- --workflow <type> Video workflow: t2v|i2v|s2v|ia2v|a2v|v2v|animate-move|animate-replace
3338
+ --workflow <type> Video workflow: t2v|i2v|r2v|s2v|ia2v|a2v|v2v|animate-move|animate-replace
3306
3339
  --fps <num> Frames per second (model default unless set)
3307
3340
  --duration <sec> Duration in seconds (default: 5)
3308
3341
  --frames <num> Override total frames (optional)
@@ -3310,21 +3343,22 @@ Video Options:
3310
3343
  --auto-resize-assets Auto-resize video reference assets (default)
3311
3344
  --no-auto-resize-assets Disable auto-resize for video assets
3312
3345
  --estimate-video-cost Estimate video cost and exit
3313
- --ref <path|url> Reference image for video (start/first frame on Seedance)
3346
+ --ref <path|url> Reference image for video (start frame; Picture 1 on H3 r2v)
3314
3347
  --ref-end <path|url> End frame for interpolation/morphing; with --ref it
3315
3348
  defaults to the LTX-2.3 transition/morph model
3316
3349
  (last frame on Seedance)
3317
- --ref-audio <path|url> Audio reference. Repeatable on Seedance models (up to 3 total);
3350
+ --ref-audio <path|url> Audio reference. Repeatable on Seedance and H3 r2v (up to 3 total);
3318
3351
  first entry is the primary, extras must be HTTPS URLs in CLI
3319
- direct-gen (use --api-chat for multi local-file uploads).
3352
+ direct-gen for Seedance; H3 r2v uploads local/remote files.
3320
3353
  On LTX/WAN: single primary only (for ia2v/a2v/s2v lip-sync).
3321
3354
  --audio-start <sec> Start offset into --ref-audio for audio-driven clips
3322
3355
  --audio-duration <sec> Duration slice from --ref-audio
3323
3356
  --reference-audio-identity <path> Voice identity clip for LTX native audio
3324
3357
  --voice-persona <name> Use saved persona voice clip as LTX voice identity
3325
- --ref-video <path|url> Video reference. Repeatable on Seedance models (up to 3 total);
3358
+ --ref-video <path|url> Video reference. Repeatable on Seedance and H3 r2v (up to 3 total);
3326
3359
  first entry is the primary, extras must be HTTPS URLs in CLI
3327
- direct-gen. On LTX/WAN: single primary for animate/v2v workflows.
3360
+ direct-gen for Seedance. On LTX/WAN: single primary for animate/v2v.
3361
+ --generate-audio, --no-generate-audio Keep or strip MiniMax H3's generated audio track
3328
3362
 
3329
3363
  Seedance Reference Modes (mutually exclusive on seedance2 / seedance2-mini / seedance2-fast):
3330
3364
  - DEDICATED FRAME MODE: --ref (first frame) and/or --ref-end (last frame).
@@ -3516,6 +3550,8 @@ Prompting". No negative prompt field: state negatives in the prompt text.):
3516
3550
  minimax-h3 Text-to-video (also accepts minimax-h3-t2v); --ref/--ref-end pick i2v/flf2v
3517
3551
  minimax-h3-i2v Image-to-video from a single first-frame image (--ref)
3518
3552
  minimax-h3-flf2v First-frame -> last-frame transition (--ref plus --ref-end)
3553
+ minimax-h3-r2v Multi-reference video: --ref/-c images, repeatable --ref-video/--ref-audio
3554
+ (9 images / 3 videos / 3 audios / 12 files total)
3519
3555
 
3520
3556
  WAN 2.2 Video Models:
3521
3557
  wan_v2.2-14b-fp8_t2v_lightx2v Text-to-video (fast)
@@ -4006,12 +4042,15 @@ if (options.video) {
4006
4042
  const normalized = normalizeVideoWorkflow(options.videoWorkflow);
4007
4043
  if (normalized) {
4008
4044
  options.videoWorkflow = normalized;
4009
- } else if (options.videoWorkflow === 'r2v' && isHappyHorseModelSelectionLocal(options.model)) {
4010
- // HappyHorse adds a reference-to-video (r2v) mode that the shared
4011
- // SkillVideoWorkflow enum does not carry; accept it for HappyHorse only.
4045
+ } else if (
4046
+ options.videoWorkflow === 'r2v'
4047
+ && (isHappyHorseModelSelectionLocal(options.model) || isMiniMaxH3ModelSelectionLocal(options.model))
4048
+ ) {
4049
+ // HappyHorse and MiniMax H3 add reference-to-video (r2v) modes that the
4050
+ // shared SkillVideoWorkflow enum does not carry yet.
4012
4051
  options.videoWorkflow = 'r2v';
4013
4052
  } else {
4014
- fatalCliError(`Unknown workflow "${options.videoWorkflow}". Use t2v|i2v|s2v|ia2v|a2v|v2v|animate-move|animate-replace (r2v on HappyHorse).`, {
4053
+ fatalCliError(`Unknown workflow "${options.videoWorkflow}". Use t2v|i2v|s2v|ia2v|a2v|v2v|animate-move|animate-replace (r2v on HappyHorse or MiniMax H3).`, {
4015
4054
  code: 'INVALID_ARGUMENT',
4016
4055
  details: { workflow: options.videoWorkflow }
4017
4056
  });
@@ -4039,6 +4078,31 @@ if (options.video) {
4039
4078
  }
4040
4079
  }
4041
4080
 
4081
+ // MiniMax H3 has four concrete modes. The FL2VA checkpoint covers t2v, i2v,
4082
+ // and first/last-frame (represented by the CLI's i2v workflow); Ref2VA is a
4083
+ // separate r2v checkpoint and is never inferred from loose references alone.
4084
+ // Selecting minimax-h3-r2v or explicitly passing --workflow r2v is required.
4085
+ if (isMiniMaxH3ModelSelectionLocal(options.model)) {
4086
+ const pinnedMode = miniMaxH3ModeFromModelId(options.model);
4087
+ const pinnedWorkflow = pinnedMode === 'flf2v' ? 'i2v' : pinnedMode;
4088
+ if (pinnedWorkflow) {
4089
+ if (options.videoWorkflow && options.videoWorkflow !== pinnedWorkflow) {
4090
+ fatalCliError(`Workflow "${options.videoWorkflow}" does not match model "${options.model}".`, {
4091
+ code: 'INVALID_ARGUMENT',
4092
+ details: { workflow: options.videoWorkflow, model: options.model }
4093
+ });
4094
+ }
4095
+ options.videoWorkflow = pinnedWorkflow;
4096
+ } else if (!options.videoWorkflow) {
4097
+ options.videoWorkflow = (options.refImage || options.refImageEnd) ? 'i2v' : 't2v';
4098
+ }
4099
+ options.model = resolveSkillVideoModelAlias(
4100
+ options.model,
4101
+ options.videoWorkflow,
4102
+ Boolean(options.refImageEnd)
4103
+ );
4104
+ }
4105
+
4042
4106
  // HappyHorse 1.1 has no v2v/ia2v. A concrete `happyhorse-1.1-<mode>` id pins
4043
4107
  // the workflow; the bare `happyhorse` / `happyhorse-1.1` alias infers t2v by
4044
4108
  // default, i2v from a single first-frame image (--ref), and r2v from loose
@@ -4401,6 +4465,8 @@ if (options.photobooth) {
4401
4465
  if (options.video) {
4402
4466
  const isSeedanceVideo = isSeedanceModel(options.model);
4403
4467
  const isHappyHorseVideo = isHappyHorseModel(options.model);
4468
+ const isMiniMaxH3Video = isMiniMaxH3Model(options.model);
4469
+ const isMiniMaxH3R2v = isMiniMaxH3R2vModel(options.model);
4404
4470
  if (isSeedanceVideo && !['t2v', 'ia2v', 'v2v'].includes(options.videoWorkflow)) {
4405
4471
  fatalCliError('Seedance models support only t2v, ia2v, or v2v workflows.', {
4406
4472
  code: 'INVALID_ARGUMENT',
@@ -4413,15 +4479,42 @@ if (options.video) {
4413
4479
  details: { workflow: options.videoWorkflow, model: options.model }
4414
4480
  });
4415
4481
  }
4482
+ if (isMiniMaxH3Video && !['t2v', 'i2v', 'r2v'].includes(options.videoWorkflow)) {
4483
+ fatalCliError('MiniMax H3 models support only t2v, i2v/flf2v, or r2v workflows.', {
4484
+ code: 'INVALID_ARGUMENT',
4485
+ details: { workflow: options.videoWorkflow, model: options.model }
4486
+ });
4487
+ }
4416
4488
  if (isHappyHorseVideo && options.videoControlNetName) {
4417
4489
  fatalCliError('HappyHorse video models do not support ControlNet.', {
4418
4490
  code: 'INVALID_ARGUMENT',
4419
4491
  details: { model: options.model, controlNetName: options.videoControlNetName }
4420
4492
  });
4421
4493
  }
4494
+ if (isMiniMaxH3Video && (options.videoControlNetName || options.refMask || options.referenceAudioIdentity)) {
4495
+ fatalCliError('MiniMax H3 does not support ControlNet, masks, or LTX voice-identity references.', {
4496
+ code: 'INVALID_ARGUMENT',
4497
+ details: { model: options.model }
4498
+ });
4499
+ }
4500
+ if (isMiniMaxH3Video && (cliSet.steps || cliSet.guidance)) {
4501
+ fatalCliError('MiniMax H3 uses fixed sampling settings; omit --steps and --guidance.', {
4502
+ code: 'INVALID_ARGUMENT',
4503
+ details: { model: options.model, steps: options.steps, guidance: options.guidance }
4504
+ });
4505
+ }
4506
+ if (isHappyHorseVideo && options.apiGenerateAudio !== null) {
4507
+ fatalCliError('HappyHorse native audio is always on; omit --generate-audio/--no-generate-audio.', {
4508
+ code: 'INVALID_ARGUMENT',
4509
+ details: { model: options.model }
4510
+ });
4511
+ }
4422
4512
 
4423
4513
  if (options.videoWorkflow === 't2v') {
4424
- if (!isSeedanceVideo && (options.refImage || options.refImageEnd || options.refAudio || options.refVideo)) {
4514
+ if (!isSeedanceVideo && (
4515
+ options.refImage || options.refImageEnd || options.refAudio || options.refVideo
4516
+ || options.contextImages.length > 0 || options.refAudios.length > 0 || options.refVideos.length > 0
4517
+ )) {
4425
4518
  fatalCliError('t2v does not accept reference image/audio/video.', {
4426
4519
  code: 'INVALID_ARGUMENT'
4427
4520
  });
@@ -4437,6 +4530,23 @@ if (options.video) {
4437
4530
  if (options.refAudio || options.refVideo) {
4438
4531
  fatalCliError('HappyHorse i2v does not accept reference audio/video.', { code: 'INVALID_ARGUMENT' });
4439
4532
  }
4533
+ } else if (isMiniMaxH3Video) {
4534
+ const h3Mode = miniMaxH3ModeFromModelId(options.model);
4535
+ if (h3Mode === 'flf2v') {
4536
+ if (!options.refImage || !options.refImageEnd) {
4537
+ fatalCliError('MiniMax H3 flf2v requires both --ref and --ref-end.', { code: 'INVALID_ARGUMENT' });
4538
+ }
4539
+ } else {
4540
+ if (!options.refImage) {
4541
+ fatalCliError('MiniMax H3 i2v requires --ref (a single first-frame image).', { code: 'INVALID_ARGUMENT' });
4542
+ }
4543
+ if (options.refImageEnd) {
4544
+ fatalCliError('MiniMax H3 i2v accepts one first-frame image; use -m minimax-h3-flf2v for --ref plus --ref-end.', { code: 'INVALID_ARGUMENT' });
4545
+ }
4546
+ }
4547
+ if (options.contextImages.length > 0 || options.refAudio || options.refVideo || options.refAudios.length > 0 || options.refVideos.length > 0) {
4548
+ fatalCliError('MiniMax H3 i2v/flf2v accepts only --ref and optional --ref-end image anchors; use minimax-h3-r2v for loose image/video/audio references.', { code: 'INVALID_ARGUMENT' });
4549
+ }
4440
4550
  } else {
4441
4551
  if (!options.refImage && !options.refImageEnd) {
4442
4552
  fatalCliError('i2v requires --ref and/or --ref-end.', { code: 'INVALID_ARGUMENT' });
@@ -4446,15 +4556,25 @@ if (options.video) {
4446
4556
  }
4447
4557
  }
4448
4558
  } else if (options.videoWorkflow === 'r2v') {
4449
- // HappyHorse reference-to-video: 1-9 loose image references via -c/--context.
4450
- if (!Array.isArray(options.contextImages) || options.contextImages.length === 0) {
4451
- fatalCliError('HappyHorse r2v requires 1-9 reference images via -c/--context.', { code: 'INVALID_ARGUMENT' });
4452
- }
4453
- if (options.refImage || options.refImageEnd) {
4454
- fatalCliError('HappyHorse r2v takes reference images via -c/--context, not --ref/--ref-end.', { code: 'INVALID_ARGUMENT' });
4455
- }
4456
- if (options.refAudio || options.refVideo) {
4457
- fatalCliError('HappyHorse r2v does not accept reference audio/video.', { code: 'INVALID_ARGUMENT' });
4559
+ if (isMiniMaxH3R2v) {
4560
+ const imageCount = (options.refImage ? 1 : 0) + options.contextImages.length;
4561
+ if (imageCount === 0) {
4562
+ fatalCliError('MiniMax H3 r2v needs at least one reference image via --ref or -c/--context.', { code: 'INVALID_ARGUMENT' });
4563
+ }
4564
+ if (options.refImageEnd) {
4565
+ fatalCliError('MiniMax H3 r2v has no end-frame anchor; use -c/--context for another loose image or minimax-h3-flf2v for first/last frames.', { code: 'INVALID_ARGUMENT' });
4566
+ }
4567
+ } else {
4568
+ // HappyHorse reference-to-video: 1-9 loose image references via -c/--context.
4569
+ if (!Array.isArray(options.contextImages) || options.contextImages.length === 0) {
4570
+ fatalCliError('HappyHorse r2v requires 1-9 reference images via -c/--context.', { code: 'INVALID_ARGUMENT' });
4571
+ }
4572
+ if (options.refImage || options.refImageEnd) {
4573
+ fatalCliError('HappyHorse r2v takes reference images via -c/--context, not --ref/--ref-end.', { code: 'INVALID_ARGUMENT' });
4574
+ }
4575
+ if (options.refAudio || options.refVideo || options.refAudios.length > 0 || options.refVideos.length > 0) {
4576
+ fatalCliError('HappyHorse r2v does not accept reference audio/video.', { code: 'INVALID_ARGUMENT' });
4577
+ }
4458
4578
  }
4459
4579
  } else if (options.videoWorkflow === 's2v') {
4460
4580
  if (!options.refImage || !options.refAudio) {
@@ -4534,15 +4654,15 @@ if (options.video) {
4534
4654
  }
4535
4655
  // Non-Seedance video models do not understand multi-ref audio/video extras —
4536
4656
  // they only support a single primary --ref-audio / --ref-video each.
4537
- if (!isSeedanceVideo) {
4657
+ if (!isSeedanceVideo && !isMiniMaxH3R2v) {
4538
4658
  if (Array.isArray(options.refAudios) && options.refAudios.length > 0) {
4539
- fatalCliError('Multiple --ref-audio entries are only supported for Seedance models (seedance2, seedance2-mini, seedance2-fast).', {
4659
+ fatalCliError('Multiple --ref-audio entries are supported only for Seedance loose references and MiniMax H3 r2v.', {
4540
4660
  code: 'INVALID_ARGUMENT',
4541
4661
  details: { model: options.model, extras: options.refAudios },
4542
4662
  });
4543
4663
  }
4544
4664
  if (Array.isArray(options.refVideos) && options.refVideos.length > 0) {
4545
- fatalCliError('Multiple --ref-video entries are only supported for Seedance models (seedance2, seedance2-mini, seedance2-fast).', {
4665
+ fatalCliError('Multiple --ref-video entries are supported only for Seedance loose references and MiniMax H3 r2v.', {
4546
4666
  code: 'INVALID_ARGUMENT',
4547
4667
  details: { model: options.model, extras: options.refVideos },
4548
4668
  });
@@ -7999,6 +8119,34 @@ function enforceHappyHorseReferenceCaps() {
7999
8119
  }
8000
8120
  }
8001
8121
 
8122
+ function enforceMiniMaxH3ReferenceCaps() {
8123
+ const { images, videos, audios } = effectiveSeedanceReferenceCounts();
8124
+ const total = images + videos + audios;
8125
+ const checks = [
8126
+ ['images', images, MINIMAX_H3_REFERENCE_LIMITS.images],
8127
+ ['videos', videos, MINIMAX_H3_REFERENCE_LIMITS.videos],
8128
+ ['audios', audios, MINIMAX_H3_REFERENCE_LIMITS.audios]
8129
+ ];
8130
+ for (const [kind, count, maximum] of checks) {
8131
+ if (count > maximum) {
8132
+ fatalCliError(`MiniMax H3 r2v supports at most ${maximum} reference ${kind} (got ${count}).`, {
8133
+ code: 'MINIMAX_H3_REFERENCE_LIMIT_EXCEEDED',
8134
+ details: { kind, count, maximum, limits: MINIMAX_H3_REFERENCE_LIMITS }
8135
+ });
8136
+ }
8137
+ }
8138
+ if (total > MINIMAX_H3_REFERENCE_LIMITS.assets) {
8139
+ fatalCliError(
8140
+ `MiniMax H3 r2v supports at most ${MINIMAX_H3_REFERENCE_LIMITS.assets} reference files in total `
8141
+ + `(got ${total}: ${images} image, ${videos} video, ${audios} audio).`,
8142
+ {
8143
+ code: 'MINIMAX_H3_REFERENCE_LIMIT_EXCEEDED',
8144
+ details: { images, videos, audios, total, limits: MINIMAX_H3_REFERENCE_LIMITS }
8145
+ }
8146
+ );
8147
+ }
8148
+ }
8149
+
8002
8150
  function resolveMultiAngleOutputConfig(outputPath, outputFormat) {
8003
8151
  if (!outputPath) return null;
8004
8152
  const ext = extname(outputPath);
@@ -10406,11 +10554,17 @@ async function main() {
10406
10554
  if (options.refImage) log(`Reference image: ${options.refImage}`);
10407
10555
  if (options.refImageEnd) log(`End frame: ${options.refImageEnd}`);
10408
10556
  if (options.refAudio) log(`Reference audio: ${options.refAudio}`);
10557
+ for (const referenceAudio of options.refAudios) log(`Additional reference audio: ${referenceAudio}`);
10409
10558
  if (options.referenceAudioIdentity) log(`Voice identity: ${options._voicePersonaResolvedName || options.referenceAudioIdentity}`);
10410
10559
  if (options.refVideo) log(`Reference video: ${options.refVideo}`);
10560
+ for (const referenceVideo of options.refVideos) log(`Additional reference video: ${referenceVideo}`);
10561
+ if (options.videoWorkflow === 'r2v') {
10562
+ for (const contextImage of options.contextImages) log(`Loose reference image: ${contextImage}`);
10563
+ }
10411
10564
 
10412
10565
  const isSeedanceVideo = isSeedanceModel(options.model);
10413
10566
  const isHappyHorseVideo = isHappyHorseModel(options.model);
10567
+ const isMiniMaxH3R2v = isMiniMaxH3R2vModel(options.model);
10414
10568
  // Vendor video models forward image references as HTTPS URL arrays (or
10415
10569
  // Sogni-hosted uploads) instead of inline buffers; HappyHorse takes
10416
10570
  // image-only references (i2v first_frame, r2v reference_image).
@@ -10425,6 +10579,9 @@ async function main() {
10425
10579
  // HAPPYHORSE_REFERENCE_LIMITS (per-mode image-only caps).
10426
10580
  enforceHappyHorseReferenceCaps();
10427
10581
  }
10582
+ if (isMiniMaxH3R2v) {
10583
+ enforceMiniMaxH3ReferenceCaps();
10584
+ }
10428
10585
  const seedanceReferenceImageUrls = [];
10429
10586
  const seedanceReferenceVideoUrls = [];
10430
10587
  const seedanceReferenceAudioUrls = [];
@@ -10540,9 +10697,25 @@ async function main() {
10540
10697
  let audioBuffer = options.refAudio && !useRefAudioUrl ? await fetchMediaBuffer(options.refAudio) : undefined;
10541
10698
  let videoBuffer = options.refVideo && !useRefVideoUrl ? await fetchMediaBuffer(options.refVideo) : undefined;
10542
10699
  let maskBuffer = options.refMask ? await fetchMediaBuffer(options.refMask) : undefined;
10700
+ const contextImageBuffers = isMiniMaxH3R2v
10701
+ ? await Promise.all(options.contextImages.map((reference) => fetchMediaBuffer(reference)))
10702
+ : [];
10703
+ let additionalAudioBuffers = isMiniMaxH3R2v
10704
+ ? await Promise.all(options.refAudios.map((reference) => fetchMediaBuffer(reference)))
10705
+ : [];
10706
+ const additionalVideoBuffers = isMiniMaxH3R2v
10707
+ ? await Promise.all(options.refVideos.map((reference) => fetchMediaBuffer(reference)))
10708
+ : [];
10543
10709
  if (audioBuffer) {
10544
10710
  audioBuffer = await prepareReferenceAudioForVideoBuffer(audioBuffer, options.refAudio);
10545
10711
  }
10712
+ if (additionalAudioBuffers.length > 0) {
10713
+ additionalAudioBuffers = await Promise.all(
10714
+ additionalAudioBuffers.map((buffer, index) =>
10715
+ prepareReferenceAudioForVideoBuffer(buffer, options.refAudios[index])
10716
+ )
10717
+ );
10718
+ }
10546
10719
  if (
10547
10720
  videoBuffer
10548
10721
  && isSeedanceVideo
@@ -10698,6 +10871,9 @@ async function main() {
10698
10871
  if (endImageBuffer) {
10699
10872
  projectConfig.referenceImageEnd = endImageBuffer;
10700
10873
  }
10874
+ if (contextImageBuffers.length > 0) {
10875
+ projectConfig.contextImages = contextImageBuffers;
10876
+ }
10701
10877
  applyLtxTransitionLora(
10702
10878
  projectConfig,
10703
10879
  options.model,
@@ -10707,6 +10883,9 @@ async function main() {
10707
10883
  if (audioBuffer) {
10708
10884
  projectConfig.referenceAudio = audioBuffer;
10709
10885
  }
10886
+ if (additionalAudioBuffers.length > 0) {
10887
+ projectConfig.referenceAudios = additionalAudioBuffers;
10888
+ }
10710
10889
  if (options.audioStart !== null && !useRefAudioUrl) {
10711
10890
  projectConfig.audioStart = options.audioStart;
10712
10891
  }
@@ -10719,6 +10898,9 @@ async function main() {
10719
10898
  if (videoBuffer) {
10720
10899
  projectConfig.referenceVideo = videoBuffer;
10721
10900
  }
10901
+ if (additionalVideoBuffers.length > 0) {
10902
+ projectConfig.referenceVideos = additionalVideoBuffers;
10903
+ }
10722
10904
  if (seedanceReferenceImageUrls.length > 0) {
10723
10905
  projectConfig.referenceImageUrls = seedanceReferenceImageUrls;
10724
10906
  }
@@ -10734,21 +10916,25 @@ async function main() {
10734
10916
  if (options.seed !== null && options.seed !== undefined) {
10735
10917
  projectConfig.seed = options.seed;
10736
10918
  }
10737
- if (Number.isFinite(steps) && !isHappyHorseVideo) {
10919
+ if (options.apiGenerateAudio !== null && isMiniMaxH3Model(options.model)) {
10920
+ projectConfig.generateAudio = options.apiGenerateAudio;
10921
+ }
10922
+ if (Number.isFinite(steps) && !isHappyHorseVideo && !isMiniMaxH3Model(options.model)) {
10738
10923
  // HappyHorse routes through the vendor-job path and ignores `steps`,
10739
- // mirroring Seedance (whose model defaults already omit them).
10924
+ // mirroring Seedance (whose model defaults already omit them). H3 has
10925
+ // fixed sampling parameters and should receive no overrides.
10740
10926
  projectConfig.steps = steps;
10741
10927
  }
10742
- if (guidance !== null && guidance !== undefined) {
10928
+ if (guidance !== null && guidance !== undefined && !isMiniMaxH3Model(options.model)) {
10743
10929
  projectConfig.guidance = guidance;
10744
10930
  }
10745
- if (modelDefaults?.sampler) {
10931
+ if (modelDefaults?.sampler && !isMiniMaxH3Model(options.model)) {
10746
10932
  projectConfig.sampler = modelDefaults.sampler;
10747
10933
  }
10748
- if (modelDefaults?.scheduler) {
10934
+ if (modelDefaults?.scheduler && !isMiniMaxH3Model(options.model)) {
10749
10935
  projectConfig.scheduler = modelDefaults.scheduler;
10750
10936
  }
10751
- if (modelDefaults?.shift !== null && modelDefaults?.shift !== undefined) {
10937
+ if (modelDefaults?.shift !== null && modelDefaults?.shift !== undefined && !isMiniMaxH3Model(options.model)) {
10752
10938
  projectConfig.shift = modelDefaults.shift;
10753
10939
  }
10754
10940
  if (options.videoControlNetName && !isSeedanceModel(options.model)) {
@@ -11123,6 +11309,7 @@ async function main() {
11123
11309
  if (options.audioStart !== null) renderInfo.audioStart = options.audioStart;
11124
11310
  if (options.audioDuration !== null) renderInfo.audioDuration = options.audioDuration;
11125
11311
  }
11312
+ if (options.refAudios.length > 0) renderInfo.refAudios = options.refAudios;
11126
11313
  if (options.referenceAudioIdentity) {
11127
11314
  renderInfo.referenceAudioIdentity = options.referenceAudioIdentity;
11128
11315
  if (options._voicePersonaResolvedName || options.voicePersonaName) {
@@ -11133,6 +11320,10 @@ async function main() {
11133
11320
  renderInfo.refVideo = options.refVideo;
11134
11321
  if (options.videoStart !== null) renderInfo.videoStart = options.videoStart;
11135
11322
  }
11323
+ if (options.refVideos.length > 0) renderInfo.refVideos = options.refVideos;
11324
+ if (options.apiGenerateAudio !== null && isMiniMaxH3Model(options.model)) {
11325
+ renderInfo.generateAudio = options.apiGenerateAudio;
11326
+ }
11136
11327
  if (options.videoControlNetName && !isSeedanceModel(options.model)) {
11137
11328
  renderInfo.controlNet = {
11138
11329
  name: options.videoControlNetName,
@@ -11350,6 +11541,7 @@ async function main() {
11350
11541
  if (options.audioStart !== null) output.audioStart = options.audioStart;
11351
11542
  if (options.audioDuration !== null) output.audioDuration = options.audioDuration;
11352
11543
  }
11544
+ if (options.refAudios.length > 0) output.refAudios = options.refAudios;
11353
11545
  if (options.referenceAudioIdentity) {
11354
11546
  output.referenceAudioIdentity = options.referenceAudioIdentity;
11355
11547
  if (options._voicePersonaResolvedName || options.voicePersonaName) {
@@ -11360,6 +11552,10 @@ async function main() {
11360
11552
  output.refVideo = options.refVideo;
11361
11553
  if (options.videoStart !== null) output.videoStart = options.videoStart;
11362
11554
  }
11555
+ if (options.refVideos.length > 0) output.refVideos = options.refVideos;
11556
+ if (options.apiGenerateAudio !== null && isMiniMaxH3Model(options.model)) {
11557
+ output.generateAudio = options.apiGenerateAudio;
11558
+ }
11363
11559
  if (options.videoControlNetName && !isSeedanceModel(options.model)) {
11364
11560
  output.controlNet = {
11365
11561
  name: options.videoControlNetName,
package/version.mjs CHANGED
@@ -1 +1 @@
1
- export const PACKAGE_VERSION = '3.25.0';
1
+ export const PACKAGE_VERSION = '3.26.0';