From be574cb764e73c44b5b18144170b5b38f00f7869 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Wed, 3 Apr 2024 22:38:28 +0530 Subject: [PATCH] fix: incorrect suffix check in ip adapter checkpoint file --- invokeai/backend/ip_adapter/ip_adapter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invokeai/backend/ip_adapter/ip_adapter.py b/invokeai/backend/ip_adapter/ip_adapter.py index 62ee81f6b2..f3be042146 100644 --- a/invokeai/backend/ip_adapter/ip_adapter.py +++ b/invokeai/backend/ip_adapter/ip_adapter.py @@ -209,7 +209,7 @@ class IPAdapterPlusXL(IPAdapterPlus): def load_ip_adapter_tensors(ip_adapter_ckpt_path: pathlib.Path, device: str) -> IPAdapterStateDict: state_dict: IPAdapterStateDict = {"ip_adapter": {}, "image_proj": {}} - if ip_adapter_ckpt_path.stem == "safetensors": + if ip_adapter_ckpt_path.suffix == ".safetensors": model = safetensors.torch.load_file(ip_adapter_ckpt_path, device=device) for key in model.keys(): if key.startswith("image_proj."):