1 Star 0 Fork 0

Hugging Face 模型镜像/Face-Landmark-ControlNet

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
prune_ckpt.py 395 Bytes
一键复制 编辑 原始数据 按行查看 历史
import torch
import argparse
def prune_ckpt(ckpt_path, save_path):
raw = torch.load(ckpt_path, map_location=torch.device('cpu'))
state_dict = raw["state_dict"]
torch.save(state_dict, save_path)
if __name__ == '__main__':
args = argparse.ArgumentParser()
args.add_argument('--ckpt_path', type=str)
args.add_argument('--save_path', type=str)
args = args.parse_args()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hf-models/Face-Landmark-ControlNet.git
git@gitee.com:hf-models/Face-Landmark-ControlNet.git
hf-models
Face-Landmark-ControlNet
Face-Landmark-ControlNet
main

搜索帮助