Skip to content

Commit f928de2

Browse files
author
Raylan LIN
committed
docs: update SKILL.md, README.md, and --help for all new features
- SKILL.md: Add image (seed/width/height/optimizer/watermark), video (last-frame/subject-image/SEF/S2V), speech clone, speech design, updated piping patterns with new workflows - README.md: Add new command examples for image, video, speech, music - --help: All auto-generated from source, already correct - Build: dist/mmx.mjs rebuilt
1 parent 1e2462c commit f928de2

2 files changed

Lines changed: 99 additions & 5 deletions

File tree

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
## Features
1919

2020
- **Text** — Multi-turn chat, streaming, system prompts, JSON output
21-
- **Image** — Text-to-image with aspect ratio and batch controls
22-
- **Video** — Async video generation with progress tracking
23-
- **Speech** — TTS with 30+ voices, speed control, streaming playback
24-
- **Music** — Text-to-music with optional lyrics
21+
- **Image** — Text-to-image with aspect ratio, custom dimensions, reproducible seeds
22+
- **Video** — Async video generation with SEF (first+last frame) and subject reference
23+
- **Speech** — TTS with 30+ voices, speed control, streaming playback, voice cloning/design
24+
- **Music** — Text-to-music with lyrics, structured prompts, instrumental mode
2525
- **Vision** — Image understanding and description
2626
- **Search** — Web search powered by MiniMax
2727
- **Dual Region** — Seamless Global (`api.minimax.io`) and CN (`api.minimaxi.com`) support
@@ -75,6 +75,9 @@ cat messages.json | mmx text chat --messages-file - --output json
7575
mmx image "A cat in a spacesuit"
7676
mmx image generate --prompt "A cat" --n 3 --aspect-ratio 16:9
7777
mmx image generate --prompt "Logo" --out-dir ./out/
78+
mmx image generate --prompt "A castle" --seed 42 # Reproducible
79+
mmx image generate --prompt "Wide view" --width 1920 --height 1080 # Custom size
80+
mmx image generate --prompt "sunset" --prompt-optimizer # Auto-enhance prompt
7881
```
7982

8083
### `mmx video`
@@ -84,6 +87,8 @@ mmx video generate --prompt "Ocean waves at sunset" --async
8487
mmx video generate --prompt "A robot painting" --download sunset.mp4
8588
mmx video task get --task-id 123456
8689
mmx video download --file-id 176844028768320 --out video.mp4
90+
mmx video generate --prompt "Walk forward" --first-frame start.jpg --last-frame end.jpg # SEF
91+
mmx video generate --prompt "Detective walking" --subject-image character.jpg # Character consistency
8792
```
8893

8994
### `mmx speech`
@@ -94,6 +99,8 @@ mmx speech synthesize --text "Stream me" --stream | mpv -
9499
mmx speech synthesize --text "Hi" --voice English_magnetic_voiced_man --speed 1.2
95100
echo "Breaking news" | mmx speech synthesize --text-file - --out news.mp3
96101
mmx speech voices
102+
mmx speech clone --audio sample.wav --voice-id my_voice # Clone a voice
103+
mmx speech design --prompt "warm female alto" # Design a new voice
97104
```
98105

99106
### `mmx music`
@@ -102,6 +109,9 @@ mmx speech voices
102109
mmx music generate --prompt "Upbeat pop" --lyrics "[verse] La da dee, sunny day"
103110
mmx music generate --prompt "Jazz" --lyrics "La la la" --out song.mp3
104111
mmx music generate --prompt "Cinematic orchestral" --instrumental --out bgm.mp3
112+
mmx music generate --model "music-2.5+" --prompt "Epic orchestral" --instrumental # Native instrumental
113+
mmx music generate --prompt "indie folk" --lyrics-optimizer # Auto-generate lyrics
114+
mmx music generate --prompt "pop" --lyrics "La la la" --output-format url # 24h URL
105115
```
106116

107117
### `mmx vision`

skill/SKILL.md

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ mmx image generate --prompt <text> [flags]
9292
| `--prompt <text>` | string, **required** | Image description |
9393
| `--aspect-ratio <ratio>` | string | e.g. `16:9`, `1:1` |
9494
| `--n <count>` | number | Number of images (default: 1) |
95+
| `--seed <n>` | number | Random seed for reproducible generation |
96+
| `--width <px>` | number | Custom width [512–2048, must be multiple of 8] |
97+
| `--height <px>` | number | Custom height [512–2048, must be multiple of 8] |
98+
| `--prompt-optimizer` | boolean | Automatically optimize the prompt before generation |
99+
| `--aigc-watermark` | boolean | Embed AI-generated content watermark |
95100
| `--subject-ref <params>` | string | Subject reference: `type=character,image=path-or-url` |
96101
| `--out-dir <dir>` | string | Download images to directory |
97102
| `--out-prefix <prefix>` | string | Filename prefix (default: `image`) |
@@ -102,6 +107,15 @@ mmx image generate --prompt "A cat in a spacesuit" --output json --quiet
102107

103108
mmx image generate --prompt "Logo" --n 3 --out-dir ./gen/ --quiet
104109
# stdout: saved file paths (one per line)
110+
111+
# Reproducible generation
112+
mmx image generate --prompt "A castle" --seed 42 --out-dir ./castle/ --quiet
113+
114+
# Custom dimensions (must be 512–2048, multiple of 8)
115+
mmx image generate --prompt "Wide landscape" --width 1920 --height 1080 --out-dir ./land/ --quiet
116+
117+
# Optimized prompt with watermark
118+
mmx image generate --prompt "sunset" --prompt-optimizer --aigc-watermark --out-dir ./opt/ --quiet
105119
```
106120

107121
---
@@ -110,15 +124,19 @@ mmx image generate --prompt "Logo" --n 3 --out-dir ./gen/ --quiet
110124

111125
Generate video. Default model: `MiniMax-Hailuo-2.3`. This is an async task — by default it polls until completion.
112126

127+
Auto-switches model based on flags: `--last-frame``MiniMax-Hailuo-02` (SEF), `--subject-image``S2V-01` (subject reference).
128+
113129
```bash
114130
mmx video generate --prompt <text> [flags]
115131
```
116132

117133
| Flag | Type | Description |
118134
|---|---|---|
119135
| `--prompt <text>` | string, **required** | Video description |
120-
| `--model <model>` | string | `MiniMax-Hailuo-2.3` (default) or `MiniMax-Hailuo-2.3-Fast` |
136+
| `--model <model>` | string | `MiniMax-Hailuo-2.3` (default), `MiniMax-Hailuo-2.3-Fast`. Auto-overridden by `--last-frame` (Hailuo-02) or `--subject-image` (S2V-01). |
121137
| `--first-frame <path-or-url>` | string | First frame image |
138+
| `--last-frame <path-or-url>` | string | Last frame image (SEF mode, auto-switches to Hailuo-02) |
139+
| `--subject-image <path-or-url>` | string | Subject reference image for character consistency (auto-switches to S2V-01) |
122140
| `--callback-url <url>` | string | Webhook URL for completion |
123141
| `--download <path>` | string | Save video to specific file |
124142
| `--async` | boolean | Return task ID immediately |
@@ -133,6 +151,12 @@ mmx video generate --prompt "A robot." --async --quiet
133151
# Blocking: wait and get file path
134152
mmx video generate --prompt "Ocean waves." --download ocean.mp4 --quiet
135153
# stdout: ocean.mp4
154+
155+
# SEF: first + last frame interpolation (uses Hailuo-02)
156+
mmx video generate --prompt "Walk forward" --first-frame start.jpg --last-frame end.jpg --download walk.mp4
157+
158+
# Subject reference: character consistency (uses S2V-01)
159+
mmx video generate --prompt "A detective walking" --subject-image character.jpg --download detective.mp4
136160
```
137161

138162
### video task get
@@ -188,6 +212,49 @@ mmx speech synthesize --text "Hello world" --out hello.mp3 --quiet
188212
echo "Breaking news." | mmx speech synthesize --text-file - --out news.mp3
189213
```
190214

215+
### speech clone
216+
217+
Clone a voice from an audio sample. Two-step process: upload audio → clone.
218+
219+
```bash
220+
mmx speech clone --audio <path> --voice-id <name> [flags]
221+
```
222+
223+
| Flag | Type | Description |
224+
|---|---|---|
225+
| `--audio <path>` | string, **required** | Path to the reference audio file (mp3/wav) |
226+
| `--voice-id <name>` | string, **required** | Unique identifier for the cloned voice |
227+
| `--description <text>` | string | Description of the cloned voice |
228+
| `--clone-prompt <text>` | string | Text prompt to guide the cloning process |
229+
| `--out <path>` | string | Save clone result to JSON file |
230+
231+
```bash
232+
mmx speech clone --audio reference.wav --voice-id my_voice --out clone_result.json --quiet
233+
# stdout: clone result JSON
234+
```
235+
236+
### speech design
237+
238+
Design a custom voice from a text description.
239+
240+
```bash
241+
mmx speech design --prompt <text> [flags]
242+
```
243+
244+
| Flag | Type | Description |
245+
|---|---|---|
246+
| `--prompt <text>` | string, **required** | Voice description (e.g. "warm female alto, calm tone") |
247+
| `--preview-text <text>` | string | Text to generate a preview with the designed voice |
248+
| `--voice-id <id>` | string | Custom voice ID to assign to the designed voice |
249+
| `--out <path>` | string | Save design result to JSON file |
250+
251+
```bash
252+
mmx speech design --prompt "warm female alto, calm and soothing tone" --out design_result.json --quiet
253+
# stdout: design result JSON
254+
255+
mmx speech design --prompt "energetic young male voice" --preview-text "Hello, this is a test." --quiet
256+
```
257+
191258
---
192259

193260
### music generate
@@ -398,6 +465,23 @@ mmx vision describe --image "$URL" --quiet
398465
TASK=$(mmx video generate --prompt "A robot" --async --quiet | jq -r '.taskId')
399466
mmx video task get --task-id "$TASK" --output json
400467
mmx video download --task-id "$TASK" --out robot.mp4
468+
469+
# Voice cloning workflow
470+
mmx speech clone --audio sample.wav --voice-id my_voice --out clone.json --quiet
471+
VOICE_ID=$(jq -r '.voice_id' clone.json)
472+
mmx speech synthesize --text "Hello from my voice" --voice "$VOICE_ID" --out hello.mp3
473+
474+
# SEF video: generate frames → interpolate video
475+
mmx image generate --prompt "start of journey" --out-dir /tmp/sef-start --quiet
476+
mmx image generate --prompt "end of journey" --out-dir /tmp/sef-end --quiet
477+
START=$(ls /tmp/sef-start/image_001.jpg)
478+
END=$(ls /tmp/sef-end/image_001.jpg)
479+
mmx video generate --prompt "Walk forward" --first-frame "$START" --last-frame "$END" --download walk.mp4
480+
481+
# Reproducible image generation
482+
mmx image generate --prompt "A landscape" --seed 42 --out-dir ./v1/ --quiet
483+
mmx image generate --prompt "A landscape" --seed 42 --out-dir ./v2/ --quiet
484+
# Both produce identical images
401485
```
402486

403487
---

0 commit comments

Comments
 (0)