wooyeolbaek commited on
Commit
bc4149f
1 Parent(s): 30e1658

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -18,8 +18,6 @@ pipe = StableDiffusionXLPipeline.from_pretrained(
18
  pipe.unet = register_cross_attention_hook(pipe.unet)
19
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
20
  pipe = pipe.to(device)
21
- if device == 'cpu':
22
- pipe = pipe.to(dtype=torch.float32)
23
 
24
 
25
  def inference(prompt):
@@ -49,6 +47,7 @@ with gr.Blocks() as demo:
49
 
50
  btn.click(inference, prompt, [image, gallery])
51
 
 
52
  if __name__ == "__main__":
53
  demo.launch(share=True)
54
 
 
18
  pipe.unet = register_cross_attention_hook(pipe.unet)
19
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
20
  pipe = pipe.to(device)
 
 
21
 
22
 
23
  def inference(prompt):
 
47
 
48
  btn.click(inference, prompt, [image, gallery])
49
 
50
+
51
  if __name__ == "__main__":
52
  demo.launch(share=True)
53