williamberman commited on
Commit
3722f7e
1 Parent(s): e5080ee

vae must first be cuda

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -59,6 +59,7 @@ def predict(dict, prompt="", negative_prompt="", guidance_scale=7.5, steps=20, s
59
  gc.collect()
60
  torch.cuda.empty_cache()
61
 
 
62
  comparing_unet.to('cuda')
63
  comparing_controlnet.to('cuda')
64
 
@@ -84,8 +85,6 @@ def predict(dict, prompt="", negative_prompt="", guidance_scale=7.5, steps=20, s
84
  gc.collect()
85
  torch.cuda.empty_cache()
86
 
87
- comparing_vae.to('cuda')
88
-
89
  out = comparing_vae.output_tensor_to_pil(comparing_vae.decode(out))
90
 
91
  comparing_vae.to('cpu')
 
59
  gc.collect()
60
  torch.cuda.empty_cache()
61
 
62
+ comparing_vae.to('cuda')
63
  comparing_unet.to('cuda')
64
  comparing_controlnet.to('cuda')
65
 
 
85
  gc.collect()
86
  torch.cuda.empty_cache()
87
 
 
 
88
  out = comparing_vae.output_tensor_to_pil(comparing_vae.decode(out))
89
 
90
  comparing_vae.to('cpu')