mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-07 10:10:23 +08:00
fix: remove outdated codes & add weights_only=True
This commit is contained in:
@@ -152,7 +152,7 @@ def model_hash_ckpt(cpt):
|
||||
|
||||
|
||||
def model_hash_from(path):
|
||||
cpt = torch.load(path, map_location="cpu")
|
||||
cpt = torch.load(path, map_location="cpu", weights_only=True)
|
||||
h = model_hash_ckpt(cpt)
|
||||
del cpt
|
||||
return h
|
||||
|
||||
@@ -75,7 +75,7 @@ def show_info(path):
|
||||
try:
|
||||
if hasattr(path, "name"):
|
||||
path = path.name
|
||||
a = torch.load(path, map_location="cpu")
|
||||
a = torch.load(path, map_location="cpu", weights_only=True)
|
||||
txt = show_model_info(a, show_long_id=True)
|
||||
del a
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user