Spaces:
Running
on
Zero
Running
on
Zero
batch 8
Browse files- app.py +3 -3
- javascript/app.js +1 -1
app.py
CHANGED
@@ -18,7 +18,7 @@ from midi_model import MIDIModel, MIDIModelConfig
|
|
18 |
from midi_synthesizer import MidiSynthesizer
|
19 |
|
20 |
MAX_SEED = np.iinfo(np.int32).max
|
21 |
-
OUTPUT_BATCH_SIZE =
|
22 |
in_space = os.getenv("SYSTEM") == "spaces"
|
23 |
|
24 |
|
@@ -122,9 +122,9 @@ def get_duration(model_name, tab, mid_seq, continuation_state, continuation_sele
|
|
122 |
time_sig, key_sig, mid, midi_events, reduce_cc_st, remap_track_channel, add_default_instr,
|
123 |
remove_empty_channels, seed, seed_rand, gen_events, temp, top_p, top_k, allow_cc):
|
124 |
if "large" in model_name:
|
125 |
-
return gen_events //
|
126 |
else:
|
127 |
-
return gen_events //
|
128 |
|
129 |
|
130 |
@spaces.GPU(duration=get_duration)
|
|
|
18 |
from midi_synthesizer import MidiSynthesizer
|
19 |
|
20 |
MAX_SEED = np.iinfo(np.int32).max
|
21 |
+
OUTPUT_BATCH_SIZE = 8
|
22 |
in_space = os.getenv("SYSTEM") == "spaces"
|
23 |
|
24 |
|
|
|
122 |
time_sig, key_sig, mid, midi_events, reduce_cc_st, remap_track_channel, add_default_instr,
|
123 |
remove_empty_channels, seed, seed_rand, gen_events, temp, top_p, top_k, allow_cc):
|
124 |
if "large" in model_name:
|
125 |
+
return gen_events // 7 + 5
|
126 |
else:
|
127 |
+
return gen_events // 15 + 5
|
128 |
|
129 |
|
130 |
@spaces.GPU(duration=get_duration)
|
javascript/app.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
const MIDI_OUTPUT_BATCH_SIZE=
|
2 |
|
3 |
/**
|
4 |
* 自动绕过 shadowRoot 的 querySelector
|
|
|
1 |
+
const MIDI_OUTPUT_BATCH_SIZE= 8;
|
2 |
|
3 |
/**
|
4 |
* 自动绕过 shadowRoot 的 querySelector
|