Add supports_float64() to OmniPlatform and clean up MPS (#2488)

Signed-off-by: Xiaodong Ye <yeahdongcn@gmail.com>
This commit is contained in:
R0CKSTAR authored and GitHub committed 2026-04-07 11:15:02 +08:00
1 parent 368de99f08
commit 7a72f34ce4
7 files changed
+16 -12

No files matched your search

@@ -29,6 +29,7 @@ from vllm_omni.diffusion.distributed.sp_plan import (
SequenceParallelOutput,
)
from vllm_omni.diffusion.forward_context import get_forward_context
from vllm_omni.platforms import current_omni_platform
logger = init_logger(__name__)
@@ -171,7 +172,7 @@ class WanRotaryPosEmbed(nn.Module):
# Split dimensions for temporal, height, width
h_dim = w_dim = 2 * (attention_head_dim // 6)
t_dim = attention_head_dim - h_dim - w_dim
freqs_dtype = torch.float32 if torch.backends.mps.is_available() else torch.float64
freqs_dtype = torch.float64 if current_omni_platform.supports_float64() else torch.float32
freqs_cos = []
freqs_sin = []