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
f2e49b1d
Commit
f2e49b1d
authored
Nov 14, 2023
by
Jianqi Pan
Browse files
fix: adaptation to older versions of pytroch
parent
8509bd58
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 @
f2e49b1d
...
@@ -175,7 +175,7 @@ class SDClipModel(torch.nn.Module, ClipTokenWeightEncoder):
...
@@ -175,7 +175,7 @@ class SDClipModel(torch.nn.Module, ClipTokenWeightEncoder):
else
:
else
:
precision_scope
=
lambda
a
,
b
:
contextlib
.
nullcontext
(
a
)
precision_scope
=
lambda
a
,
b
:
contextlib
.
nullcontext
(
a
)
with
precision_scope
(
model_management
.
get_autocast_device
(
device
),
torch
.
float32
):
with
precision_scope
(
model_management
.
get_autocast_device
(
device
),
dtype
=
torch
.
float32
):
attention_mask
=
None
attention_mask
=
None
if
self
.
enable_attention_masks
:
if
self
.
enable_attention_masks
:
attention_mask
=
torch
.
zeros_like
(
tokens
)
attention_mask
=
torch
.
zeros_like
(
tokens
)
...
...
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