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
109bbda7
Commit
109bbda7
authored
Jun 21, 2024
by
w-e-w
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix infotext Lora hashes fro hires fix different lora
parent
a30b19dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
extensions-builtin/Lora/extra_networks_lora.py
extensions-builtin/Lora/extra_networks_lora.py
+9
-14
No files found.
extensions-builtin/Lora/extra_networks_lora.py
View file @
109bbda7
...
@@ -9,6 +9,8 @@ class ExtraNetworkLora(extra_networks.ExtraNetwork):
...
@@ -9,6 +9,8 @@ class ExtraNetworkLora(extra_networks.ExtraNetwork):
self
.
errors
=
{}
self
.
errors
=
{}
"""mapping of network names to the number of errors the network had during operation"""
"""mapping of network names to the number of errors the network had during operation"""
remove_symbols
=
str
.
maketrans
(
''
,
''
,
":,"
)
def
activate
(
self
,
p
,
params_list
):
def
activate
(
self
,
p
,
params_list
):
additional
=
shared
.
opts
.
sd_lora
additional
=
shared
.
opts
.
sd_lora
...
@@ -43,22 +45,15 @@ class ExtraNetworkLora(extra_networks.ExtraNetwork):
...
@@ -43,22 +45,15 @@ class ExtraNetworkLora(extra_networks.ExtraNetwork):
networks
.
load_networks
(
names
,
te_multipliers
,
unet_multipliers
,
dyn_dims
)
networks
.
load_networks
(
names
,
te_multipliers
,
unet_multipliers
,
dyn_dims
)
if
shared
.
opts
.
lora_add_hashes_to_infotext
:
if
shared
.
opts
.
lora_add_hashes_to_infotext
:
network_hashes
=
[]
if
not
getattr
(
p
,
"is_hr_pass"
,
False
)
or
not
hasattr
(
p
,
"lora_hashes"
):
for
item
in
networks
.
loaded_networks
:
p
.
lora_hashes
=
{}
shorthash
=
item
.
network_on_disk
.
shorthash
if
not
shorthash
:
continue
alias
=
item
.
mentioned_name
if
not
alias
:
continue
alias
=
alias
.
replace
(
":"
,
""
)
.
replace
(
","
,
""
)
for
item
in
networks
.
loaded_networks
:
if
item
.
network_on_disk
.
shorthash
and
item
.
mentioned_name
:
network_hashes
.
append
(
f
"{alias}: {shorthash}"
)
p
.
lora_hashes
[
item
.
mentioned_name
.
translate
(
self
.
remove_symbols
)]
=
item
.
network_on_disk
.
shorthash
if
network
_hashes
:
if
p
.
lora
_hashes
:
p
.
extra_generation_params
[
"Lora hashes"
]
=
", "
.
join
(
network_hashes
)
p
.
extra_generation_params
[
"Lora hashes"
]
=
', '
.
join
(
f
'{k}: {v}'
for
k
,
v
in
p
.
lora_hashes
.
items
()
)
def
deactivate
(
self
,
p
):
def
deactivate
(
self
,
p
):
if
self
.
errors
:
if
self
.
errors
:
...
...
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