Spaces:
Runtime error
Runtime error
eval
Browse files
app.py
CHANGED
@@ -385,7 +385,7 @@ if __name__ == "__main__":
|
|
385 |
ckpt = torch.load(model_path, map_location="cpu", weights_only=True)
|
386 |
state_dict = ckpt.get("state_dict", ckpt)
|
387 |
model.load_state_dict(state_dict, strict=False)
|
388 |
-
model.to(device="cpu", dtype=torch.float32)
|
389 |
models[name] = model
|
390 |
|
391 |
load_javascript()
|
@@ -477,7 +477,7 @@ if __name__ == "__main__":
|
|
477 |
step=1, value=opt.max_gen // 2)
|
478 |
with gr.Accordion("options", open=False):
|
479 |
input_temp = gr.Slider(label="temperature", minimum=0.1, maximum=1.2, step=0.01, value=1)
|
480 |
-
input_top_p = gr.Slider(label="top p", minimum=0.1, maximum=1, step=0.01, value=0.
|
481 |
input_top_k = gr.Slider(label="top k", minimum=1, maximum=128, step=1, value=20)
|
482 |
input_allow_cc = gr.Checkbox(label="allow midi cc event", value=True)
|
483 |
input_render_audio = gr.Checkbox(label="render audio after generation", value=True)
|
|
|
385 |
ckpt = torch.load(model_path, map_location="cpu", weights_only=True)
|
386 |
state_dict = ckpt.get("state_dict", ckpt)
|
387 |
model.load_state_dict(state_dict, strict=False)
|
388 |
+
model.to(device="cpu", dtype=torch.float32).eval()
|
389 |
models[name] = model
|
390 |
|
391 |
load_javascript()
|
|
|
477 |
step=1, value=opt.max_gen // 2)
|
478 |
with gr.Accordion("options", open=False):
|
479 |
input_temp = gr.Slider(label="temperature", minimum=0.1, maximum=1.2, step=0.01, value=1)
|
480 |
+
input_top_p = gr.Slider(label="top p", minimum=0.1, maximum=1, step=0.01, value=0.95)
|
481 |
input_top_k = gr.Slider(label="top k", minimum=1, maximum=128, step=1, value=20)
|
482 |
input_allow_cc = gr.Checkbox(label="allow midi cc event", value=True)
|
483 |
input_render_audio = gr.Checkbox(label="render audio after generation", value=True)
|