lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA
摘要
LightX2V releases an open, local LoRA prompt rewriter for MiniMax-H3 text-to-audio-video generation, fine-tuned on Qwen3.6-27B to expand short prompts into structured audio-video descriptions.
查看缓存全文
缓存时间: 2026/08/10 07:58
lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA · Hugging Face
Source: https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA
https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA#minimax-h3-t2va-prompt-rewriter-loraMiniMax-H3 T2VA Prompt Rewriter LoRA
An open, local prompt rewriter for**text-to-audio-video (T2VA)**generation withMiniMax-H3, fine-tuned as a LoRA adapter on top ofQwen3.6-27B.
Generate the final audio-video withLightX2V.LightX2V provides optimized local MiniMax-H3 inference, including T2AV and other H3 tasks, memory offloading, tensor and sequence parallelism, quantized checkpoints, optimized attention/RMSNorm/RoPE kernels, and feature caching. If this project is useful, please consider givingModelTC/LightX2Va star.
The complete local workflow is:
Short prompt ──► this Prompt Rewriter LoRA ──► structured H3 prompt
│
Official MiniMax-H3 weights ──► LightX2V inference ◄─────┘
│
▼
synchronized video + audio
Theofficial MiniMax-H3 repositoryprovides the upstream model weights.LightX2V is the recommended inference entry point for the workflow documented here.
https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA#what-it-doesWhat it does
The adapter turns a short prompt plus the requested aspect ratio and duration into a structured audio-video description:
Original prompt + aspect ratio + duration
│
▼
Qwen3.6-27B + this LoRA
│
▼
integrated_multimodal_description: [Shot 1] ...
overall_soundscape: ...
non_diegetic_music: ...
The rewritten prompt expands shot structure, timing, composition, camera motion, physical action, continuity, synchronized diegetic sound, and non-diegetic music while preserving the original intent.
https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA#status-and-roadmapStatus and roadmap
- T2VA prompt rewriting
- First/last-frame-to-audio-video (FL2VA) prompt rewriting
- Reference-to-audio-video (Ref2VA) prompt rewriting
https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA#installationInstallation
Clone this repository and install the inference dependencies:
git clone https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA
cd MiniMax-H3-Prompt-Rewriter-LoRA
pip install -r requirements.txt
The 27B base model is not included in this adapter repository and will be downloaded from Hugging Face on first use. Ensure that the machine has enough GPU/CPU memory for Qwen3.6-27B.device\_map="auto"is used to distribute the model over available devices.
https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA#rewrite-one-promptRewrite one prompt
python infer.py \
--prompt "Epic space-opera teaser: a captain watches the last fleet jump away, leaving her alone." \
--duration 10 \
--resolution 16:9 \
--greedy
Local paths are supported as well:
python infer.py \
--base-model /path/to/Qwen3.6-27B \
--adapter /path/to/MiniMax-H3-Prompt-Rewriter-LoRA \
--prompt "A red fox walks through a snowy forest at dawn." \
--duration 15 \
--resolution 21:9 \
--output rewritten_prompt.json
Use\-\-output result\.txtfor plain text or a\.jsonpath for a record containing the original prompt, conditions, model IDs, and rewritten prompt.
To run the base-model baseline without the LoRA:
python infer.py \
--base-only \
--prompt "A red fox walks through a snowy forest at dawn." \
--duration 15 \
--resolution 21:9 \
--greedy
For fair comparisons, use the same decoding mode and seed for every rewriter. Greedy decoding is the simplest deterministic setting; sampling is enabled when\-\-greedyis omitted.
https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA#generate-audio-video-with-lightx2vGenerate audio-video with LightX2V
https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA#1-install-lightx2v1. Install LightX2V
Building from source gives access to the latest MiniMax-H3 integration:
git clone https://github.com/ModelTC/LightX2V.git
cd LightX2V
uv pip install -v . # or: pip install -v .
Follow theLightX2V Quick Startto install the optional optimized attention and quantization operators required by the selected configuration.
https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA#2-download-the-minimax-h3-weights2. Download the MiniMax-H3 weights
The generator weights come from the upstreamMiniMaxAI/MiniMax-H3repository:
hf download MiniMaxAI/MiniMax-H3 --local-dir /path/to/MiniMax-H3
The LoRA in this repository rewrites text; it does not replace or include the MiniMax-H3 generator weights.
https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA#3-rewrite-the-prompt3. Rewrite the prompt
Run this command from the prompt-rewriter repository:
python infer.py \
--prompt "A red fox walks through a snowy forest at dawn." \
--duration 15 \
--resolution 16:9 \
--greedy \
--output /tmp/h3_rewritten_prompt.txt
https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA#4-generate-synchronized-video-and-audio4. Generate synchronized video and audio
Run the rewritten prompt with LightX2V from theLightX2Vrepository root:
source scripts/base/base.sh
export DTYPE=BF16
export SENSITIVE_LAYER_DTYPE=FP32
python -m lightx2v.infer \
--model_cls minimax_h3 \
--task t2av \
--model_path /path/to/MiniMax-H3 \
--config_json configs/minimax_h3/minimax_h3_t2av.json \
--prompt "$(</tmp/h3_rewritten_prompt.txt)" \
--save_result_path save_results/minimax_h3_t2av.mp4 \
--seed 42
The output MP4 contains both video and synchronized stereo audio. Make sure that the duration and aspect ratio in the LightX2V config match the conditions passed to the prompt rewriter. Ready-to-run single-GPU, block-offload, tensor-parallel, and combined TP+SP examples are available in the**LightX2V MiniMax-H3 scripts**.
For lower-memory or multi-GPU inference, start from one of these configurations:
ModeLightX2V exampleSingle GPUconfigs/minimax\_h3/minimax\_h3\_t2av\.jsonBlock offloadconfigs/minimax\_h3/minimax\_h3\_t2av\_block\_offload\.jsonSequence parallelismconfigs/minimax\_h3/minimax\_h3\_t2av\_sp\.jsonTensor parallelismconfigs/minimax\_h3/minimax\_h3\_t2av\_tp\.jsonTensor + sequence parallelismconfigs/minimax\_h3/minimax\_h3\_t2av\_tp\_sp\.json
https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA#qualitative-comparisonQualitative comparison
The following gallery is designed to compare videos generated throughLightX2Vwith the same MiniMax-H3 checkpoint and identical inference settings. Only the prompt-rewriting method should differ.
LabelMeaningOriginal Prompt (No Rewrite)The raw user prompt is sent directly to MiniMax-H3MiniMax Context-IRThe raw prompt is enhanced by the official hosted Context-IR workflowQwen3.6-27B Base RewriterThe same template is used with the base model and no LoRA**H3-T2VA Context Rewriter LoRA (Ours)**Qwen3.6-27B with this task-specific LoRA
https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA#prompt-1Prompt 1
**Original prompt:**Epic space-opera theatrical teaser: a female captain stands alone before a massive observation window as the last fleet gathers and jumps away in a blinding flash, the bridge shaking, leaving her behind.
Original Prompt (No Rewrite)MiniMax Context-IRQwen3.6-27B Base RewriterH3-T2VA Context Rewriter LoRA (Ours)
https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA#prompt-2Prompt 2
**Original prompt:**A dynamic TV promo-style video showcasing a group of politicians at a nighttime event illuminated by vibrant neon lights. The politicians, dressed in formal attire, engage in conversations, shake hands, and exchange smiles as they navigate through a bustling room filled with guests. The scene is set in a modern, urban environment with a mix of soft ambient lighting and bright neon signs. The camera alternates between close-ups of expressive faces and wider shots capturing the energetic atmosphere. The visuals include fast-paced cuts and subtle zoom-ins to highlight key interactions and facial expressions, emphasizing the excitement and importance of the political networking event.
Original Prompt (No Rewrite)MiniMax Context-IRQwen3.6-27B Base RewriterH3-T2VA Context Rewriter LoRA (Ours)
https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA#prompt-3Prompt 3
**Original prompt:**ASMR video featuring a close-up shot of a young woman’s hands. The girl has long, neatly manicured nails and soft, smooth skin. She moves her hands gracefully in front of the camera, focusing on gentle hand movements such as tapping, sliding, and fluttering. The lighting is warm and soft, casting a gentle glow on her hands. The camera remains static but maintains a close-up focus on her hands throughout the sequence. The background is blurred to keep the viewer’s attention on the hands. The movements are slow and deliberate, creating a soothing and relaxing atmosphere.
Original Prompt (No Rewrite)MiniMax Context-IRQwen3.6-27B Base RewriterH3-T2VA Context Rewriter LoRA (Ours)
https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA#prompt-4Prompt 4
**Original prompt:**A man in casual attire reaches for a gaming joystick from a shelf in a well-lit electronics store. He is standing in front of a display filled with various gaming consoles and accessories. The store background includes rows of shelves stocked with electronic gadgets, creating a bustling retail atmosphere. The man’s posture is upright, with a focused and excited expression as he selects the joystick. The scene captures a close-up mid-shot, emphasizing the man’s interaction with the joystick.
Original Prompt (No Rewrite)MiniMax Context-IRQwen3.6-27B Base RewriterH3-T2VA Context Rewriter LoRA (Ours)
Expected video paths and filenames are documented inassets/examples/UPLOAD\_LAYOUT\.md.
https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA#limitationsLimitations
- This release supports text-only T2VA prompt rewriting; it does not consume images, videos, or audio references.
- It is a learned approximation, not an open-source release or exact replica of the official H3-Context-IR service.
- The generated rewrite may add details not explicitly present in a short prompt. Review the result before generation when identity, dialogue, timing, or composition must be exact.
- Final quality depends on both prompt rewriting and the MiniMax-H3 inference settings selected in LightX2V.
- Use of MiniMax-H3 is governed by the license and acceptable-use terms published in theofficial MiniMax-H3 repository.
https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA#acknowledgementsAcknowledgements
This project is developed by theLightX2Vcommunity to make local MiniMax-H3 prompt rewriting and audio-video generation easier and more efficient. It is built for theMiniMax-H3audio-video generation model and fine-tuned fromQwen3.6-27B.
If you use this adapter or the MiniMax-H3 integration, please visit and star**ModelTC/LightX2V**, where inference support, performance optimizations, examples, and future task updates are maintained.
相似文章
larryvrh/MiniMax-H3-Turbo-Lora
这是 MiniMax-H3 的早期预览版 LoRA,支持在 4 步采样(而非约 20 步)内联合生成视频和同步音频,采样速度约提升 5 倍,并附带 ComfyUI 自定义节点和三个 bf16 检查点。
drbaph/MiniMax-H3-Turbo-Lora-ComfyUI
MiniMax-H3 Turbo 4步音频-视频生成的第三方ComfyUI兼容LoRA转换,包含进一步训练的checkpoint-500变体及示例工作流。
@aisearchio: 终于来了!Minimax H3 Turbo lora 让生成速度快 5 倍。只需 4 步而不是 20 步。https://huggingfa…
MiniMax-H3 的早期预览版 LoRA 支持 4 步音视频生成,取代约 20 步,采样速度大约提升 5 倍,但质量仍不成熟。
MiniMax H3(10分钟阅读)
MiniMax 发布 H3,这是一款开放的多模态生成模型,支持文本、图像、视频和音频,可生成最长 15 秒的 2K 视频并带有原生立体声,同时计划开源模型权重。
Alibaba PAI/MiniMax-H3 加速 LoRAs
Alibaba PAI 发布了 LoRA 检查点,用于通过并行解码蒸馏加速 MiniMax-H3 视频生成,从而在 8 步内实现高效推理。