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
5f0f9763
Commit
5f0f9763
authored
Feb 28, 2023
by
comfyanonymous
Browse files
Only clear cuda cache on CUDA since it causes slowdowns on ROCm.
parent
b31daadc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
execution.py
execution.py
+4
-2
No files found.
execution.py
View file @
5f0f9763
...
@@ -189,8 +189,10 @@ class PromptExecutor:
...
@@ -189,8 +189,10 @@ class PromptExecutor:
self
.
server
.
send_sync
(
"executing"
,
{
"node"
:
None
},
self
.
server
.
client_id
)
self
.
server
.
send_sync
(
"executing"
,
{
"node"
:
None
},
self
.
server
.
client_id
)
gc
.
collect
()
gc
.
collect
()
torch
.
cuda
.
empty_cache
()
if
torch
.
cuda
.
is_available
():
torch
.
cuda
.
ipc_collect
()
if
torch
.
version
.
cuda
:
#This seems to make things worse on ROCm so I only do it for cuda
torch
.
cuda
.
empty_cache
()
torch
.
cuda
.
ipc_collect
()
def
validate_inputs
(
prompt
,
item
):
def
validate_inputs
(
prompt
,
item
):
...
...
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