cocktailpeanut commited on
Commit
022d0d3
1 Parent(s): 06c6140
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -23,6 +23,9 @@ MAX_SEED = np.iinfo(np.int32).max
23
  if torch.cuda.is_available():
24
  device = "cuda"
25
  dtype = torch.float16
 
 
 
26
  else:
27
  device = "cpu"
28
  dtype = torch.float32
@@ -226,4 +229,4 @@ with gr.Blocks(css=css) as demo:
226
 
227
  gr.Markdown(Footer)
228
 
229
- demo.launch()
 
23
  if torch.cuda.is_available():
24
  device = "cuda"
25
  dtype = torch.float16
26
+ elif torch.backends.mps.is_available():
27
+ device = "mps"
28
+ #dtype = torch.float32
29
  else:
30
  device = "cpu"
31
  dtype = torch.float32
 
229
 
230
  gr.Markdown(Footer)
231
 
232
+ demo.launch()