Skip to content

Commit

Permalink
Fix embeddings not working with --gpu-only
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jun 30, 2023
1 parent 62db116 commit 9920367
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion comfy/sd1_clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def set_up_textual_embeddings(self, tokens, current_embeds):
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:
Expand Down

0 comments on commit 9920367

Please sign in to comment.