asigalov61 commited on
Commit
1c9e690
1 Parent(s): 78b066f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -30,16 +30,16 @@ def Generate_Rock_Song(input_midi, input_melody_seed_number):
30
 
31
  print('Loading model...')
32
 
33
- SEQ_LEN = 2560
34
- PAD_IDX = 514
35
- DEVICE = 'cuda' # 'cuda'
36
 
37
  # instantiate the model
38
 
39
  model = TransformerWrapper(
40
  num_tokens = PAD_IDX+1,
41
  max_seq_len = SEQ_LEN,
42
- attn_layers = Decoder(dim = 1024, depth = 24, heads = 16, attn_flash = True)
43
  )
44
 
45
  model = AutoregressiveWrapper(model, ignore_index = PAD_IDX)
@@ -70,6 +70,11 @@ def Generate_Rock_Song(input_midi, input_melody_seed_number):
70
 
71
  fn = os.path.basename(input_midi)
72
  fn1 = fn.split('.')[0]
 
 
 
 
 
73
 
74
  #===============================================================================
75
  # Raw single-track ms score
 
30
 
31
  print('Loading model...')
32
 
33
+ SEQ_LEN = 4096
34
+ PAD_IDX = 673
35
+ DEVICE = 'cuda' # 'cpu'
36
 
37
  # instantiate the model
38
 
39
  model = TransformerWrapper(
40
  num_tokens = PAD_IDX+1,
41
  max_seq_len = SEQ_LEN,
42
+ attn_layers = Decoder(dim = 1024, depth = 16, heads = 16, rotary_pos_emb=True, attn_flash = True)
43
  )
44
 
45
  model = AutoregressiveWrapper(model, ignore_index = PAD_IDX)
 
70
 
71
  fn = os.path.basename(input_midi)
72
  fn1 = fn.split('.')[0]
73
+
74
+ print('=' * 70)
75
+ print('Requested settings:')
76
+ print('=' * 70)
77
+ print('Input MIDI file name:', fn)
78
 
79
  #===============================================================================
80
  # Raw single-track ms score