Allow loading encoder with strict=False

This commit is contained in:
Nighthawk
2026-01-18 02:07:30 -05:00
committed by GitHub
parent 9b7dd275c7
commit 5fbe02a496
+1 -1
View File
@@ -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.")