mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-27 17:22:53 +03:00
Fix Nonetype attribute error when loading multiple Flux loras (#10182)
Fix Nonetype attribute error
This commit is contained in:
@@ -2313,7 +2313,7 @@ class FluxLoraLoaderMixin(LoraBaseMixin):
|
||||
for name, module in transformer.named_modules():
|
||||
if isinstance(module, torch.nn.Linear):
|
||||
module_weight = module.weight.data
|
||||
module_bias = module.bias.data if hasattr(module, "bias") else None
|
||||
module_bias = module.bias.data if module.bias is not None else None
|
||||
bias = module_bias is not None
|
||||
|
||||
lora_A_weight_name = f"{name}.lora_A.weight"
|
||||
|
||||
Reference in New Issue
Block a user