PeterL1n commited on
Commit
84c6537
1 Parent(s): 88dc089

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -5,8 +5,10 @@ from diffusers import StableDiffusionXLPipeline, UNet2DConditionModel, EulerDisc
5
  from huggingface_hub import hf_hub_download
6
  from safetensors.torch import load_file
7
 
8
- device = "cuda" if torch.cuda.is_available() else "cpu"
9
- dtype = torch.float16 if torch.cuda.is_available() else torch.float32
 
 
10
 
11
  base = "stabilityai/stable-diffusion-xl-base-1.0"
12
  repo = "ByteDance/SDXL-Lightning"
 
5
  from huggingface_hub import hf_hub_download
6
  from safetensors.torch import load_file
7
 
8
+ assert torch.cuda.is_available()
9
+
10
+ device = "cuda"
11
+ dtype = torch.float16
12
 
13
  base = "stabilityai/stable-diffusion-xl-base-1.0"
14
  repo = "ByteDance/SDXL-Lightning"