cocktailpeanut commited on
Commit
f4f5727
·
1 Parent(s): a5c3e20
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -92,7 +92,8 @@ def generate(
92
  num_images_per_prompt: int = 2,
93
  # profile: gr.OAuthProfile | None = None,
94
  ) -> PIL.Image.Image:
95
- previewer.eval().requires_grad_(False).to(device).to(dtype)
 
96
  prior_pipeline.to(device)
97
  decoder_pipeline.to(device)
98
 
 
92
  num_images_per_prompt: int = 2,
93
  # profile: gr.OAuthProfile | None = None,
94
  ) -> PIL.Image.Image:
95
+ if previewer != None:
96
+ previewer.eval().requires_grad_(False).to(device).to(dtype)
97
  prior_pipeline.to(device)
98
  decoder_pipeline.to(device)
99