mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-25 15:55:18 +00:00
Only clear cuda cache on CUDA since it causes slowdowns on ROCm.
This commit is contained in:
parent
b31daadc03
commit
5f0f97634f
@ -189,6 +189,8 @@ 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()
|
||||||
|
if torch.cuda.is_available():
|
||||||
|
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.empty_cache()
|
||||||
torch.cuda.ipc_collect()
|
torch.cuda.ipc_collect()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user