Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -103,9 +103,8 @@ def txt_to_img(model_path, prompt, neg_prompt, guidance, steps, width, height, g
|
|
| 103 |
global current_model_path
|
| 104 |
if model_path != current_model_path or last_mode != "txt2img":
|
| 105 |
current_model_path = model_path
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
pipe = current_model.pipe_t2i
|
| 109 |
|
| 110 |
if torch.cuda.is_available():
|
| 111 |
pipe = pipe.to("cuda")
|
|
|
|
| 103 |
global current_model_path
|
| 104 |
if model_path != current_model_path or last_mode != "txt2img":
|
| 105 |
current_model_path = model_path
|
| 106 |
+
pipe = pipe.to("cpu")
|
| 107 |
+
pipe = current_model.pipe_t2i
|
|
|
|
| 108 |
|
| 109 |
if torch.cuda.is_available():
|
| 110 |
pipe = pipe.to("cuda")
|