asigalov61 commited on
Commit
9d974d1
·
verified ·
1 Parent(s): cd3d393

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -123,11 +123,12 @@ def GenerateMIDI(num_tok, idrums, iinstr):
123
  inp = torch.LongTensor([outy]).cuda()
124
 
125
  with torch.amp.autocast(device_type='cuda', dtype=torch.bfloat16):
126
- out = model.module.generate(inp,
127
- 1,
128
- temperature=0.9,
129
- return_prime=False,
130
- verbose=False)
 
131
 
132
  out0 = out[0].tolist()
133
  outy.extend(out0)
 
123
  inp = torch.LongTensor([outy]).cuda()
124
 
125
  with torch.amp.autocast(device_type='cuda', dtype=torch.bfloat16):
126
+ with torch.inference_mode():
127
+ out = model.module.generate(inp,
128
+ 1,
129
+ temperature=0.9,
130
+ return_prime=False,
131
+ verbose=False)
132
 
133
  out0 = out[0].tolist()
134
  outy.extend(out0)