Open a-l-e-x-d-s-9 opened 1 month ago
I added a few prints to debug what's the issue is.
key_network: lora_te1_text_model_encoder_layers_0_mlp_fc1.alpha key_network.rsplit(".", 2): ['lora_te1_text_model_encoder_layers_0_mlp_fc1', 'alpha'] diffusers_weight_map: diffusers_weight_map.txt
The code:
def load_network(name, network_on_disk):
net = network.Network(name, network_on_disk)
net.mtime = os.path.getmtime(network_on_disk.filename)
sd = sd_models.read_state_dict(network_on_disk.filename)
# this should not be needed but is here as an emergency fix for an unknown error people are experiencing in 1.2.0
if not hasattr(shared.sd_model, 'network_layer_mapping'):
assign_network_names_to_compvis_modules(shared.sd_model)
keys_failed_to_match = {}
is_sd2 = 'model_transformer_resblocks' in shared.sd_model.network_layer_mapping
if hasattr(shared.sd_model, 'diffusers_weight_map'):
diffusers_weight_map = shared.sd_model.diffusers_weight_map
elif hasattr(shared.sd_model, 'diffusers_weight_mapping'):
diffusers_weight_map = {}
for k, v in shared.sd_model.diffusers_weight_mapping():
diffusers_weight_map[k] = v
shared.sd_model.diffusers_weight_map = diffusers_weight_map
else:
diffusers_weight_map = None
matched_networks = {}
bundle_embeddings = {}
for key_network, weight in sd.items():
if diffusers_weight_map:
key_network_without_network_parts, network_name, network_weight = key_network.rsplit(".", 2) # THE LINE WITH ERROR
network_part = network_name + '.' + network_weight
else:
key_network_without_network_parts, _, network_part = key_network.partition(".")
I am having similar issues. SD3 LoRAs trained with OneTrainer work in ComfyUI no problem, but not in A1111.
Checklist
What happened?
Using SD3 Lora trained with OneTrainer causing the error:
Here is a link to this Lora on Civitai. This Lora is working fine with ComfyUI. I also tried other Loras trained with OneTrainer, and they are causing the same error.
Steps to reproduce the problem
Use this Lora with SD3.
What should have happened?
The error should not appear and Lora should work.
What browsers do you use to access the UI ?
Google Chrome
Sysinfo
sysinfo-2024-08-02-12-18.json
Console logs
Additional information
No response