Repository navigation
RigShare 1.4.0: unload models after an idle period - #4
Merged
Merged
Conversation
New admin option (auto_unload_minutes, off by default): once nothing has run for that many minutes, the hub sets ComfyUI's unload_models queue flag, as the Unload models button does. A run or a waiting prompt restarts the clock; it unloads once per idle period. auto_unload_cache also clears the node cache (free_memory).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new admin option unloads models once the server has been idle for a while, so the VRAM is free for other programs (Ollama, vLLM...).
auto_unload_minutes, off by default). Once nothing has run for that many minutes, the hub sets ComfyUI'sunload_modelsqueue flag, the same as the Unload models button. A run or a waiting prompt restarts the clock, and it unloads once per idle period.auto_unload_cache) setsfree_memoryas well, like Free models & cache.Tested on a live server with a 1-minute timer: after an SDXL run, ComfyUI's VRAM went from 5.7 GB to 626 MB once the minute was up. New test
test_auto_unload_after_idle; the Python and JS suites pass.