Spaces:
Running
Running
n_draws
Browse files- 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(
|
| 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 = []
|