Image-to-Video
Diffusers
Safetensors
WanImageToVideoPipeline
video-generation
wruisi's picture
Upload folder using huggingface_hub
30ce0c3 verified
Raw
History Blame Contribute Delete
309 Bytes
import torch
from safetensors.torch import load_file
# 1. 载入 safetensors 权重文件
safetensor_path = "diffusion_pytorch_model.safetensors"
state_dict = load_file(safetensor_path)
# 2. 保存为 PyTorch 的 .pth 格式
torch.save(state_dict, "Wan2.1_VAE.pth")
print("转换完成:Wan2.1_VAE.pth")