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
d63705d9
Commit
d63705d9
authored
Apr 15, 2023
by
藍+85CD
Browse files
Support releases all unoccupied cached memory from XPU
parent
04d9bc13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
execution.py
execution.py
+4
-0
No files found.
execution.py
View file @
d63705d9
...
...
@@ -10,6 +10,8 @@ import gc
import
torch
import
nodes
from
model_management
import
xpu_available
def
get_input_data
(
inputs
,
class_def
,
unique_id
,
outputs
=
{},
prompt
=
{},
extra_data
=
{}):
valid_inputs
=
class_def
.
INPUT_TYPES
()
input_data_all
=
{}
...
...
@@ -206,6 +208,8 @@ class PromptExecutor:
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
()
elif
xpu_available
:
torch
.
xpu
.
empty_cache
()
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