bedead commited on
Commit
08ada40
·
verified ·
1 Parent(s): 48483ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -28,7 +28,7 @@ state_dict = load_state_dict(model_file)
28
  model, _, _, _, _ = ControlNetModel_Union._load_pretrained_model(
29
  controlnet_model, state_dict, model_file, "xinsir/controlnet-union-sdxl-1.0"
30
  )
31
- device = torch.cuda.is_available()
32
 
33
  model.to(device=device, dtype=torch.float16 if device == 'cuda' else torch.float32)
34
  vae = AutoencoderKL.from_pretrained(
 
28
  model, _, _, _, _ = ControlNetModel_Union._load_pretrained_model(
29
  controlnet_model, state_dict, model_file, "xinsir/controlnet-union-sdxl-1.0"
30
  )
31
+ device = 'cuda' if torch.cuda.is_available() else 'cpu'
32
 
33
  model.to(device=device, dtype=torch.float16 if device == 'cuda' else torch.float32)
34
  vae = AutoencoderKL.from_pretrained(