Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
3d8b1af6
Commit
3d8b1af6
authored
Oct 10, 2023
by
Kohaku-Blueleaf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support string_to_param nested dict
format: bundle_emb.EMBNAME.string_to_param.KEYNAME
parent
2aa485b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
extensions-builtin/Lora/networks.py
extensions-builtin/Lora/networks.py
+6
-1
No files found.
extensions-builtin/Lora/networks.py
View file @
3d8b1af6
...
@@ -157,7 +157,11 @@ def load_network(name, network_on_disk):
...
@@ -157,7 +157,11 @@ def load_network(name, network_on_disk):
if
key_network_without_network_parts
==
"bundle_emb"
:
if
key_network_without_network_parts
==
"bundle_emb"
:
emb_name
,
vec_name
=
network_part
.
split
(
"."
,
1
)
emb_name
,
vec_name
=
network_part
.
split
(
"."
,
1
)
emb_dict
=
bundle_embeddings
.
get
(
emb_name
,
{})
emb_dict
=
bundle_embeddings
.
get
(
emb_name
,
{})
emb_dict
[
vec_name
]
=
weight
if
vec_name
.
split
(
'.'
)[
0
]
==
'string_to_param'
:
_
,
k2
=
vec_name
.
split
(
'.'
,
1
)
emb_dict
[
'string_to_param'
]
=
{
k2
:
weight
}
else
:
emb_dict
[
vec_name
]
=
weight
bundle_embeddings
[
emb_name
]
=
emb_dict
bundle_embeddings
[
emb_name
]
=
emb_dict
key
=
convert_diffusers_name_to_compvis
(
key_network_without_network_parts
,
is_sd2
)
key
=
convert_diffusers_name_to_compvis
(
key_network_without_network_parts
,
is_sd2
)
...
@@ -301,6 +305,7 @@ def load_networks(names, te_multipliers=None, unet_multipliers=None, dyn_dims=No
...
@@ -301,6 +305,7 @@ def load_networks(names, te_multipliers=None, unet_multipliers=None, dyn_dims=No
if
emb_db
.
expected_shape
==
-
1
or
emb_db
.
expected_shape
==
embedding
.
shape
:
if
emb_db
.
expected_shape
==
-
1
or
emb_db
.
expected_shape
==
embedding
.
shape
:
emb_db
.
register_embedding
(
embedding
,
shared
.
sd_model
)
emb_db
.
register_embedding
(
embedding
,
shared
.
sd_model
)
print
(
f
'registered bundle embedding: {embedding.name}'
)
else
:
else
:
emb_db
.
skipped_embeddings
[
name
]
=
embedding
emb_db
.
skipped_embeddings
[
name
]
=
embedding
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment