SefyanKehail commited on
Commit
a7af99a
·
1 Parent(s): 5d7db4c

debugging..

Browse files
Files changed (1) hide show
  1. app.py +11 -6
app.py CHANGED
@@ -26,15 +26,20 @@ def get_file_size_in_mb(file_path):
26
  # hifigan = torch.hub.load("bshall/hifigan:main", "hifigan_hubert_soft", trust_repo=True).to("cpu")
27
 
28
  # Load the state dictionaries from the CPU-saved files
29
- hubert = torch.load("hubert_cpu.pt", map_location=torch.device('cpu'))
30
- acoustic = torch.load("acoustic_cpu.pt", map_location=torch.device('cpu'))
31
- hifigan = torch.load("hifigan_cpu.pt", map_location=torch.device('cpu'))
 
 
32
 
33
  # Set the state dictionaries to the models
34
- # hubert.load_state_dict(hubert_state_dict.state_dict(), strict=False)
35
- # acoustic.load_state_dict(acoustic_state_dict.state_dict(), strict=False)
36
- # hifigan.load_state_dict(hifigan_state_dict.state_dict(), strict=False)
 
37
 
 
 
38
  # Move models to CPU (if not already on CPU)
39
  # hubert = hubert.to('cpu')
40
  # acoustic = acoustic.to('cpu')
 
26
  # hifigan = torch.hub.load("bshall/hifigan:main", "hifigan_hubert_soft", trust_repo=True).to("cpu")
27
 
28
  # Load the state dictionaries from the CPU-saved files
29
+ hubert = hubert.HubertSoft
30
+
31
+ hubert_loaded = torch.load("hubert_cpu.pt", map_location=torch.device('cpu'))
32
+ # acoustic_loaded = torch.load("acoustic_cpu.pt", map_location=torch.device('cpu'))
33
+ # hifigan_loaded = torch.load("hifigan_cpu.pt", map_location=torch.device('cpu'))
34
 
35
  # Set the state dictionaries to the models
36
+ hubert.load_state_dict(hubert_loaded.state_dict(), strict=False)
37
+ # acoustic.load_state_dict(acoustic_loaded.state_dict(), strict=False)
38
+ # hifigan.load_state_dict(hifigan_loaded.state_dict(), strict=False)
39
+
40
 
41
+ print(hubert_loaded)
42
+ sys.exit()
43
  # Move models to CPU (if not already on CPU)
44
  # hubert = hubert.to('cpu')
45
  # acoustic = acoustic.to('cpu')