[diffusion] hardware: support diffusion (single GPU, 3/N) (#17105)

Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
This commit is contained in:
R0CKSTAR
2026-01-16 17:01:09 +08:00
committed by GitHub
parent d9ed80b9f1
commit a1dd3d48ac
13 changed files with 425 additions and 33 deletions
@@ -633,7 +633,11 @@ class CausalWanTransformer3DModel(BaseDiT, OffloadableDiTMixin):
self.hidden_size,
self.num_attention_heads,
rope_dim_list,
dtype=torch.float32 if current_platform.is_mps() else torch.float64,
dtype=(
torch.float32
if current_platform.is_mps() or current_platform.is_musa()
else torch.float64
),
rope_theta=10000,
start_frame=start_frame, # Assume that start_frame is 0 when kv_cache is None
)
@@ -761,7 +765,11 @@ class CausalWanTransformer3DModel(BaseDiT, OffloadableDiTMixin):
self.hidden_size,
self.num_attention_heads,
rope_dim_list,
dtype=torch.float32 if current_platform.is_mps() else torch.float64,
dtype=(
torch.float32
if current_platform.is_mps() or current_platform.is_musa()
else torch.float64
),
rope_theta=10000,
start_frame=start_frame,
)