Spaces:
Running
on
Zero
Running
on
Zero
gokaygokay
commited on
Commit
•
f1bcd85
1
Parent(s):
2fb7bdc
diffusers
Browse files
module/ip_adapter/utils.py
CHANGED
@@ -79,7 +79,7 @@ def load_adapter_to_pipe(
|
|
79 |
if not isinstance(pretrained_model_path_or_dict, dict):
|
80 |
if pretrained_model_path_or_dict.endswith(".safetensors"):
|
81 |
state_dict = {"image_proj": {}, "ip_adapter": {}}
|
82 |
-
with safe_open(pretrained_model_path_or_dict, framework="pt", device=unet.device) as f:
|
83 |
for key in f.keys():
|
84 |
if key.startswith("image_proj."):
|
85 |
state_dict["image_proj"][key.replace("image_proj.", "")] = f.get_tensor(key)
|
|
|
79 |
if not isinstance(pretrained_model_path_or_dict, dict):
|
80 |
if pretrained_model_path_or_dict.endswith(".safetensors"):
|
81 |
state_dict = {"image_proj": {}, "ip_adapter": {}}
|
82 |
+
with safe_open(pretrained_model_path_or_dict, framework="pt", device=pipe.unet.device) as f:
|
83 |
for key in f.keys():
|
84 |
if key.startswith("image_proj."):
|
85 |
state_dict["image_proj"][key.replace("image_proj.", "")] = f.get_tensor(key)
|