Downloads · 30 days
385
31% of all-time downloads
lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA-8B
MiniMax-H3-Prompt-Rewriter-LoRA-8B is a image-text-to-text model from lightx2v. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for peft.
[](https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA-8B) [](https://github.com/ModelTC/LightX2V) [](https://huggingface.co/Qwen/Qwen3-VL-8B-Instruct)
Downloads · 30 days
385
31% of all-time downloads
All-time downloads
1.3K
Public
Repo size
2.8 GB
Likes
45
Public
Click a slice to open those files.
.safetensors2.8 GB · 100%
From the Hugging Face model README
This repository contains a PEFT LoRA adapter that turns short user requests into production-oriented prompts for MiniMax-H3 joint audio-video generation. It is built on Qwen3-VL-8B-Instruct and supports text-only and keyframe-conditioned rewriting.
Compared with MiniMax-H3-Prompt-Rewriter-LoRA, this 8B variant accepts visual references and covers all four prompt-rewriting tasks used to train this adapter:
Other MiniMax-H3 conditioning modes, including Ref2VA, are not supported by this adapter release.
The rewriter produces a structured prompt with an integrated shot timeline, synchronized physical and ambient sound, and non-diegetic music guidance. This repository contains the prompt rewriter only; MiniMax-H3 weights and a compatible inference framework such as LightX2V are still required to generate the final video.
adapter_config.json and adapter_model.safetensors: LoRA files to place at the repository root.infer.py: single-sample inference for all four tasks.prompt_template.py: the single source of truth for the system prompt, task aliases, and image/message ordering.requirements.txt: minimal inference dependencies.git lfs install
hf auth login # required while the repository is private
git clone https://huggingface.co/lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA-8B
cd MiniMax-H3-Prompt-Rewriter-LoRA-8B
pip install -r requirements.txt
The Qwen3-VL base weights are downloaded separately on first use. You can also pass a local base-model path with --base-model.
The script automatically uses the adapter in the current checkout when adapter_config.json is present. Otherwise it downloads the adapter from this Hugging Face repository. Greedy decoding is recommended for deterministic prompt rewriting.
python infer.py \
--task t2va \
--prompt "A corgi runs through a rainy neon-lit alley." \
--duration 5 \
--resolution 16:9 \
--greedy \
--output outputs/t2va.json
python infer.py \
--task i2va \
--first-frame /path/to/first_frame.jpg \
--prompt "The subject turns toward the camera and smiles." \
--duration 5 \
--resolution adaptive \
--greedy \
--output outputs/i2va.json
python infer.py \
--task l2va \
--last-frame /path/to/last_frame.jpg \
--prompt "A paper airplane crosses the room and lands in the shown final pose." \
--duration 5 \
--resolution adaptive \
--greedy \
--output outputs/l2va.json
python infer.py \
--task fl2va \
--first-frame /path/to/first_frame.jpg \
--last-frame /path/to/last_frame.jpg \
--prompt "Create a continuous cinematic transition between the two reference frames." \
--duration 5 \
--resolution adaptive \
--greedy \
--output outputs/fl2va.json
Use --prompt-file prompt.txt instead of --prompt for long input. A .json output records the request metadata and writes the rewritten text to enhanced_prompt; any other extension writes plain text. Run python infer.py --help for sampling, dtype, processor pixel-budget, device-map, and local-path options.
To compare against the unadapted base model, add --base-only. This intentionally skips the LoRA while keeping the same system prompt and task-specific input layout.
Feed enhanced_prompt to the corresponding MiniMax-H3 task in LightX2V, preserving the same duration, resolution, and reference-frame roles:
Keeping the task geometry and image order unchanged is important because the rewriter describes their exact temporal roles.
In LightX2V, the corresponding task and reference-image arguments are:
--task t2av--task i2av --image_path FIRST_FRAME--task l2av --last_frame_path LAST_FRAME--task fl2av --image_path FIRST_FRAME --last_frame_path LAST_FRAMEThe complete system instruction and all task-dependent message construction live in prompt_template.py. infer.py imports that file directly and renders the conversation with enable_thinking=False, matching the training input format. Edit that one file if you need a custom prompting policy.