projectlosangeles commited on
Commit
35840fb
·
verified ·
1 Parent(s): 862d932

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -71,8 +71,8 @@ dtype = 'bfloat16'
71
  ptdtype = {'bfloat16': torch.bfloat16, 'float16': torch.float16}[dtype]
72
  ctx = torch.amp.autocast(device_type=device_type, dtype=ptdtype)
73
 
74
- SEQ_LEN = 1536
75
- PAD_IDX = 708
76
 
77
  model = TransformerWrapper(num_tokens = PAD_IDX+1,
78
  max_seq_len = SEQ_LEN,
@@ -210,7 +210,7 @@ def Generate_Chords_Textures(input_midi,
210
  else:
211
  seq = [705] + chords[:128] + [706]
212
 
213
- x = torch.LongTensor(seq).cuda()
214
 
215
  with ctx:
216
  out = model.generate(x,
 
71
  ptdtype = {'bfloat16': torch.bfloat16, 'float16': torch.float16}[dtype]
72
  ctx = torch.amp.autocast(device_type=device_type, dtype=ptdtype)
73
 
74
+ SEQ_LEN = 8192
75
+ PAD_IDX = 18819
76
 
77
  model = TransformerWrapper(num_tokens = PAD_IDX+1,
78
  max_seq_len = SEQ_LEN,
 
210
  else:
211
  seq = [705] + chords[:128] + [706]
212
 
213
+ x = torch.LongTensor(seq).to(device_type)
214
 
215
  with ctx:
216
  out = model.generate(x,