We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77b5fa5 commit 6e2fe26Copy full SHA for 6e2fe26
src/diffusers/loaders/lora_base.py
@@ -557,8 +557,10 @@ def set_adapters(
557
# Decompose weights into weights for denoiser and text encoders.
558
_component_adapter_weights = {}
559
for component in self._lora_loadable_modules:
560
- model = getattr(self, component)
561
-
+ model = getattr(self, component, None)
+ if model is None:
562
+ logger.warning(f"Model {component} not found in pipeline.")
563
+ continue
564
for adapter_name, weights in zip(adapter_names, adapter_weights):
565
if isinstance(weights, dict):
566
component_adapter_weights = weights.pop(component, None)
0 commit comments