mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
fix(lora): resolve network names that carry a dot in the filename
add_network keys available_networks by the basename with dots mangled to underscores, and create_item looked the name up in that table using the name as loaded, so any file with a dot in its stem missed and logged "not registered". The tag pass then dropped the network's own tags and used the filename instead. The lookup now falls back to the alias table, which already carries the natural basename and the subfolder path.
This commit is contained in:
@@ -91,7 +91,7 @@ class ExtraNetworksPageLora(ui_extra_networks.ExtraNetworksPage):
|
||||
return ver
|
||||
|
||||
def create_item(self, name):
|
||||
l = lora_load.available_networks.get(name)
|
||||
l = lora_load.available_networks.get(name) or lora_load.available_network_aliases.get(name) # that table mangles dots in the stem to underscores; the aliases carry the natural basename and the subfolder path
|
||||
if l is None:
|
||||
log.warning(f'Networks: type=lora registered={len(list(lora_load.available_networks))} file="{name}" not registered')
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user