crlandsc commited on
Commit
ae43eae
1 Parent(s): 91d0040

playback optimization

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -114,6 +114,9 @@ def generate_samples(model_name, num_samples, num_steps, duration=32768):
114
  ckpt_path = models[model_name]
115
  load_checkpoint(model, ckpt_path)
116
 
 
 
 
117
  with torch.no_grad():
118
  all_samples = torch.zeros(2, 0) # initialize all samples
119
  for i in range(num_samples):
 
114
  ckpt_path = models[model_name]
115
  load_checkpoint(model, ckpt_path)
116
 
117
+ if num_samples > 1:
118
+ duration = duration / 2
119
+
120
  with torch.no_grad():
121
  all_samples = torch.zeros(2, 0) # initialize all samples
122
  for i in range(num_samples):