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
608fcc25
"vscode:/vscode.git/clone" did not exist on "bdba3942903f59b96d08b95c878eb616c429e5d4"
Commit
608fcc25
authored
Jul 06, 2023
by
comfyanonymous
Browse files
Fix bug with weights when prompt is long.
parent
ddc6f12a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
comfy/sd1_clip.py
comfy/sd1_clip.py
+3
-3
No files found.
comfy/sd1_clip.py
View file @
608fcc25
...
@@ -23,11 +23,11 @@ class ClipTokenWeightEncoder:
...
@@ -23,11 +23,11 @@ class ClipTokenWeightEncoder:
first_pooled
=
pooled
[
0
:
1
]
first_pooled
=
pooled
[
0
:
1
]
output
=
[]
output
=
[]
for
i
in
range
(
1
,
out
.
shape
[
0
]):
for
k
in
range
(
1
,
out
.
shape
[
0
]):
z
=
out
[
i
:
i
+
1
]
z
=
out
[
k
:
k
+
1
]
for
i
in
range
(
len
(
z
)):
for
i
in
range
(
len
(
z
)):
for
j
in
range
(
len
(
z
[
i
])):
for
j
in
range
(
len
(
z
[
i
])):
weight
=
token_weight_pairs
[
i
-
1
][
j
][
1
]
weight
=
token_weight_pairs
[
k
-
1
][
j
][
1
]
z
[
i
][
j
]
=
(
z
[
i
][
j
]
-
z_empty
[
0
][
j
])
*
weight
+
z_empty
[
0
][
j
]
z
[
i
][
j
]
=
(
z
[
i
][
j
]
-
z_empty
[
0
][
j
])
*
weight
+
z_empty
[
0
][
j
]
output
.
append
(
z
)
output
.
append
(
z
)
...
...
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