lllyasviel / lllyasviel/stable-diffusion-webui-forge
[Bug]: Lora can't load
- Dominant language
- Python
- Stars
- 13k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
### Checklist
- [ ] The issue exists after disabling all extensions
- [ ] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [ ] The issue exists in the current version of the webui
- [X] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet
### What happened?
Lora is not working when loading from google drive
Traceback (most recent call last):
File "/content/webui-forge/extensions-builtin/Lora/networks.py", line 279, in load_networks
net = load_network(name, network_on_disk)
File "/content/webui-forge/extensions-builtin/Lora/networks.py", line 218, in load_network
net_module = nettype.create_module(net, weights)
File "/content/webui-forge/extensions-builtin/Lora/network_lora.py", line 11, in create_module
return NetworkModuleLora(net, weights)
File "/content/webui-forge/extensions-builtin/Lora/network_lora.py", line 20, in __init__
self.up_model = self.create_module(weights.w, "lora_up.weight")
File "/content/webui-forge/extensions-builtin/Lora/network_lora.py", line 51, in create_module
raise AssertionError(f'Lora layer {self.network_key} matched a layer with unsupported type: {type(self.sd_module).__name__}')
AssertionError: Lora layer lora_te_text_model_encoder_layers_0_mlp_fc1.alpha matched a layer with unsupported type: Linear
### Steps to reproduce the problem
1
### What should have happened?
1
### What browsers do you use to access the UI ?
Mozilla Firefox
### Sysinfo
Tesla T4
### Console logs
```Shell
Traceback (most recent call last):
File "/content/webui-forge/extensions-builtin/Lora/networks.py", line 279, in load_networks
net = load_network(name, network_on_disk)
File "/content/webui-forge/extensions-builtin/Lora/networks.py", line 218, in load_network
net_module = nettype.create_module(net, weights)
File "/content/webui-forge/extensions-builtin/Lora/network_lora.py", line 11, in create_module
return NetworkModuleLora(net, weights)
File "/content/webui-forge/extensions-builtin/Lora/network_lora.py", line 20, in __init__
self.up_model = self.create_module(weights.w, "lora_up.weight")
File "/content/webui-forge/extensions-builtin/Lora/network_lora.py", line 51, in create_module
raise AssertionError(f'Lora layer {self.network_key} matched a layer with unsupported type: {type(self.sd_module).__name__}')
AssertionError: Lora layer lora_te_text_model_encoder_layers_0_mlp_fc1.alpha matched a layer with unsupported type: Linear
```
### Additional information
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in extensions-builtin/Lora/networks.py and extensions-builtin/Lora/network_lora.py, following the load_network and create_module paths shown in the traceback. Reproduce the failure while loading the LoRA from Google Drive and inspect why the text-encoder layer is treated as an unsupported Linear type. Done means the LoRA loads without this assertion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100