Communitygithub.com

H3 Video: Full AI Short Drama Pipeline

Use local ComfyUI (MiniMax H3 + Qwen-Image + VoxCPM2) to create AI short dramas with dialogue, anthropomorphic animal skits, and story shorts: tone setting, dialogue table, voice-over, character masters, first frames, H3 generation, per-sentence speaker checking, upscaling, subtitles, loudness, and cover art. Invoke when the user says 'make an AI short drama,' 'turn this story into a video,' 'H3 output,' 'character lip-sync,' 'how to do voiceover,' 'the character's mouth doesn't match,' or 'make character master / first frame.' Whenever a video has talking people, always plan the dialogue table before starting.

What is H3 Video: Full AI Short Drama Pipeline?

H3 Video is a comprehensive, locally-run AI pipeline for producing short dramas with dialogue, anthropomorphic animal skits, and narrative clips. Built on ComfyUI and integrating MiniMax H3 for video generation, Qwen-Image for character master creation, and VoxCPM2 for voice cloning, it enforces a strict, layered workflow: from planning (tone, dialogue table, style) to voice-over, character master, first frame, generation, per-sentence speaker verification, upscaling, subtitles, loudness normalization, and cover design. The pipeline prioritizes modular error correction—each step is a checkpoint that can be reworked independently without affecting others. Key hard rules include: one voice source per generation, dialogue table as the single source of truth, explicit gaze control in prompts, and dense frame-grid speaker checks (never sparse sampling). It is designed for users of Claude Code, Cursor, or Codex on Unix-like systems (Linux/macOS) who want a reliable, repeatable method for AI video production with tight quality gates. The system includes a suite of Python scripts for all operations, from character master batch generation to final loudness-balanced subtitle rendering.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/huihezuo-source/H3-Video/tree/HEAD

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does H3 Video: Full AI Short Drama Pipeline do?

This pipeline is distilled from rework experience on several real productions. Core idea: Plan first, confirm at each checkpoint, and if something goes wrong, only fix that layer.

Overall Flow (In Order, No Skipping)

StepWhat to DoCheckpoint
0Research: Study top-tier similar works and others' approaches, note down techniques—
1Write plan: Tone & style, dialogue table, segment breakdown, generation checklist (see templates/plan_template.md)User confirms plan
2Voiceover: Narration and off-screen voice use TTS separately, measure real durationUser listens and confirms voice timbre
3Character Master: One full-body front view per character, shot in the story's worldUser confirms master
4First Frame: One per segment, only at the very start of the actionDo not generate video before user confirms first frame
5Generate: Use fastest setting for draft first—
6Per-sentence speaker check, gaze check, seam checkIf wrong, redo only that segment
7Upscale, subtitles, loudness, coverUser accepts
8Review: Score each item in the "methods to verify" list from the plan, document lessons in the knowledge base—

Seven Hard Rules

  1. Style must obey the story's tone. Before drawing anything, write the "Tone & Style" section: light source and darkness, color palette, clothing newness/dirt, expressions, background atmosphere. Character masters must be shot in that world, not on a gray studio background. For every image, first ask "Does it belong to this story?" before checking details. A dark story paired with clean, pretty idol faces is the most common failure.
  2. One generation has only one voice source. Never feed narration or off-screen voice into H3, otherwise characters will lip-sync to the narration—writing "mouth closed" in the prompt won't suppress it. Generate video without dialogue for narration segments; overlay the voice in post.
  3. Characters who are present but not speaking: Do not assign dialogue during generation; if a speaker needs to be hidden, shoot from behind or over-the-shoulder.
  4. The dialogue table is the single source of truth. Each line records type (dialogue/off-screen), speaker, who they are looking at, and original text. Budget approximately 3 characters per second; each line must finish within its segment. No subsequent step may alter the dialogue table.
  5. Gaze: Speakers look at listeners, listeners look at speakers. In prompts, clearly specify who looks at whom for every line.
  6. If the first frame has errors, redo the first frame—don't try to fix it with prompt tricks. When inspecting, zoom to full resolution to check hands, eyes, mouth, accessories, and stray objects.
  7. Do not deliver until per-sentence speaker check passes. For each dialogue line's time range, extract a dense frame grid (using scripts/speaker_grid.py) and answer only a closed question: "Whose mouth is moving: A / B / Both / Neither," then compare with the dialogue table. Sparse sampling of 4 frames may miss issues.

Principles for Generation & Rework

  • Draft first, then upscale: Generate at the fastest viewable resolution, then only upscale approved versions.
  • Attribute failure first: Determine if the problem is in the prompt, first frame, script, or post-processing, then decide which layer to fix. If multiple segments share the same error, fix the shared reference (master); if only one segment is wrong, fix only that segment; change only one thing at a time.
  • Use positive descriptions in prompts, don't pile up "don't..." statements. To avoid something, go back to the input (first frame, master) and fix it.
  • Record the first frame, master, seed, and prompt for each segment so you can redo just that one segment.
  • First 2-second test: View only the first 2 seconds; the audience should know what they are watching.

Reference Materials

  • references/pipeline_details_and_lessons.md: Step-by-step practices and pitfalls encountered.
  • references/comfyui_nodes_and_params.md: Qwen-Image master generation, Qwen-Image-Edit image modification, VoxCPM2 voice cloning, H3 Ref2VA node setup and parameters, plus known failure workarounds.
  • references/open_source_pipeline_survey.md: Comparison of 9 open-source AI video projects—what's worth adopting and what's not.
  • templates/plan_template.md: Plan document template including dialogue table and verification table.

Scripts

All scripts connect to ComfyUI via the environment variable COMFY_URL (default http://127.0.0.1:8188). See scripts/README.md for usage.

ScriptPurpose
t2i_masters.pyBatch generate character masters with Qwen-Image (style prefix + description per character)
edit_image.pyQwen-Image-Edit local image modification, keeping everything else unchanged
voice_design.pyDesign character voices per text description with VoxCPM2, output A/B two samples per character
tts_clone.pyClone voice with VoxCPM2 using one reference audio, batch output narration
h3_ref2va.pyAssemble and submit H3 Ref2VA workflow (reference image, reference audio, first frame anchor)
wait_download.pyWait for task to complete and download all outputs
ws_progress.pyView task progress (must use the client_id from submission)
asr.pyTranscribe with faster-whisper to verify narration is word-perfect
speaker_grid.pyOutput dense frame grid per sentence from dialogue table for speaker check
upscale_video.pyUpscale video frame-by-frame with RealESRGAN
post_subtitle_loud.pyBurn subtitles and apply dual-pass loudnorm to -14 LUFS
make_cover.pyGenerate cover in 3:4 and 9:16 formats

Related Skills