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
bf3e334d
Commit
bf3e334d
authored
May 30, 2024
by
comfyanonymous
Browse files
Disable non_blocking when --deterministic or directml.
parent
71ec5b14
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
comfy/model_management.py
comfy/model_management.py
+4
-0
No files found.
comfy/model_management.py
View file @
bf3e334d
...
@@ -629,6 +629,10 @@ def supports_dtype(device, dtype): #TODO
...
@@ -629,6 +629,10 @@ def supports_dtype(device, dtype): #TODO
def
device_supports_non_blocking
(
device
):
def
device_supports_non_blocking
(
device
):
if
is_device_mps
(
device
):
if
is_device_mps
(
device
):
return
False
#pytorch bug? mps doesn't support non blocking
return
False
#pytorch bug? mps doesn't support non blocking
if
args
.
deterministic
:
#TODO: figure out why deterministic breaks non blocking from gpu to cpu (previews)
return
False
if
directml_enabled
:
return
False
return
True
return
True
def
device_should_use_non_blocking
(
device
):
def
device_should_use_non_blocking
(
device
):
...
...
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