Red1618 commited on
Commit
95f32a6
·
verified ·
1 Parent(s): f777f01

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -29,12 +29,12 @@ model_file = hf_hub_download(
29
  "xinsir/controlnet-union-sdxl-1.0",
30
  filename="diffusion_pytorch_model_promax.safetensors",
31
  )
32
-
33
- # Create patched version that includes the loaded_keys parameter
34
- def patched_load_pretrained(self, pretrained_model_name_or_path, **kwargs):
35
- if 'loaded_keys' not in kwargs:
36
- kwargs['loaded_keys'] = set()
37
- return original_load_pretrained(self, pretrained_model_name_or_path, **kwargs)
38
 
39
  state_dict = load_state_dict(model_file)
40
  model, _, _, _, _ = ControlNetModel_Union._load_pretrained_model(
 
29
  "xinsir/controlnet-union-sdxl-1.0",
30
  filename="diffusion_pytorch_model_promax.safetensors",
31
  )
32
+
33
+ # Create patched version that includes the loaded_keys parameter
34
+ def patched_load_pretrained(self, pretrained_model_name_or_path, **kwargs):
35
+ if 'loaded_keys' not in kwargs:
36
+ kwargs['loaded_keys'] = set()
37
+ return original_load_pretrained(self, pretrained_model_name_or_path, **kwargs)
38
 
39
  state_dict = load_state_dict(model_file)
40
  model, _, _, _, _ = ControlNetModel_Union._load_pretrained_model(