jadechoghari
commited on
Commit
•
6ab777e
1
Parent(s):
73c2372
Update modeling.py
Browse files- modeling.py +1 -1
modeling.py
CHANGED
@@ -46,7 +46,7 @@ class VoiceRestore(PreTrainedModel):
|
|
46 |
# Optimized restoration model
|
47 |
self.optimized_model = OptimizedAudioRestorationModel(device=device, bigvgan_model=self.bigvgan_model)
|
48 |
save_path = "./model.safetensors"
|
49 |
-
state_dict =
|
50 |
if 'model_state_dict' in state_dict:
|
51 |
state_dict = state_dict['model_state_dict']
|
52 |
|
|
|
46 |
# Optimized restoration model
|
47 |
self.optimized_model = OptimizedAudioRestorationModel(device=device, bigvgan_model=self.bigvgan_model)
|
48 |
save_path = "./model.safetensors"
|
49 |
+
state_dict = torch.load(save_path, map_location=torch.device(device))
|
50 |
if 'model_state_dict' in state_dict:
|
51 |
state_dict = state_dict['model_state_dict']
|
52 |
|