Skip to content

Commit 233ff94

Browse files
author
Raylan LIN
committed
docs: improve --help descriptions for music, image, video
- --lyrics: list all 14 supported structure tags, warn against descriptions inside brackets, note 3500 char limit - --instrumental: explain music-2.5+ vs music-2.5 behavior - --seed: note same seed + prompt = identical output - --width/--height: note [512,2048], multiple of 8, overrides aspect-ratio - --last-frame: note SEF mode, requires --first-frame, uses Hailuo-02 - --subject-image: note S2V-01 model, character consistency - --prompt-optimizer: explain purpose - --output-format: note 24h url expiry - Add full arrangement example to music generate
1 parent f928de2 commit 233ff94

3 files changed

Lines changed: 26 additions & 24 deletions

File tree

src/commands/image/generate.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ export default defineCommand({
2424
usage: 'mmx image generate --prompt <text> [flags]',
2525
options: [
2626
{ flag: '--prompt <text>', description: 'Image description', required: true },
27-
{ flag: '--aspect-ratio <ratio>', description: 'Aspect ratio (e.g. 16:9, 1:1)' },
27+
{ flag: '--aspect-ratio <ratio>', description: 'Aspect ratio (e.g. 16:9, 1:1). Ignored if --width and --height are both specified.' },
2828
{ flag: '--n <count>', description: 'Number of images to generate (default: 1)', type: 'number' },
29-
{ flag: '--seed <n>', description: 'Random seed for reproducible results', type: 'number' },
30-
{ flag: '--width <px>', description: 'Custom width [5122048, must be multiple of 8]', type: 'number' },
31-
{ flag: '--height <px>', description: 'Custom height [5122048, must be multiple of 8]', type: 'number' },
32-
{ flag: '--prompt-optimizer', description: 'Automatically optimize the prompt before generation' },
33-
{ flag: '--aigc-watermark', description: 'Embed AI-generated content watermark' },
34-
{ flag: '--subject-ref <params>', description: 'Subject reference (type=character,image=path)' },
29+
{ flag: '--seed <n>', description: 'Random seed for reproducible generation (same seed + prompt = identical output)', type: 'number' },
30+
{ flag: '--width <px>', description: 'Custom width in pixels. Range [512, 2048], must be multiple of 8. Only effective for image-01 model. Overrides --aspect-ratio if set.', type: 'number' },
31+
{ flag: '--height <px>', description: 'Custom height in pixels. Range [512, 2048], must be multiple of 8. Only effective for image-01 model. Overrides --aspect-ratio if set.', type: 'number' },
32+
{ flag: '--prompt-optimizer', description: 'Automatically optimize the prompt before generation for better results.' },
33+
{ flag: '--aigc-watermark', description: 'Embed AI-generated content watermark in the output image.' },
34+
{ flag: '--subject-ref <params>', description: 'Subject reference for character consistency. Format: type=character,image=path-or-url' },
3535
{ flag: '--out-dir <dir>', description: 'Download images to directory' },
3636
{ flag: '--out-prefix <prefix>', description: 'Filename prefix (default: image)' },
3737
],

src/commands/music/generate.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@ export default defineCommand({
1515
description: 'Generate a song (music-2.5 / music-2.5+)',
1616
usage: 'mmx music generate --prompt <text> (--lyrics <text> | --instrumental) [--out <path>] [flags]',
1717
options: [
18-
{ flag: '--prompt <text>', description: 'Music style description (can be detailed — see examples)' },
19-
{ flag: '--lyrics <text>', description: 'Song lyrics with structure tags. Use "无歌词" for instrumental music. Cannot be used with --instrumental.' },
20-
{ flag: '--lyrics-file <path>', description: 'Read lyrics from file. Use "无歌词" for instrumental. (use - for stdin)' },
18+
{ flag: '--prompt <text>', description: 'Music style description (e.g. "cinematic orchestral, building tension"). Max 2000 chars when combined with structured flags.' },
19+
{ flag: '--lyrics <text>', description: 'Song lyrics with structure tags (newline separated). Supported: [Intro], [Verse], [Pre Chorus], [Chorus], [Interlude], [Bridge], [Outro], [Post Chorus], [Transition], [Break], [Hook], [Build Up], [Inst], [Solo]. ⚠️ Tags must be clean — no descriptions inside brackets (they will be sung). Max 3500 chars. Use "\u65e0\u6b4c\u8bcd" for instrumental workaround. Cannot be used with --instrumental.' },
20+
{ flag: '--lyrics-file <path>', description: 'Read lyrics from file (use - for stdin). Same tag rules as --lyrics.' },
2121
{ flag: '--vocals <text>', description: 'Vocal style, e.g. "warm male baritone", "bright female soprano", "duet with harmonies"' },
22-
{ flag: '--genre <text>', description: 'Music genre, e.g. folk, pop, jazz' },
22+
{ flag: '--genre <text>', description: 'Music genre, e.g. folk, pop, jazz, electronic' },
2323
{ flag: '--mood <text>', description: 'Mood or emotion, e.g. warm, melancholic, uplifting' },
24-
{ flag: '--instruments <text>', description: 'Instruments to feature, e.g. "acoustic guitar, piano"' },
24+
{ flag: '--instruments <text>', description: 'Instruments to feature, e.g. "acoustic guitar, piano, strings"' },
2525
{ flag: '--tempo <text>', description: 'Tempo description, e.g. fast, slow, moderate' },
2626
{ flag: '--bpm <number>', description: 'Exact tempo in beats per minute', type: 'number' },
2727
{ flag: '--key <text>', description: 'Musical key, e.g. C major, A minor, G sharp' },
2828
{ flag: '--avoid <text>', description: 'Elements to avoid in the generated music' },
2929
{ flag: '--use-case <text>', description: 'Use case context, e.g. "background music for video", "theme song"' },
3030
{ flag: '--structure <text>', description: 'Song structure, e.g. "verse-chorus-verse-bridge-chorus"' },
31-
{ flag: '--references <text>', description: 'Reference tracks or artists, e.g. "similar to Ed Sheeran, Taylor Swift"' },
31+
{ flag: '--references <text>', description: 'Reference tracks or artists, e.g. "similar to Ed Sheeran"' },
3232
{ flag: '--extra <text>', description: 'Additional fine-grained requirements not covered above' },
33-
{ flag: '--model <model>', description: 'Model to use: music-2.5 or music-2.5+ (recommended). music-2.5+ supports is_instrumental flag.' },
34-
{ flag: '--instrumental', description: 'Generate instrumental music (no vocals). music-2.5: lyrics workaround. music-2.5+: native is_instrumental flag.' },
35-
{ flag: '--lyrics-optimizer', description: 'Auto-generate lyrics from prompt. Only works when lyrics is empty. music-2.5 and music-2.5+ support.' },
36-
{ flag: '--output-format <fmt>', description: 'Return format: hex (default, saved to file) or url (24h expiry). When --stream, only hex.' },
37-
{ flag: '--aigc-watermark', description: 'Embed AI-generated content watermark in audio for content provenance' },
33+
{ flag: '--model <model>', description: 'Model: music-2.5 or music-2.5+ (recommended). music-2.5+ supports native is_instrumental.' },
34+
{ flag: '--instrumental', description: 'Generate instrumental music (no vocals). music-2.5+: native is_instrumental flag. music-2.5: [intro][outro] lyrics workaround.' },
35+
{ flag: '--lyrics-optimizer', description: 'Auto-generate lyrics from prompt. Only works when lyrics is empty. Supports music-2.5 and music-2.5+.' },
36+
{ flag: '--output-format <fmt>', description: 'Return format: hex (default, saved to file) or url (24h expiry, download promptly). When --stream, only hex.' },
37+
{ flag: '--aigc-watermark', description: 'Embed AI-generated content watermark. Only effective when --stream is false.' },
3838
{ flag: '--format <fmt>', description: 'Audio format (default: mp3)' },
3939
{ flag: '--sample-rate <hz>', description: 'Sample rate (default: 44100)', type: 'number' },
4040
{ flag: '--bitrate <bps>', description: 'Bitrate (default: 256000)', type: 'number' },
@@ -54,6 +54,8 @@ export default defineCommand({
5454
'mmx music generate --prompt "indie folk, melancholic" --lyrics-optimizer --out auto.mp3',
5555
'# URL output (24h expiry — download promptly):',
5656
'mmx music generate --prompt "Upbeat pop" --lyrics "La la la..." --output-format url --quiet',
57+
'# Album song with full arrangement:',
58+
'mmx music generate --model "music-2.5+" --prompt "Atmospheric electronic, B minor, 85 BPM" --lyrics-file "song.txt" --vocals "Warm male baritone" --genre "atmospheric electronic" --instruments "piano, strings" --bpm 85 --key "B minor" --structure "Intro-Verse-Chorus-Bridge-Outro" --references "Bon Iver" --extra "Bridge drop-out." --out "demo.mp3"',
5759
],
5860
async run(config: Config, flags: GlobalFlags) {
5961
let prompt = flags.prompt as string | undefined;

src/commands/video/generate.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ export default defineCommand({
2424
description: 'Generate a video (Hailuo-2.3 / 2.3-Fast / Hailuo-02 / S2V-01)',
2525
usage: 'mmx video generate --prompt <text> [flags]',
2626
options: [
27-
{ flag: '--model <model>', description: 'Model ID (default: MiniMax-Hailuo-2.3). Auto-switches to Hailuo-02 with --last-frame, S2V-01 with --subject-image.' },
27+
{ flag: '--model <model>', description: 'Model ID (default: MiniMax-Hailuo-2.3). Auto-switched to Hailuo-02 with --last-frame, or S2V-01 with --subject-image.' },
2828
{ flag: '--prompt <text>', description: 'Video description', required: true },
29-
{ flag: '--first-frame <path-or-url>', description: 'First frame image' },
30-
{ flag: '--last-frame <path-or-url>', description: 'Last frame image (SEF mode, auto-switches to Hailuo-02 model)' },
31-
{ flag: '--subject-image <path-or-url>', description: 'Subject reference image for character consistency (auto-switches to S2V-01 model)' },
29+
{ flag: '--first-frame <path-or-url>', description: 'First frame image (local path or URL). Auto base64-encoded for local files.' },
30+
{ flag: '--last-frame <path-or-url>', description: 'Last frame image (local path or URL). Enables SEF (start-end frame) interpolation mode with Hailuo-02 model. Requires --first-frame.' },
31+
{ flag: '--subject-image <path-or-url>', description: 'Subject reference image for character consistency (local path or URL). Switches to S2V-01 model.' },
3232
{ flag: '--callback-url <url>', description: 'Webhook URL for completion notification' },
3333
{ flag: '--download <path>', description: 'Save video to file on completion' },
34-
{ flag: '--no-wait', description: 'Return task ID immediately without waiting' },
34+
{ flag: '--no-wait', description: 'Return task ID immediately without waiting for completion' },
3535
{ flag: '--async', description: 'Return task ID immediately (agent/CI mode, same as --no-wait but explicit)' },
36-
{ flag: '--poll-interval <seconds>', description: 'Polling interval when waiting (default: 5)', type: 'number' },
36+
{ flag: '--poll-interval <seconds>', description: 'Polling interval when waiting for completion (default: 5)', type: 'number' },
3737
],
3838
examples: [
3939
'mmx video generate --prompt "A man reads a book. Static shot."',

0 commit comments

Comments
 (0)