nyanko7 commited on
Commit
33db744
·
verified ·
1 Parent(s): 1312362

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -743,6 +743,9 @@ def generate_image(
743
  device = "cuda" if torch.cuda.is_available() else "cpu"
744
  torch_device = torch.device(device)
745
 
 
 
 
746
  if do_img2img and init_image is not None:
747
  init_image = get_image(init_image)
748
  if resize_img:
 
743
  device = "cuda" if torch.cuda.is_available() else "cpu"
744
  torch_device = torch.device(device)
745
 
746
+ global model
747
+ model = model.to(torch_device)
748
+
749
  if do_img2img and init_image is not None:
750
  init_image = get_image(init_image)
751
  if resize_img: