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
5b37270d
Commit
5b37270d
authored
Nov 25, 2023
by
comfyanonymous
Browse files
Add a lora loader node for models with no CLIP.
parent
5d6dfce5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
nodes.py
nodes.py
+14
-0
No files found.
nodes.py
View file @
5b37270d
...
@@ -572,6 +572,19 @@ class LoraLoader:
...
@@ -572,6 +572,19 @@ class LoraLoader:
model_lora
,
clip_lora
=
comfy
.
sd
.
load_lora_for_models
(
model
,
clip
,
lora
,
strength_model
,
strength_clip
)
model_lora
,
clip_lora
=
comfy
.
sd
.
load_lora_for_models
(
model
,
clip
,
lora
,
strength_model
,
strength_clip
)
return
(
model_lora
,
clip_lora
)
return
(
model_lora
,
clip_lora
)
class
LoraLoaderModelOnly
(
LoraLoader
):
@
classmethod
def
INPUT_TYPES
(
s
):
return
{
"required"
:
{
"model"
:
(
"MODEL"
,),
"lora_name"
:
(
folder_paths
.
get_filename_list
(
"loras"
),
),
"strength_model"
:
(
"FLOAT"
,
{
"default"
:
1.0
,
"min"
:
-
20.0
,
"max"
:
20.0
,
"step"
:
0.01
}),
}}
RETURN_TYPES
=
(
"MODEL"
,)
FUNCTION
=
"load_lora_model_only"
def
load_lora_model_only
(
self
,
model
,
lora_name
,
strength_model
):
return
(
self
.
load_lora
(
model
,
None
,
lora_name
,
strength_model
,
0
)[
0
],)
class
VAELoader
:
class
VAELoader
:
@
staticmethod
@
staticmethod
def
vae_list
():
def
vae_list
():
...
@@ -1703,6 +1716,7 @@ NODE_CLASS_MAPPINGS = {
...
@@ -1703,6 +1716,7 @@ NODE_CLASS_MAPPINGS = {
"ConditioningZeroOut"
:
ConditioningZeroOut
,
"ConditioningZeroOut"
:
ConditioningZeroOut
,
"ConditioningSetTimestepRange"
:
ConditioningSetTimestepRange
,
"ConditioningSetTimestepRange"
:
ConditioningSetTimestepRange
,
"LoraLoaderModelOnly"
:
LoraLoaderModelOnly
,
}
}
NODE_DISPLAY_NAME_MAPPINGS
=
{
NODE_DISPLAY_NAME_MAPPINGS
=
{
...
...
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