fkunn1326 commited on
Commit
898989f
·
1 Parent(s): d234e1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
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
- pipe = pipe.to("cpu")
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")