Files
alltalk_tts/system/tts_engines/rvc/train/process/change_info.py
T
erew123 9fd928f6e7 initial upload attempt
initial upload attempt
2024-06-06 21:40:12 +01:00

15 lines
340 B
Python

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)