bugfix: non indexfile bug

This commit is contained in:
wataru 2023-06-03 02:06:36 +09:00
parent cb0be0bf17
commit 38b614e88c

View File

@ -154,7 +154,7 @@ class RVC:
)
os.makedirs(slotDir, exist_ok=True)
slotInfo.modelFile = self.moveToModelDir(slotInfo.modelFile, slotDir)
if slotInfo.indexFile is not None:
if slotInfo.indexFile is not None and len(slotInfo.indexFile) > 0:
slotInfo.indexFile = self.moveToModelDir(slotInfo.indexFile, slotDir)
json.dump(asdict(slotInfo), open(os.path.join(slotDir, "params.json"), "w"))
self.loadSlots()