gokaygokay commited on
Commit
aa29b20
1 Parent(s): f1bcd85
Files changed (1) hide show
  1. module/ip_adapter/utils.py +1 -1
module/ip_adapter/utils.py CHANGED
@@ -86,7 +86,7 @@ def load_adapter_to_pipe(
86
  elif key.startswith("ip_adapter."):
87
  state_dict["ip_adapter"][key.replace("ip_adapter.", "")] = f.get_tensor(key)
88
  else:
89
- state_dict = torch.load(pretrained_model_path_or_dict, map_location=unet.device)
90
  else:
91
  state_dict = pretrained_model_path_or_dict
92
  keys = list(state_dict.keys())
 
86
  elif key.startswith("ip_adapter."):
87
  state_dict["ip_adapter"][key.replace("ip_adapter.", "")] = f.get_tensor(key)
88
  else:
89
+ state_dict = torch.load(pretrained_model_path_or_dict, map_location=pipe.unet.device)
90
  else:
91
  state_dict = pretrained_model_path_or_dict
92
  keys = list(state_dict.keys())