prithivMLmods commited on
Commit
f25e47f
·
verified ·
1 Parent(s): 6dd76b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -23,19 +23,12 @@ model_file = hf_hub_download(
23
  "xinsir/controlnet-union-sdxl-1.0",
24
  filename="diffusion_pytorch_model_promax.safetensors",
25
  )
26
- state_dict = load_state_dict(model_file)
27
 
28
- # **Fix**: pass loaded_keys into _load_pretrained_model
29
  model, _, _, _, _ = ControlNetModel_Union._load_pretrained_model(
30
- controlnet_model,
31
- state_dict,
32
- loaded_keys,
33
- model_file,
34
- "xinsir/controlnet-union-sdxl-1.0",
35
  )
36
-
37
  model.to(device="cuda", dtype=torch.float16)
38
-
39
  #----------------------
40
 
41
  vae = AutoencoderKL.from_pretrained(
 
23
  "xinsir/controlnet-union-sdxl-1.0",
24
  filename="diffusion_pytorch_model_promax.safetensors",
25
  )
 
26
 
27
+ sstate_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
  model.to(device="cuda", dtype=torch.float16)
 
32
  #----------------------
33
 
34
  vae = AutoencoderKL.from_pretrained(