Skip to content

Commit db827b5

Browse files
committed
Merge branch 'main' into improve-lora-warning-msg
2 parents 6134491 + 0967593 commit db827b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/loaders/lora_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2301,7 +2301,7 @@ def _maybe_expand_transformer_param_shape_or_error_(
23012301
for name, module in transformer.named_modules():
23022302
if isinstance(module, torch.nn.Linear):
23032303
module_weight = module.weight.data
2304-
module_bias = module.bias.data if hasattr(module, "bias") else None
2304+
module_bias = module.bias.data if module.bias is not None else None
23052305
bias = module_bias is not None
23062306

23072307
lora_A_weight_name = f"{name}.lora_A.weight"

0 commit comments

Comments
 (0)