Skip to content
Other

MiniMax-H3 Prompt Rewriter (Ref2VA)

умный рерайтер промптов для видео и аудио

2 min read

Модель превращает черновые описания и мультимодальные референсы (картинки, видео и аудио) в структурированные промпты для генерации роликов и звука в системе MiniMax-H3. Она построена методом SFT (контролируемого дообучения на готовых примерах) на базе языковой модели Qwen3.8-27B размером 27,36 млрд параметров от команды lightx2v. В отличие от обычных текстовых рерайтеров, версия Ref2VA умеет учитывать переданные визуальные и звуковые файлы и связывать их через метки в тексте. Инструмент пригодится тем, кто строит пайплайны генерации видео со звуком и хочет автоматизировать подготовку сложных запросов.

Ключевые особенности

  • Работает в режиме Ref2VA: принимает ссылки на изображения, видео и аудио вместе с текстовым промптом и длительностью.
  • Основана на Qwen3.8-27B (27,36B параметров), также в релизе есть более лёгкая версия на базе Qwen3.5-9B.
  • Запускается через движок vLLM как локальный API-сервер и поддерживает контекст до 32 768 токенов (лимит ответа — 16 384 токена).
  • Автоматически нумерует референсы по порядку (image 1, video 1, audio 1) и извлекает кадры из видео с помощью ffmpeg.

Что можно сделать

  • Встроить в пайплайн генерации MiniMax-H3 как промежуточный этап, чтобы превращать короткие идеи пользователя в детальные сценарии.
  • Использовать для подготовки промптов с опорой на несколько референсов одновременно — например, задавать стиль по картинке и движение по видео.
  • Прогонять пакетную проверку запросов в режиме --dry_run, чтобы заранее смотреть итоговый текст промпта без запуска генерации.

Пример

pip install vllm requests pillow qwen-vl-utils
bash vllm_server.sh
bash post_vllm.sh
ПодробнееБазовая модель: Qwen3.8-27B (27,36B параметров), обучение: SFT.
Требования: сервер с GPU, vLLM, qwen-vl-utils, а также ffmpeg и ffprobe в PATH для работы с видео.
Ограничения: видео разбивается на кадры (по умолчанию 8 на ролик), общий лимит картинок и кадров — 50; аудиофайлы не читаются по содержимому, а передаются как метки.
Контекст: 32 768 токенов на вход и выход суммарно, максимум 16 384 токена на генерацию.
Discuss 68 19.1K

Will it run?

Runs in 4-bit

Full precision does not fit, a quantised version does: quality barely changes down to 8 bits, more noticeably at 4 bits.

  • BF16weights 52 GB · ready files57 GB
  • FP8 / INT8recommendedweights 25 GB29 GB
  • 4-bitweights 14 GB16 GB

Tip: go 8-bit.FP8 / INT8 is within about a percent of full precision in quality, takes half the memory and runs faster on RTX 40/50 and H100. Full precision only pays off for fine-tuning.

Estimate: weights plus working memory. Long videos, high resolutions and long contexts need more.

Run it on Massed Compute

The script downloads the model to the rented machine. How to run it is in the model card.

  1. 1. Rent a machine with a fitting GPU

    Open Massed Compute
  2. 2. Paste the script into the machine's terminal

    Connect over SSH (the Massed Compute panel shows the command) or open a terminal on the machine's desktop.

    HF_TOKEN / CIVITAI_TOKENThe script starts with token lines: paste yours between the quotes. The Hugging Face token is for gated models, the Civitai one for Civitai models.

    # lightx2v/MiniMax-H3-Prompt-Rewriter-Qwen3.8-27B-Ref2VA
    mkdir -p ~/models
    curl -LsSf https://astral.sh/uv/install.sh | sh
    source "$HOME/.local/bin/env"
    uv tool install "huggingface_hub[cli]"
    hf download lightx2v/MiniMax-H3-Prompt-Rewriter-Qwen3.8-27B-Ref2VA --local-dir ~/models/MiniMax-H3-Prompt-Rewriter-Qwen3.8-27B-Ref2VA
    # The model is in ~/models. How to run it is in the model card (link above).
  3. 3. Use it

    The model is in ~/models. How to run it is in the model card (link above).

Stop the machine in the panel when you are done: it bills by the minute while it runs.

How to speed it up

Picked for this model type. Choose your hardware above to see what fits you exactly.

  • FlashAttention 44.0.0b40from November 18, 2026new release

    fastest exact attention on B200

    Kernels for Blackwell (beta). Exact attention without quantisation — fine for everything, LLMs included.

    How to enable: pip install flash-attn-4; vLLM and SGLang pick it up themselves.

    Earlier generations (2)
    • FlashAttention 3 — The Hopper (H100/H200) version with FP8.
    • FlashAttention 2 — The standard for RTX 30/40/50 and A100: exact attention without the memory cost of long contexts.
  • torch.compile2.15.0from October 28, 2026new release

    10–30% for free

    Compiles the model for your GPU. Slower first run, faster afterwards.

    How to enable: model = torch.compile(model); in ComfyUI the TorchCompileModel node.

MiniMax H3 prompts

All prompts

Ready prompts with the resulting video: copy and try.

Model family

New posts about versions of MiniMax-H3-Prompt-Rewriter-Qwen3.8-27B-Ref2VA (quants, finetunes, LoRAs) will show up under the bell.

Quantised versions 4All on Hugging Face
Fine-tunes 3All on Hugging Face

About the model

lightx2v/MiniMax-H3-Prompt-Rewriter-Qwen3.8-27B-Ref2VA
Author
lightx2v
Category
Other
Released
Posted

On NeyroLearn

Hugging Face

19.1K68

Ask AI about this model

Answered by Gemini 4 · the chat is kept only in this tab

Comments