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
501f19ee
Commit
501f19ee
authored
Mar 06, 2023
by
comfyanonymous
Browse files
Fix clip_skip no longer being loaded from yaml file.
parent
afff30fc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
comfy/sd.py
comfy/sd.py
+3
-2
No files found.
comfy/sd.py
View file @
501f19ee
...
@@ -266,7 +266,7 @@ class CLIP:
...
@@ -266,7 +266,7 @@ class CLIP:
self
.
cond_stage_model
=
clip
(
**
(
params
))
self
.
cond_stage_model
=
clip
(
**
(
params
))
self
.
tokenizer
=
tokenizer
(
embedding_directory
=
embedding_directory
)
self
.
tokenizer
=
tokenizer
(
embedding_directory
=
embedding_directory
)
self
.
patcher
=
ModelPatcher
(
self
.
cond_stage_model
)
self
.
patcher
=
ModelPatcher
(
self
.
cond_stage_model
)
self
.
layer_idx
=
-
1
self
.
layer_idx
=
None
def
clone
(
self
):
def
clone
(
self
):
n
=
CLIP
(
no_init
=
True
)
n
=
CLIP
(
no_init
=
True
)
...
@@ -287,6 +287,7 @@ class CLIP:
...
@@ -287,6 +287,7 @@ class CLIP:
self
.
layer_idx
=
layer_idx
self
.
layer_idx
=
layer_idx
def
encode
(
self
,
text
):
def
encode
(
self
,
text
):
if
self
.
layer_idx
is
not
None
:
self
.
cond_stage_model
.
clip_layer
(
self
.
layer_idx
)
self
.
cond_stage_model
.
clip_layer
(
self
.
layer_idx
)
tokens
=
self
.
tokenizer
.
tokenize_with_weights
(
text
)
tokens
=
self
.
tokenizer
.
tokenize_with_weights
(
text
)
try
:
try
:
...
...
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