Skip to content

minimax_h3_qwen3_vl

Native Qwen3-VL conditioner used by MiniMax H3.

Classes

fastvideo.models.encoders.minimax_h3_qwen3_vl.MiniMaxH3Qwen3VLConditioner

MiniMaxH3Qwen3VLConditioner(config: MiniMaxH3Qwen3VLConfig)

Bases: TextEncoder[Tensor]

H3 conditioner returning the unnormalized layer-50 hidden tensor.

Source code in fastvideo/models/encoders/minimax_h3_qwen3_vl.py
def __init__(self, config: MiniMaxH3Qwen3VLConfig) -> None:
    super().__init__(config)
    self.visual = MiniMaxH3Qwen3VLVisionModel(config)
    self.language_model = MiniMaxH3Qwen3VLLanguageModel(config)

fastvideo.models.encoders.minimax_h3_qwen3_vl.MiniMaxH3Qwen3VLTextRotaryEmbedding

MiniMaxH3Qwen3VLTextRotaryEmbedding(config: MiniMaxH3Qwen3VLConfig)

Bases: Module

Shared Qwen3-VL interleaved temporal/height/width rotary embedding.

Source code in fastvideo/models/encoders/minimax_h3_qwen3_vl.py
def __init__(self, config: MiniMaxH3Qwen3VLConfig) -> None:
    super().__init__()
    head_dim = config.head_dim
    inv_freq = 1.0 / (config.rope_theta**(torch.arange(0, head_dim, 2, dtype=torch.float32) / head_dim))
    self.register_buffer("inv_freq", inv_freq, persistent=False)
    self.mrope_section = tuple(config.mrope_section)

fastvideo.models.encoders.minimax_h3_qwen3_vl.MiniMaxH3SerializedFP8Config

MiniMaxH3SerializedFP8Config(weight_block_size: tuple[int, int])

Bases: QuantizationConfig

Serialized 128x128 block-FP8 contract for the H3 text encoder.

Source code in fastvideo/models/encoders/minimax_h3_checkpoint_fp8.py
def __init__(self, weight_block_size: tuple[int, int]) -> None:
    super().__init__()
    if weight_block_size != (128, 128):
        raise ValueError("MiniMax-H3 serialized FP8 requires weight_block_size=[128, 128], "
                         f"got {list(weight_block_size)}")
    self.weight_block_size = weight_block_size
    self.is_checkpoint_fp8_serialized = True
    self.activation_scheme = "dynamic"

Functions: