Fix MPS compatibility for I2V by adjusting device usage and dtype

This commit is contained in:
Bakhtiyor Sulaymonov 2025-02-27 18:55:10 +05:00
parent 68ae7184df
commit 5cb67c67e8
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ i2v_14B.t5_tokenizer = 'google/umt5-xxl'
# clip
i2v_14B.clip_model = 'clip_xlm_roberta_vit_h_14'
i2v_14B.clip_dtype = torch.float16
i2v_14B.clip_dtype = torch.float32
i2v_14B.clip_checkpoint = 'models_clip_open-clip-xlm-roberta-large-vit-huge-14.pth'
i2v_14B.clip_tokenizer = 'xlm-roberta-large'

View File

@ -244,7 +244,7 @@ class WanI2V:
y = self.vae.encode([
torch.concat([
torch.nn.functional.interpolate(
img[None].cpu(), size=(h, w), mode='bicubic').transpose(
img[None], size=(h, w), mode='bicubic').transpose(
0, 1),
torch.zeros(3, 80, h, w)
],