Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -30,9 +30,12 @@ model_file = hf_hub_download(
|
|
30 |
filename="diffusion_pytorch_model_promax.safetensors",
|
31 |
)
|
32 |
state_dict = load_state_dict(model_file)
|
|
|
33 |
model, _, _, _, _ = ControlNetModel_Union._load_pretrained_model(
|
34 |
-
controlnet_model, state_dict, model_file, "xinsir/controlnet-union-sdxl-1.0"
|
35 |
)
|
|
|
|
|
36 |
model.to(device="cuda", dtype=torch.float16)
|
37 |
vae = AutoencoderKL.from_pretrained(
|
38 |
"madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16
|
|
|
30 |
filename="diffusion_pytorch_model_promax.safetensors",
|
31 |
)
|
32 |
state_dict = load_state_dict(model_file)
|
33 |
+
loaded_keys = list(state_dict.keys())
|
34 |
model, _, _, _, _ = ControlNetModel_Union._load_pretrained_model(
|
35 |
+
controlnet_model, state_dict, loaded_keys, model_file, "xinsir/controlnet-union-sdxl-1.0"
|
36 |
)
|
37 |
+
|
38 |
+
|
39 |
model.to(device="cuda", dtype=torch.float16)
|
40 |
vae = AutoencoderKL.from_pretrained(
|
41 |
"madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16
|