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
6533b172
Commit
6533b172
authored
Feb 24, 2024
by
comfyanonymous
Browse files
Support text encoder text_projection in lora.
parent
1e5f0f66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
comfy/lora.py
comfy/lora.py
+7
-0
No files found.
comfy/lora.py
View file @
6533b172
...
...
@@ -200,6 +200,13 @@ def model_lora_keys_clip(model, key_map={}):
lora_key
=
"lora_prior_te_text_model_encoder_layers_{}_{}"
.
format
(
b
,
LORA_CLIP_MAP
[
c
])
#cascade lora: TODO put lora key prefix in the model config
key_map
[
lora_key
]
=
k
k
=
"clip_g.text_projection"
if
k
in
sdk
:
key_map
[
"lora_prior_te_text_projection"
]
=
k
#cascade lora
# key_map["text_encoder.text_projection"] = k #TODO: check if other lora have the text_projection too
# key_map["lora_te_text_projection"] = k
return
key_map
def
model_lora_keys_unet
(
model
,
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