[2/N] Add a minimal temporal chunk callback for MiniMax-H3 (#7017)
Signed-off-by: specture724 <specture724@gmail.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ffa991b24f
commit
ecdd762ff5
6 files changed
+641
-27
No files matched your search
@@ -2,7 +2,7 @@
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
|
||||
|
||||
from contextlib import nullcontext
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
|
||||
import torch
|
||||
import torch.distributed as dist
|
||||
@@ -62,6 +62,10 @@ class OmniAutoencoderKLWan(AutoencoderKLWan):
|
||||
|
||||
return self._decode_temporal(z, return_dict=return_dict)
|
||||
|
||||
# Chunks are published straight from the decoder, clamped to the
|
||||
# checkpoint's output range.
|
||||
chunk_value_range: ClassVar[tuple[float, float]] = (-1.0, 1.0)
|
||||
|
||||
@apply_forward_hook
|
||||
def decode_with_chunks(self, z: torch.Tensor, *, on_chunk: DecodedChunkConsumer) -> None:
|
||||
"""Decode ``z`` while synchronously delivering temporal chunks.
|
||||
|
||||
Reference in new issue
Block a user