[diffusion] hardware: support diffusion (single GPU, 3/N) (#17105)
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user