add inference cli

This commit is contained in:
Ftps
2024-01-20 22:48:15 +09:00
parent 95d989827d
commit 6d759b4b96
13 changed files with 276 additions and 4 deletions

View File

@@ -87,7 +87,7 @@ class UVR:
export_format,
is_hp3=is_hp3,
)
infos.append(f"{os.path.basename(process_path)}->Success" )
infos.append(f"{os.path.basename(process_path)}->Success")
yield "\n".join(infos)
if torch.cuda.is_available():
torch.cuda.empty_cache()

View File

@@ -45,7 +45,7 @@ class VC:
to_return_protect[1] if self.if_f0 != 0 and to_return_protect else 0.33,
]
person = f'{os.getenv("weight_root")}/{sid}'
person = sid if os.path.exists(sid) else f'{os.getenv("weight_root")}/{sid}'
logger.info(f"Loading: {person}")
self.cpt = torch.load(person, map_location="cpu")