openfree commited on
Commit
40f1a1c
·
verified ·
1 Parent(s): 5a5b2bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -19,12 +19,16 @@ config_file = hf_hub_download(
19
 
20
  config = ControlNetModel_Union.load_config(config_file)
21
  controlnet_model = ControlNetModel_Union.from_config(config)
 
 
 
22
  model_file = hf_hub_download(
23
  "xinsir/controlnet-union-sdxl-1.0",
24
  filename="diffusion_pytorch_model_promax.safetensors",
25
  )
 
26
 
27
- # First extract the keys from the state_dict
28
  loaded_keys = list(state_dict.keys())
29
 
30
  # Then call the method with the additional parameter
 
19
 
20
  config = ControlNetModel_Union.load_config(config_file)
21
  controlnet_model = ControlNetModel_Union.from_config(config)
22
+
23
+
24
+ # Load the state dictionary
25
  model_file = hf_hub_download(
26
  "xinsir/controlnet-union-sdxl-1.0",
27
  filename="diffusion_pytorch_model_promax.safetensors",
28
  )
29
+ state_dict = load_state_dict(model_file) # Define state_dict
30
 
31
+ # Then extract the keys from the state_dict
32
  loaded_keys = list(state_dict.keys())
33
 
34
  # Then call the method with the additional parameter