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
b9e3f522
Commit
b9e3f522
authored
Mar 03, 2023
by
comfyanonymous
Browse files
stop_at_clip_layer can be set in CLIPSetLastLayer so it can be removed
from the CLIPLoader node.
parent
ebfcf0a9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
nodes.py
nodes.py
+1
-3
No files found.
nodes.py
View file @
b9e3f522
...
...
@@ -359,17 +359,15 @@ class CLIPLoader:
@
classmethod
def
INPUT_TYPES
(
s
):
return
{
"required"
:
{
"clip_name"
:
(
filter_files_extensions
(
recursive_search
(
s
.
clip_dir
),
supported_pt_extensions
),
),
"stop_at_clip_layer"
:
(
"INT"
,
{
"default"
:
-
1
,
"min"
:
-
24
,
"max"
:
-
1
,
"step"
:
1
}),
}}
RETURN_TYPES
=
(
"CLIP"
,)
FUNCTION
=
"load_clip"
CATEGORY
=
"loaders"
def
load_clip
(
self
,
clip_name
,
stop_at_clip_layer
):
def
load_clip
(
self
,
clip_name
):
clip_path
=
os
.
path
.
join
(
self
.
clip_dir
,
clip_name
)
clip
=
comfy
.
sd
.
load_clip
(
ckpt_path
=
clip_path
,
embedding_directory
=
CheckpointLoader
.
embedding_directory
)
clip
.
clip_layer
(
stop_at_clip_layer
)
return
(
clip
,)
class
EmptyLatentImage
:
...
...
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