PeterL1n commited on
Commit
efbe3b2
1 Parent(s): 83e9007

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -41,9 +41,9 @@ def generate(prompt, option, progress=gr.Progress()):
41
  ckpt, step = opts[option]
42
  progress((0, step))
43
 
44
- if pipe.device != device:
45
  pipe.to(device, dtype)
46
- if safety_checker.device != device:
47
  safety_checker.to(device, dtype)
48
 
49
  if step != step_loaded:
 
41
  ckpt, step = opts[option]
42
  progress((0, step))
43
 
44
+ if pipe.device.type != device:
45
  pipe.to(device, dtype)
46
+ if safety_checker.device.type != device:
47
  safety_checker.to(device, dtype)
48
 
49
  if step != step_loaded: