Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
bf9ccffb
Commit
bf9ccffb
authored
Feb 05, 2023
by
comfyanonymous
Browse files
Small fix for SD2.x loras.
parent
678105fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
comfy/sd.py
comfy/sd.py
+2
-2
No files found.
comfy/sd.py
View file @
bf9ccffb
...
...
@@ -153,8 +153,8 @@ def model_lora_keys(model, key_map={}):
key_map
[
lora_key
]
=
(
k
,
0
)
k
=
"model.transformer.resblocks.{}.attn.in_proj_weight"
.
format
(
b
)
if
k
in
sdk
:
key_map
[
text_model_lora_key
.
format
(
b
,
"self_attn_
k
_proj"
)]
=
(
k
,
0
)
key_map
[
text_model_lora_key
.
format
(
b
,
"self_attn_
q
_proj"
)]
=
(
k
,
1
)
key_map
[
text_model_lora_key
.
format
(
b
,
"self_attn_
q
_proj"
)]
=
(
k
,
0
)
key_map
[
text_model_lora_key
.
format
(
b
,
"self_attn_
k
_proj"
)]
=
(
k
,
1
)
key_map
[
text_model_lora_key
.
format
(
b
,
"self_attn_v_proj"
)]
=
(
k
,
2
)
return
key_map
...
...
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