AdamOswald1 commited on
Commit
55ae159
·
1 Parent(s): dbd4503

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -88,6 +88,10 @@ else:
88
  scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler")
89
  )
90
 
 
 
 
 
91
  to_cuda(torch, pipe)
92
 
93
  def to_cuda(torch, pipe):
@@ -240,7 +244,7 @@ def img_to_img(model_path, prompt, n_images, neg_prompt, img, strength, guidance
240
  )
241
  # pipe = pipe.to("cpu")
242
  # pipe = current_model.pipe_i2i
243
-
244
  to_cuda(torch, pipe)
245
 
246
  def to_cuda(torch, pipe):
 
88
  scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler")
89
  )
90
 
91
+ if torch.cuda.is_available():
92
+ pipe = pipe.to("cuda")
93
+ pipe.enable_xformers_memory_efficient_attention()
94
+
95
  to_cuda(torch, pipe)
96
 
97
  def to_cuda(torch, pipe):
 
244
  )
245
  # pipe = pipe.to("cpu")
246
  # pipe = current_model.pipe_i2i
247
+
248
  to_cuda(torch, pipe)
249
 
250
  def to_cuda(torch, pipe):