Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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:
|