Update app.py
Browse files
app.py
CHANGED
@@ -160,7 +160,7 @@ def generate_music(
|
|
160 |
# Decoding config
|
161 |
top_p = 0.93
|
162 |
temperature = 1.0
|
163 |
-
repetition_penalty = 1.
|
164 |
start_of_segment = mmtokenizer.tokenize('[start_of_segment]')
|
165 |
end_of_segment = mmtokenizer.tokenize('[end_of_segment]')
|
166 |
|
@@ -220,7 +220,7 @@ def generate_music(
|
|
220 |
logits_processor=LogitsProcessorList([BlockTokenRangeProcessor(0, 32002), BlockTokenRangeProcessor(32016, 32016)]),
|
221 |
guidance_scale=guidance_scale,
|
222 |
use_cache=True,
|
223 |
-
num_beams=
|
224 |
)
|
225 |
if output_seq[0][-1].item() != mmtokenizer.eoa:
|
226 |
tensor_eoa = torch.as_tensor([[mmtokenizer.eoa]]).to(model.device)
|
|
|
160 |
# Decoding config
|
161 |
top_p = 0.93
|
162 |
temperature = 1.0
|
163 |
+
repetition_penalty = 1.2
|
164 |
start_of_segment = mmtokenizer.tokenize('[start_of_segment]')
|
165 |
end_of_segment = mmtokenizer.tokenize('[end_of_segment]')
|
166 |
|
|
|
220 |
logits_processor=LogitsProcessorList([BlockTokenRangeProcessor(0, 32002), BlockTokenRangeProcessor(32016, 32016)]),
|
221 |
guidance_scale=guidance_scale,
|
222 |
use_cache=True,
|
223 |
+
num_beams=5
|
224 |
)
|
225 |
if output_seq[0][-1].item() != mmtokenizer.eoa:
|
226 |
tensor_eoa = torch.as_tensor([[mmtokenizer.eoa]]).to(model.device)
|