Revert "[Bugfix][MiniMax-H3] Isolate keyframe VAE encoding from tile collectives"

This reverts commit 2aac8bd15a.

Signed-off-by: david6666666 <530634352@qq.com>
This commit is contained in:
david6666666 committed 2026-09-17 09:20:18 +00:00
1 parent 2aac8bd15a
commit 00b2eb9399
2 files changed
+10 -23

No files matched your search

+6 -8
View File
@@ -602,13 +602,11 @@ 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
parallel_size = int(getattr(self, "parallel_size", 1))
if parallel_size <= 1:
self.model.parallel_tiling = False
# A keyframe is a single-image conditioning input. Do not let it use
# the multi-rank tiled-VAE collective, whose reduction order depends
# on the physical GPU topology; video references keep tile parallelism.
tiling_context = self._rank_local_tiling() if parallel_size > 1 else nullcontext()
# 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
parameter = next(self.parameters())
previous_dtype = parameter.dtype
if previous_dtype != torch.float32:
@@ -616,7 +614,7 @@ class MiniMaxH3VideoVAE(nn.Module, DistributedVaeMixin):
devices = [parameter.device] if parameter.device.type != "cpu" else []
try:
with (
tiling_context,
self._encoder_tiling_context(image.height, image.width),
torch.random.fork_rng(
devices=devices,
device_type=parameter.device.type,