Skip to content

Commit

Permalink
fix more for lora
Browse files Browse the repository at this point in the history
  • Loading branch information
yiyixuxu committed Jan 18, 2025
1 parent 77b5fa5 commit 6e2fe26
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/diffusers/loaders/lora_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,10 @@ def set_adapters(
# Decompose weights into weights for denoiser and text encoders.
_component_adapter_weights = {}
for component in self._lora_loadable_modules:
model = getattr(self, component)

model = getattr(self, component, None)
if model is None:
logger.warning(f"Model {component} not found in pipeline.")
continue
for adapter_name, weights in zip(adapter_names, adapter_weights):
if isinstance(weights, dict):
component_adapter_weights = weights.pop(component, None)
Expand Down

0 comments on commit 6e2fe26

Please sign in to comment.