beva commited on
Commit
3140c91
·
verified ·
1 Parent(s): b8710cb

Update app.py

Browse files

device = 'cuda' if torch.cuda.is_available() else 'cpu'
pipe.to(device)

Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -12,7 +12,9 @@ pipe = StableDiffusionXLPipeline.from_pretrained(
12
  variant="fp16",
13
  )
14
  pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
15
- pipe.to('cuda')
 
 
16
 
17
  def launch(prompt, negative_prompt):
18
  prompt += " ,awesome, pixel art"
 
12
  variant="fp16",
13
  )
14
  pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
15
+ device = 'cuda' if torch.cuda.is_available() else 'cpu'
16
+ pipe.to(device)
17
+
18
 
19
  def launch(prompt, negative_prompt):
20
  prompt += " ,awesome, pixel art"