FoxAIHubFoxAIHub
Prompt Engineering · MiniMax H3 (minimax_ia2v)

How to Write MiniMax H3 Lip Sync (ia2v) Prompts That Actually Sync

MiniMax H3's audio-driven lip-sync model (minimax_ia2v) is extraordinarily sensitive to prompt structure. Free-form descriptions routinely produce mumbled lips, burned-in gibberish subtitles, or color drift by the end of a 6-second shot. This guide documents the exact prompt specification, validation rules, and camera-clamping logic our own MV pipeline runs in production—and the underlying H3 latent mechanics behind every rule.

A
Austin · Video Pipeline & Inference Engineer
Published · Last updated · 10 min read

1. Why Free-Form Prompts Fail on MiniMax H3 (ia2v)

Before memorizing formatting rules, it helps to understand what minimax_ia2v actually does inside the inference worker. Unlike legacy talking-head models (Wav2Lip, SadTalker, LivePortrait) that crop a face bounding box and warp a mouth mask, MiniMax H3 is a joint video-and-audio diffusion model (I2VA).

During audio-driven lip sync, our H3 bridge encodes your vocal clip with the H3 Audio VAE, writes it into the audio half of the joint AV latent, and pins it with an all-zero noise mask (noise_mask = 1 for video, 0 for audio). At every denoising step, the video tokens attend directly to that pinned audio latent through the same cross-stream joint attention learned during pre-training.

The key engineering takeaway: Because joint AV attention is not a hardcoded face-lip module, the text prompt acts as the semantic router that tells the model who in <Picture 1> is producing the pinned vocal track. If your prompt spends 80 words describing rain, cinematography, and backstory without immediately declaring that the subject is singing toward camera, attention diffuses into background motion and the mouth drifts out of sync.

This single architectural fact explains almost every rule below: why the prompt uses MiniMax H3's I2VA schema, why lyrics must stay out, why cuts are banned, and why 25 crisp words beat 180 poetic words every time.

2. The Mandatory MiniMax H3 I2VA Prompt Layout

Adapted directly from the official MiniMax H3 Video Prompt Writing Guide (base-en.txt), every minimax_ia2v prompt must follow a two-part structure: an exact frame-zero alignment header, one blank line, and a single integrated_multimodal_description: field starting with [Shot 1].

Canonical minimax_ia2v prompt template
For the target video, at 0.00 seconds into the target video, <Picture 1> (from [Shot 1]) is fully referenced.

integrated_multimodal_description: [Shot 1] Live-action, cinematic, the recurring main character (S1) in <Picture 1> is singing toward the camera, the mouth movements follow the audio exactly, with natural expressions and subtle head motion. The camera pushes in very slowly with small amplitude, consistent identity, color grading and lighting throughout with no shift in hue or exposure, and soft breath intakes between sung phrases.
Required Tokens
  • Exact header line referencing <Picture 1> (from [Shot 1]) at 0.00 seconds
  • Single field marker integrated_multimodal_description:
  • Shot tag [Shot 1] with no timestamp
  • Speaker tag (S1) bound to the lead vocalist in <Picture 1>
Must Be Omitted
  • No overall_soundscape: section
  • No non_diegetic_music: section
  • No [Shot 2] or cut timestamps
  • No quoted lyrics, transcript text, or <d> dialogue tags

Why omit soundscape and music fields? Because your real audio slice is already pinned in the audio latent. Adding separate soundscape or background-music directives is unnecessary and can compete with vocal clarity. If you want subtle vocal realism (such as soft breath intakes between sung phrases), embed it inline at the end of the description sentence.

3. Seven Production Prompt Rules (From Our MV Agent)

Every lip-sync shot generated by FoxAIHub's automated music-video agent passes through these seven constraints before it ever hits a GPU worker.

  1. Rule 1 — Start immediately with singing in the very first sentence

    Do not warm up with atmosphere or backstory. Right after the medium tag, declare the singer (S1) is actively singing toward the camera with audio-locked mouth movement:the recurring main character (S1) in <Picture 1> is singing toward the camera, the mouth movements follow the audio exactlyConvey vocal intensity with plain performance adverbs (singing sadly, singing passionately, singing warmly) rather than quoting lyrics.

  2. Rule 2 — Keep it minimalist (20–40 words) and micro-performance only

    Audio waveform drives the jaw, lips, and cadence. Your prose should only add light secondary life: natural expressions, subtle head motion, gentle hand gesture, or soft breath intakes between sung phrases. Avoid anatomical facial essays and never describe sprinting, jumping, spin turns, dense crowds, or full dance choreography—large displacement pulls the head out of the sync window.

  3. Rule 3 — Strictly single-shot ([Shot 1] only, zero cuts)

    While standard minimax_i2v can use up to two shots ([Shot 1] + [Shot 2]), audio-driven lip sync must always remain one unbroken take. Any cut marker, cuts to, transitions to, or cross-dissolve disrupts identity and lip timing. If you want angle changes across a chorus, generate separate lip-sync clips from distinct first frames and cut them in your editor.

  4. Rule 4 — Match the render medium token to your starting image

    Right after [Shot 1], state the exact visual medium of <Picture 1>: use Live-action, cinematic only for photorealistic human portraits. For stylized characters, write 2D anime, cel-shaded, 2D illustrated animation, or 3D CG animation. Leaving Live-action on an anime portrait is the #1 cause of uncanny realistic morphing after frame 1.

  5. Rule 5 — Zero lyrics, zero transcripts, zero on-screen text cues

    Never paste lyric words, dialogue quotes, or H3 <d>...</d> speech tags into minimax_ia2v. Text-conditioned speech tags are useful when the model is synthesizing speech from scratch; when an actual vocal recording is already pinned in the audio latent, embedding lyrics either creates visual text artifacts or conflicts with the true vocal rhythm.

  6. Rule 6 — Keep the mouth unobstructed & govern microphones explicitly

    Lip sync is not restricted to monotonous medium portraits—close-ups, waist-up medium shots, and grounded stage shots all work well, provided the face and lips remain clearly illuminated and unobstructed throughout (no turning away, no hand crossing the lips, no heavy hair curtain, no extreme silhouette backlighting). In our pipeline, microphones are gated by a run-level boolean policy: unless the scene is explicitly a live concert or studio recording, keep microphone, mic stand, and cables out of both prompts; when allowed, position the mic below the mouth line.

    Edge case — masked or helmeted protagonists: Keep the mask on the upper face/head in the first frame with the mouth slightly parted for active singing, and keep the video_prompt a clean standard singing prompt without mentioning "sealed mask" rules that would freeze the jaw.

  7. Rule 7 — Lock color grading, exposure, and texture to <Picture 1>

    Even in a calm singing take, video diffusion models can slowly drift white balance, saturation, or contrast over 6–15 seconds—making consecutive MV cuts look like different color grades. End every prompt with an explicit hold sentence stating that color palette, lighting, exposure, and texture stay identical to <Picture 1> from first frame to last. Do not repeat specific hex codes or lighting recipes here; simply lock continuity to the starting frame.

4. The 8 Safe Camera Moves (Why Static Isn't Enough)

MiniMax H3 responds cleanly to standardized 3-dimensional camera syntax: <Motion Type> with <amplitude> amplitude at <speed> speed. Although Static Shot is valid syntax, purely locked-off prompts make singing shots look artificial and lifeless. At the same time, fast moves like whip pan, snap zoom, rack focus, or large cranes break mouth readability.

In production, our camera lock (clampLipSyncMove) restricts every lip-sync shot to the 8 gentle camera types below and unconditionally clamps amplitude to small and speed to slow:

TypeH3 Canonical PhraseBest Used For
push_inpush in with small amplitude at slow speed
Close-up portraits & emotional chorus lines
Default choice; gradually draws focus toward eyes and lips without cropping the chin.
pull_outpull out with small amplitude at slow speed
Tight close-ups opening slightly to reveal shoulders/context
Keep amplitude strictly small so the face never shrinks below readable pixel resolution.
handheld_drifthandheld drift with small amplitude at slow speed
Medium shots & intimate live-feel A-roll
Adds organic camera breathing while keeping the subject anchored in the center safe zone.
tilt_uptilt up with small amplitude at slow speed
Building vocal phrases & lifted-chin deliveries
Never tilt past the lips; keep the full lower face inside the central 90% frame.
tilt_downtilt down with small amplitude at slow speed
Soft verse resolutions & seated singing stances
Subtle downward settle that pairs well with quiet vocal phrasing.
truck_lefttruck left with small amplitude at slow speed
Medium/wide performance shots with layered background depth
Creates gentle parallax behind the singer without turning the subject into profile.
truck_righttruck right with small amplitude at slow speed
Alternating lateral direction between consecutive lip-sync clips
Rotate opposite to the previous shot's direction to avoid repetitive cuts in an MV.
arcarc shot with small amplitude at slow speed
Stage or studio performance shots with frontal/3/4 lighting
Keep angular travel minimal so the singer stays frontal to 3/4 view—never full side profile.

5. Division of Labor: First-Frame Prompt vs. Video Prompt

A frequent mistake in image+audio pipelines is dumping the entire visual description of the scene into the video prompt. Remember: minimax_ia2v already receives the rendered starting frame (params.image). Repeating detailed wardrobe, lens, lighting, and background prose inside params.prompt dilutes the singing and motion signal.

ResponsibilityFirst-Frame Prompt (Generates <Picture 1>)Video Prompt (Sent to minimax_ia2v)
Framing & ScaleExplicit framing lead up front (e.g. Close-up portrait: or Medium shot from waist up:) with face inside central 90% safe area.Inherits framing from <Picture 1>; only specifies gentle camera drift/push/pull.
Pose, Gaze & Vocal DeliveryNatural stance (seated on stool, leaning slightly, hand near chest), gaze angle, and lips relaxed or slightly parted ready to sing.Declares active singing toward camera, exact audio-driven mouth sync, natural expressions, subtle head motion, and soft breath intakes.
Color, Lighting & TextureOwns the complete palette (1–2 explicit color cues to prevent B&W drift), key light on face/lips, and film or anime texture.Declares medium token (Live-action, cinematic or 2D anime, cel-shaded) + one end-to-end color/lighting hold sentence.
Shot DifferentiationCarries 90% of visual variety across an MV (new location, framing scale, pose, and section lighting).Intentionally standardized and short—skip repetition penalties on lip-sync video_prompt text.

6. Production Copy-Paste Templates & Anti-Patterns

Use these directly as system templates—or feed them alongside your scene intent to a lightweight LLM rewriter so user input is normalized before hitting the API.

Template A — Emotion-Driven Ballad (Live-Action)

minimax_ia2v · live-action ballad
For the target video, at 0.00 seconds into the target video, <Picture 1> (from [Shot 1]) is fully referenced.

integrated_multimodal_description: [Shot 1] Live-action, cinematic, the vocalist (S1) in <Picture 1> is singing sadly toward the lens under warm amber key light, the mouth movements follow the audio track with natural lip and jaw articulation, her eyelids softening as the phrase resolves. A gentle handheld drift with small amplitude at slow speed keeps her face and lips clearly illuminated and unobstructed throughout. The color palette, lighting and film texture stay identical to <Picture 1> for the entire clip, with the same hue, saturation, exposure and white balance held in the last frame as in the first.

Template B — Stylized 2D Anime / Cel-Shaded Vocalist

minimax_ia2v · 2D anime
For the target video, at 0.00 seconds into the target video, <Picture 1> (from [Shot 1]) is fully referenced.

integrated_multimodal_description: [Shot 1] 2D anime, cel-shaded, the recurring main character (S1) in <Picture 1> is singing passionately toward the camera, the mouth movements follow the audio exactly, with expressive eyes, subtle head motion, and one hand resting gently near the chest. The camera holds a very slow pull out with small amplitude, keeping the character's face and lips clearly readable throughout. The color palette, lighting and cel-shaded texture stay identical to <Picture 1> for the entire clip, with no shift in hue, exposure or white balance.

Anti-Pattern — What NOT to Send (5 Bugs in One Prompt)

anti-pattern · do not use
Close-up of a young woman standing on a rainy rooftop under neon lights. She looks heartbroken as she sings "I will never let you go tonight" while rain falls on her face. [Shot 2] At 00:03.500, the camera whip-pans around her back as she spins and starts dancing energetically to the chorus.

overall_soundscape: Heavy rain and distant city traffic.
non_diegetic_music: Emotional synth-pop ballad with swelling strings.
  • Missing the mandatory <Picture 1> header and integrated_multimodal_description: field.
  • Starts with setting/mood instead of declaring (S1) is singing with audio-synced mouth movements.
  • Includes quoted lyrics ("I will never let you go tonight") that trigger burned-in text artifacts.
  • Cuts to [Shot 2] with a whip-pan and back-turn, destroying lip sync halfway through.
  • Appends overall_soundscape and non_diegetic_music blocks that don't belong in audio-driven ia2v.

7. Automating Validation & Calling the API

If an LLM generates prompts in your pipeline, never send raw model output straight to the video endpoint. Run a deterministic, zero-cost validation pass first—then append the color/lighting continuity lock right before submission. The TypeScript snippet below mirrors the exact checks our MV prompt stage enforces:

validate-minimax-ia2v-prompt.ts
// Production guardrails distilled from FoxAIHub's MV Stage-4 prompt validator
const LIP_SYNC_PERFORMANCE_RE =
  /\b(lip[- ]?sync(?:ed|hronized)?|lip movements?|mouth movements?|sings?|singing|mouths the)\b/i;

const LIP_SYNC_FORBIDDEN_MOTION_RE =
  /\b(whip pan|snap zoom|rack focus|sprints?|sprinting|jumping|leaps?|dance choreography|choreograph\w*|crowd|turns? away from (?:the )?camera|back to (?:the )?camera|covers? (?:her|his|their) mouth)\b/i;

const EDIT_CUT_RE =
  /\[Shot\s*[2-9]\]|\b(cuts? (?:to|away to|back to)|cross ?dissolves?|transitions? to|montage|intercut)\b/i;

const LYRICS_OR_TEXT_RE =
  /<d>[\s\S]*?<\/d>|\b(lyrics|subtitles?|captions?|handwritten|readable text)\b/i;

export const LIP_SYNC_SAFE_CAMERAS = [
  "push in",
  "pull out",
  "tilt up",
  "tilt down",
  "truck left",
  "truck right",
  "arc shot",
  "handheld drift",
] as const;

export const STYLE_HOLD_SENTENCE =
  "The color palette, lighting and film texture stay identical to <Picture 1> for the entire clip, with the same hue, saturation, exposure and white balance held in the last frame as in the first.";

export function validateMinimaxIa2vPrompt(rawPrompt: string): string[] {
  const errors: string[] = [];
  const prompt = rawPrompt.trim();

  if (!prompt.startsWith("For the target video, at 0.00 seconds into the target video, <Picture 1>")) {
    errors.push("Missing mandatory MiniMax H3 <Picture 1> alignment header.");
  }
  if (!prompt.includes("integrated_multimodal_description:")) {
    errors.push("Missing required integrated_multimodal_description: field.");
  }
  if (/\b(overall_soundscape|non_diegetic_music):/i.test(prompt)) {
    errors.push("Do not output overall_soundscape or non_diegetic_music for minimax_ia2v.");
  }

  const body = prompt.split("integrated_multimodal_description:")[1]?.trim() ?? prompt;
  const firstSentence = body.split(/[.!?\n]/)[0] ?? "";

  if (!LIP_SYNC_PERFORMANCE_RE.test(firstSentence)) {
    errors.push("First sentence must explicitly state the character is singing with audio-synced mouth movement.");
  }
  if (EDIT_CUT_RE.test(body)) {
    errors.push("Lip-sync prompts must be strictly single-shot ([Shot 1] only) with no cuts or transitions.");
  }
  const forbidden = LIP_SYNC_FORBIDDEN_MOTION_RE.exec(body);
  if (forbidden) {
    errors.push(`Motion "${forbidden[0]}" risks hiding the mouth or breaking sync; use subtle head/hand motion.`);
  }
  if (LYRICS_OR_TEXT_RE.test(body)) {
    errors.push("Remove lyrics, <d> tags, or text/subtitle cues; audio waveform drives lip articulation directly.");
  }

  return errors;
}

export function appendStyleHold(prompt: string): string {
  const key = "color palette, lighting and film texture stay identical";
  if (prompt.toLowerCase().includes(key)) return prompt;
  return `${prompt.replace(/[.\s]+$/, ".")} ${STYLE_HOLD_SENTENCE}`;
}

Submitting a Validated Prompt to POST /api/v2/aigc/task

Pair your validated prompt with a cleanly lit portrait image and an integer-second audio clip (3–15 seconds, re-encoded rather than ffmpeg -c copy so frame count matches duration × 24 + 1 without MP3 frame drift):

curl · POST /api/v2/aigc/task (minimax_ia2v)
curl -X POST "https://api.foxaihub.com/api/v2/aigc/task" \
  -H "api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "task_type": "minimax_ia2v",
    "params": {
      "image": "https://cdn.example.com/singer-first-frame.png",
      "audio": "https://cdn.example.com/vocal-slice-6s.wav",
      "resolution": "768p",
      "aspect_ratio": "9:16",
      "duration": 6,
      "prompt": "For the target video, at 0.00 seconds into the target video, <Picture 1> (from [Shot 1]) is fully referenced.\n\nintegrated_multimodal_description: [Shot 1] Live-action, cinematic, the recurring main character (S1) in <Picture 1> is singing toward the camera, the mouth movements follow the audio exactly, with natural expressions and subtle head motion. The camera pushes in very slowly with small amplitude, keeping her face and lips clearly illuminated throughout. The color palette, lighting and film texture stay identical to <Picture 1> for the entire clip, with the same hue, saturation, exposure and white balance held in the last frame as in the first."
    }
  }'

8. Troubleshooting Prompt Failure Modes

When a lip-sync render looks off, check the prompt against this diagnostic table before changing your audio or retrying with a higher resolution:

Observed SymptomLikely Prompt CauseFix
Mouth barely opens or mumbles out of sync with clear vocalsPrompt describes scene mood first and forgets to declare active singing in sentence one, or omits speaker tag (S1).Open [Shot 1] immediately with 'the recurring main character (S1) in <Picture 1> is singing toward the camera, the mouth movements follow the audio exactly...'
Random garbled English/Chinese text burns into the bottom of the frameLyric lines, quoted dialogue, or <d> tags were copied into the prompt.Strip all lyrics, quotes, and text references. Translate mood into adverbs ('singing sadly') instead of quoting the line.
Face morphs or lip sync suddenly breaks at second 3–4Prompt included [Shot 2], 'cuts to', a fast spin/turn, or an aggressive camera move ('whip pan', 'snap zoom').Enforce strictly [Shot 1] only and clamp camera motion to the 8 gentle types with small amplitude at slow speed.
Anime or 3D character turns photorealistic after frame 1Boilerplate 'Live-action, cinematic' was left at the start of [Shot 1].Match the medium token to <Picture 1>: use '2D anime, cel-shaded' or '3D CG animation' and remove photographic lens/grain terms.
Warm amber lighting drifts cool/washed-out by the end of the clipNo explicit end-to-end color/exposure anchor inside the video prompt.Append the deterministic STYLE_HOLD_SENTENCE at the end of integrated_multimodal_description.
A phantom microphone appears in front of the mouth and blocks lipsPrompt implied 'on stage singing' without guarding microphone presence, or user asked for singing without a mic policy.Keep non-concert prompts free of 'microphone / mic / stage stand'. When a live mic is intended, place it below the chin so lips stay unobstructed.

9. Frequently Asked Questions

Should I put song lyrics or dialogue transcripts inside a minimax_ia2v prompt?

No. In MiniMax H3 audio-driven lip sync (minimax_ia2v), mouth articulation is driven directly by the encoded audio waveform pinned in the audio half of the joint AV latent. Putting lyrics, quoted lines, or <d> dialogue tags in the prompt does not improve sync—it often causes the model to render garbled on-screen subtitles or fight the actual vocal timing.

Can a minimax_ia2v lip-sync prompt contain [Shot 2] or camera cuts?

No. Keep every lip-sync prompt strictly single-shot ([Shot 1] only) with zero edit transitions such as 'cuts to', 'transitions to', or 'cross-dissolve'. Multi-shot cutting is reserved for image-to-video (minimax_i2v); cutting inside an audio-driven lip-sync clip breaks face lock and causes mouth sync to drift.

Why shouldn't I use 'Static Shot' or 'Steady camera' for lip-sync prompts?

Pure static prompts frequently produce stiff, poster-like clips where only the lips move while the head and frame look frozen. Using a gentle, very-small-amplitude move—such as 'push in with small amplitude at slow speed' or 'handheld drift with small amplitude at slow speed'—keeps the frame alive without pulling the mouth out of frame.

How do I stop anime or 3D characters from turning photorealistic in minimax_ia2v?

Replace 'Live-action, cinematic' right after [Shot 1] with the exact medium of your starting frame—such as '2D anime, cel-shaded' or '3D CG animation'—and strip photographic terms like '35mm film', 'DSLR', or 'film grain' from both your first-frame and video prompts.

Why does color grading or brightness drift between the start and end of a lip-sync clip?

Autoregressive and diffusion video models can gradually shift hue, exposure, or white balance over a 6–15 second clip. Appending one explicit continuity sentence at the end of integrated_multimodal_description—stating that the color palette, lighting, and texture stay identical to <Picture 1> throughout—materially reduces end-of-clip color drift.

A
Written by
Austin — Video Pipeline & Inference Engineer

Maintains FoxAIHub's MV orchestration agent, MiniMax H3 ComfyUI inference workers, and audio-driven lip-sync validation pipeline.

References & Related Documentation