1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

Add a force argument to soft_empty_cache to force a cache empty.

This commit is contained in:
comfyanonymous
2023-09-04 00:58:18 -04:00
parent 7746bdf7b0
commit 1938f5c5fe
3 changed files with 4 additions and 3 deletions

View File

@@ -186,6 +186,7 @@ def slice_attention(q, k, v):
del s2
break
except model_management.OOM_EXCEPTION as e:
model_management.soft_empty_cache(True)
steps *= 2
if steps > 128:
raise e