ROCm Force Flush #250
WASasquatch
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
The problem isn't that it doesn't clear the ram it's that ROCm seems to need to reinit stuff after the vram is cleared. Not clearing the vram on my 6800XT gives me a much smoother experience and I assume it's the same for all AMD GPUs. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In this file
https://github.com/comfyanonymous/ComfyUI/blob/master/execution.py#L198
You mention clearing causes more issues on ROCm, have you tried just filling up the VRAM to force it to flush via exception and just catch and pass?
basically you call to fill up the vram with dummy tensors of crazy sizes, this clears previous (comfy) related stuck stuff and replaces it, so after it's exception, when comfy tries to run again it should have a clear state.
This hacky method was needed a lot on colabs and early unoptimized diffusers API.
Beta Was this translation helpful? Give feedback.
All reactions