diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-05-19 19:59:29 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-05-19 19:59:29 +0000 |
commit | 39ec4f06ffb2c26e1298b2c5d80874dc3fd693ac (patch) | |
tree | 7edd9b81f43b07826844e951241a4b4a15620257 /modules/extra_networks.py | |
parent | 87702febe08bddb9e8b952204c459927532ec6e6 (diff) | |
download | stable-diffusion-webui-gfx803-39ec4f06ffb2c26e1298b2c5d80874dc3fd693ac.tar.gz stable-diffusion-webui-gfx803-39ec4f06ffb2c26e1298b2c5d80874dc3fd693ac.tar.bz2 stable-diffusion-webui-gfx803-39ec4f06ffb2c26e1298b2c5d80874dc3fd693ac.zip |
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
Diffstat (limited to 'modules/extra_networks.py')
-rw-r--r-- | modules/extra_networks.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/extra_networks.py b/modules/extra_networks.py index f9db41bc..54982009 100644 --- a/modules/extra_networks.py +++ b/modules/extra_networks.py @@ -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:
|