calculate hashes for Lora

add lora hashes to infotext
when pasting infotext, use infotext's lora hashes to find local loras for <lora:xxx:1> entries whose hashes match loras the user has
This commit is contained in:
AUTOMATIC
2023-05-19 22:59:29 +03:00
parent 87702febe0
commit 39ec4f06ff
6 changed files with 130 additions and 22 deletions

View File

@@ -17,6 +17,15 @@ def register_extra_network(extra_network):
class ExtraNetworkParams:
def __init__(self, items=None):
self.items = items or []
self.positional = []
self.named = {}
for item in self.items:
parts = item.split('=', 2)
if len(parts) == 2:
self.named[parts[0]] = parts[1]
else:
self.positional.append(item)
class ExtraNetwork: