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
23cf8ca7
"...components/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "403195f0eb4b78559b51611eb2529836cd17badb"
Commit
23cf8ca7
authored
Jun 08, 2023
by
comfyanonymous
Browse files
Fix bug when embedding gets ignored because of mismatched size.
parent
29c50954
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
comfy/sd1_clip.py
comfy/sd1_clip.py
+2
-0
No files found.
comfy/sd1_clip.py
View file @
23cf8ca7
...
@@ -82,6 +82,8 @@ class SD1ClipModel(torch.nn.Module, ClipTokenWeightEncoder):
...
@@ -82,6 +82,8 @@ class SD1ClipModel(torch.nn.Module, ClipTokenWeightEncoder):
next_new_token
+=
1
next_new_token
+=
1
else
:
else
:
print
(
"WARNING: shape mismatch when trying to apply embedding, embedding will be ignored"
,
y
.
shape
[
0
],
current_embeds
.
weight
.
shape
[
1
])
print
(
"WARNING: shape mismatch when trying to apply embedding, embedding will be ignored"
,
y
.
shape
[
0
],
current_embeds
.
weight
.
shape
[
1
])
while
len
(
tokens_temp
)
<
len
(
x
):
tokens_temp
+=
[
self
.
empty_tokens
[
0
][
-
1
]]
out_tokens
+=
[
tokens_temp
]
out_tokens
+=
[
tokens_temp
]
if
len
(
embedding_weights
)
>
0
:
if
len
(
embedding_weights
)
>
0
:
...
...
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