Dionyssos commited on
Commit
0f06964
·
1 Parent(s): 9767dea
Files changed (1) hide show
  1. audiocraft.py +1 -1
audiocraft.py CHANGED
@@ -70,7 +70,7 @@ class AudioGen(torch.nn.Module):
70
  with torch.autocast(device_type='cpu', dtype=torch.bfloat16):
71
  gen_tokens = self.lm.generate(
72
  text_condition=[prompt] * N_REPEAT + [''] * N_REPEAT,#['dogs', 'dogs...!', '', '']
73
- max_tokens=int(.04 * duration / N_REPEAT * self.compression_model.frame_rate) + 12) # [bs, 4, 74*self.lm.n_draw]
74
 
75
  # OOM if vocode all tokens
76
  x = []
 
70
  with torch.autocast(device_type='cpu', dtype=torch.bfloat16):
71
  gen_tokens = self.lm.generate(
72
  text_condition=[prompt] * N_REPEAT + [''] * N_REPEAT,#['dogs', 'dogs...!', '', '']
73
+ max_tokens=max(int(duration / (N_REPEAT * self.lm.n_draw) * 50) + 5, 12))
74
 
75
  # OOM if vocode all tokens
76
  x = []