mirror of
				https://github.com/Wan-Video/Wan2.1.git
				synced 2025-11-04 06:15:17 +00:00 
			
		
		
		
	Fix MPS compatibility for I2V by adjusting device usage and dtype
This commit is contained in:
		
							parent
							
								
									68ae7184df
								
							
						
					
					
						commit
						5cb67c67e8
					
				@ -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'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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)
 | 
			
		||||
            ],
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user