Spaces:
Running
on
Zero
Running
on
Zero
wenxiang guo
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,7 +36,7 @@ def load_model_from_config(config, ckpt = None, verbose=True):
|
|
| 36 |
else:
|
| 37 |
print(f"Note chat no ckpt is loaded !!!")
|
| 38 |
|
| 39 |
-
|
| 40 |
model.eval()
|
| 41 |
return model
|
| 42 |
|
|
@@ -83,7 +83,7 @@ class GenSamples:
|
|
| 83 |
|
| 84 |
for idx,spec in enumerate(x_samples_ddim):
|
| 85 |
spec = spec.squeeze(0).cpu().numpy()
|
| 86 |
-
print(spec[0])
|
| 87 |
record_dict = {'caption':prompt['ori_caption'][0]}
|
| 88 |
if self.save_mel:
|
| 89 |
mel_path = os.path.join(self.outpath,mel_name+f'_{idx}.npy')
|
|
|
|
| 36 |
else:
|
| 37 |
print(f"Note chat no ckpt is loaded !!!")
|
| 38 |
|
| 39 |
+
model.cuda()
|
| 40 |
model.eval()
|
| 41 |
return model
|
| 42 |
|
|
|
|
| 83 |
|
| 84 |
for idx,spec in enumerate(x_samples_ddim):
|
| 85 |
spec = spec.squeeze(0).cpu().numpy()
|
| 86 |
+
# print(spec[0])
|
| 87 |
record_dict = {'caption':prompt['ori_caption'][0]}
|
| 88 |
if self.save_mel:
|
| 89 |
mel_path = os.path.join(self.outpath,mel_name+f'_{idx}.npy')
|