drscotthawley commited on
Commit
afe19a7
1 Parent(s): 8b092f7

moved accelerator to global

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -36,6 +36,7 @@ from pom.pianoroll import regroup_lines, img_file_2_midi_file, square_to_rect, r
36
  from pom.square_to_rect import square_to_rect
37
 
38
  zero = torch.Tensor([0]).cuda() # used for gpu checking later
 
39
 
40
  CT_HOME = '.'
41
 
@@ -115,7 +116,6 @@ def process_image(image, repaint, busyness):
115
 
116
  print("CUDA check:")
117
  print(" zero.device = ",zero.device)
118
- accelerator = accelerate.Accelerator()
119
  device = accelerator.device
120
  print(' accelerator.device:', device, flush=True)
121
 
 
36
  from pom.square_to_rect import square_to_rect
37
 
38
  zero = torch.Tensor([0]).cuda() # used for gpu checking later
39
+ accelerator = accelerate.Accelerator()
40
 
41
  CT_HOME = '.'
42
 
 
116
 
117
  print("CUDA check:")
118
  print(" zero.device = ",zero.device)
 
119
  device = accelerator.device
120
  print(' accelerator.device:', device, flush=True)
121