RVC_HF / rvc /train /process /change_info.py
r3gm's picture
update
1397f77
raw
history blame contribute delete
354 Bytes
import os
import torch
def change_info(path, info, name):
try:
ckpt = torch.load(path, map_location="cpu")
ckpt["info"] = info
if name == "":
name = os.path.basename(path)
torch.save(ckpt, f"logs/{name}/{name}")
return "Success."
except Exception as error:
print(error)