mirror of
https://github.com/Nighthawk42/soprano-factory.git
synced 2026-08-30 04:30:21 +00:00
Allow loading encoder with strict=False
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@ def main():
|
||||
print(f"Loading model onto {device}.")
|
||||
encoder = Encoder().to(device)
|
||||
encoder_path = hf_hub_download(repo_id='ekwek/Soprano-Encoder', filename='encoder.pth')
|
||||
encoder.load_state_dict(torch.load(encoder_path, map_location=device))
|
||||
encoder.load_state_dict(torch.load(encoder_path, map_location=device), strict=False)
|
||||
encoder.eval()
|
||||
print("Model loaded.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user