Skip to content

Commit

Permalink
Uncomment OOM warning from attention
Browse files Browse the repository at this point in the history
  • Loading branch information
jn-jairo committed Nov 21, 2023
1 parent f53e211 commit 8e276b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions comfy/ldm/modules/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ def attention_split(q, k, v, heads, mask=None):
model_management.soft_empty_cache(True)
if cleared_cache == False:
cleared_cache = True
# print("out of memory error, emptying cache and trying again")
print("out of memory error, emptying cache and trying again")
continue
steps *= 2
if steps > 64:
raise e
# print("out of memory error, increasing steps and trying again", steps)
print("out of memory error, increasing steps and trying again", steps)
else:
raise e

Expand Down
2 changes: 1 addition & 1 deletion comfy/ldm/modules/diffusionmodules/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def slice_attention(q, k, v):
steps *= 2
if steps > 128:
raise e
# print("out of memory error, increasing steps and trying again", steps)
print("out of memory error, increasing steps and trying again", steps)

return r1

Expand Down

0 comments on commit 8e276b6

Please sign in to comment.