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
9920367d
Commit
9920367d
authored
Jun 29, 2023
by
comfyanonymous
Browse files
Fix embeddings not working with --gpu-only
parent
62db1168
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
comfy/sd1_clip.py
comfy/sd1_clip.py
+1
-1
No files found.
comfy/sd1_clip.py
View file @
9920367d
...
...
@@ -95,7 +95,7 @@ class SD1ClipModel(torch.nn.Module, ClipTokenWeightEncoder):
out_tokens
+=
[
tokens_temp
]
if
len
(
embedding_weights
)
>
0
:
new_embedding
=
torch
.
nn
.
Embedding
(
next_new_token
,
current_embeds
.
weight
.
shape
[
1
])
new_embedding
=
torch
.
nn
.
Embedding
(
next_new_token
,
current_embeds
.
weight
.
shape
[
1
]
,
device
=
self
.
device
)
new_embedding
.
weight
[:
token_dict_size
]
=
current_embeds
.
weight
[:]
n
=
token_dict_size
for
x
in
embedding_weights
:
...
...
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