[Feature][MiniMax-H3] Complete VSA and Ulysses support (#6909)

Signed-off-by: princepride <wangzhipeng628@gmail.com>
Signed-off-by: 汪志鹏 <wangzhipeng628@gmail.com>
This commit is contained in:
汪志鹏 authored and GitHub committed 2026-09-02 07:19:21 -04:00
1 parent 57c08d34c3
commit c59b48b47e
17 files changed
+953 -35

No files matched your search

@@ -67,6 +67,33 @@ def test_packed_attention_is_a_regional_compile_boundary():
assert getattr(MiniMaxH3Attention._run_packed_attention, "_torchdynamo_disable", False)
def test_denoise_branch_keeps_fast_h3_prefix_geometry_model_local():
from vllm_omni.diffusion.models.minimax_h3.denoise_loop import (
MiniMaxH3DenoiseBranch,
)
packed = {
"seq_len": torch.tensor(9),
"img_pos": torch.arange(4),
"audio_pos": torch.empty(0, dtype=torch.long),
"text_pos": torch.arange(2),
"update_mask": torch.ones(4, dtype=torch.bool),
"cu_seqlens": torch.tensor([0, 9, 9], dtype=torch.int32),
"img_position_ids": torch.zeros(9, 3, dtype=torch.long),
"video_spans": ({"start": 5, "latent_grid": (1, 2, 2), "role": "target"},),
}
branch = MiniMaxH3DenoiseBranch(
packed=packed,
text_embeddings=torch.zeros(2, 4),
token_tags=torch.tensor([0, 0, 1, 1, 1, 2, 2, 2, 2]),
device=torch.device("cpu"),
)
layout = branch.static_kwargs["video_token_layout"]
assert not hasattr(layout, "prefix_segments")
assert branch.static_kwargs["packed_seq_params"]["vsa_prefix_segments"] == (2, 3)
def test_h3_fused_rope_matches_reference_and_preserves_unrotated_dims():
from vllm_omni.diffusion.layers.rope import RotaryEmbedding
from vllm_omni.diffusion.models.minimax_h3.minimax_h3_transformer import (