From 52ec7e4d611983ab9df2348fd3cbb14738080313 Mon Sep 17 00:00:00 2001 From: david6666666 <530634352@qq.com> Date: Thu, 17 Sep 2026 09:20:18 +0000 Subject: [PATCH] Revert "[Bugfix][MiniMax-H3] Keep keyframe VAE encoding rank-local" This reverts commit 7a2a16f8af043539997fe8d4fec564ba3af41469. Signed-off-by: david6666666 <530634352@qq.com> --- .../models/minimax_h3/test_minimax_h3_contract.py | 5 +---- vllm_omni/diffusion/models/minimax_h3/vae.py | 7 ++----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/diffusion/models/minimax_h3/test_minimax_h3_contract.py b/tests/diffusion/models/minimax_h3/test_minimax_h3_contract.py index 0ac14da15..4b6fc0d88 100644 --- a/tests/diffusion/models/minimax_h3/test_minimax_h3_contract.py +++ b/tests/diffusion/models/minimax_h3/test_minimax_h3_contract.py @@ -3,7 +3,7 @@ import json import sys -from contextlib import contextmanager, nullcontext +from contextlib import contextmanager from multiprocessing.reduction import ForkingPickler from types import SimpleNamespace from typing import Any, TypeVar @@ -2821,7 +2821,6 @@ def test_keyframe_encode_enters_backend_context(monkeypatch, fail_encode): assert events == ["enter"] assert image is input_image assert use_fp16_latent - assert not self.parallel_tiling events.append("encode") if fail_encode: raise RuntimeError("encode failed") @@ -2835,8 +2834,6 @@ def test_keyframe_encode_enters_backend_context(monkeypatch, fail_encode): "latents_mean": [0.0], "latents_std": [1.0], } - video_vae.parallel_size = 4 - monkeypatch.setattr(video_vae, "_encoder_tiling_context", lambda _height, _width: nullcontext()) monkeypatch.setattr(vae_module, "_minimax_h3_keyframe_encode_context", track_context) if fail_encode: diff --git a/vllm_omni/diffusion/models/minimax_h3/vae.py b/vllm_omni/diffusion/models/minimax_h3/vae.py index 68c340c00..d02649229 100644 --- a/vllm_omni/diffusion/models/minimax_h3/vae.py +++ b/vllm_omni/diffusion/models/minimax_h3/vae.py @@ -602,11 +602,8 @@ class MiniMaxH3VideoVAE(nn.Module, DistributedVaeMixin): if getattr(self, "decode_only", False): raise RuntimeError("MiniMax H3 decode-only video VAE cannot encode images") previous_parallel = self.model.parallel_tiling - # Keyframe conditioning is part of the official single-image VAE - # contract. Keep it rank-local even when video/reference encoding is - # configured for tile parallelism; the tiled collective changes the - # reduction order and can move H100 I2VA quality across the threshold. - self.model.parallel_tiling = False + if int(getattr(self, "parallel_size", 1)) <= 1: + self.model.parallel_tiling = False parameter = next(self.parameters()) previous_dtype = parameter.dtype if previous_dtype != torch.float32: