InvokeAI
InvokeAI copied to clipboard
[enhancement]: Allow user to clear caches
Is there an existing issue for this?
- [X] I have searched the existing issues
Contact Details
No response
What should this feature add?
I suggest that Invoke settings have a button to force flushing of the VRAM/RAM caches so a user could keep Invoke running while doing other GPU-intensive things, then come back to Invoke.
Alternatives
The alternative is stopping Invoke to free up memory for other applications, then restarting it when done with those other programs.
Additional Content
No response
How about this API?
context.model_manager.load.clear_cache((LoaderCacheType.VRAM, LoaderCacheType.RAM))
Where LoaderCacheType is an enum of CONVERT_CACHE, RAM, and VRAM. Calling with no argument clears all three caches.
That'd probably do the trick (maybe).