Skip to content

Commit 1d7db90

Browse files
Update src/diffusers/loaders/peft.py
Co-authored-by: Benjamin Bossan <[email protected]>
1 parent 887ed4b commit 1d7db90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/loaders/peft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def load_lora_adapter(self, pretrained_model_name_or_path_or_dict, prefix="trans
302302
incompatible_keys = set_peft_model_state_dict(self, state_dict, adapter_name, **peft_kwargs)
303303
except Exception as e:
304304
# In case `inject_adapter_in_model()` was unsuccessful even before injecting the `peft_config`.
305-
if getattr(self, "peft_config", None) is not None:
305+
if hasattr(self, "peft_config"):
306306
for module in self.modules():
307307
if isinstance(module, BaseTunerLayer):
308308
active_adapters = module.active_adapters

0 commit comments

Comments
 (0)