RigShare 1.4.0: unload models after an idle period (#4)
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). Co-authored-by: Edouard Durand <xiaodoudou@users.noreply.github.com>
This commit is contained in:
co-authored by
Edouard Durand
parent
3de3cc32e2
commit
6041a1d72a
@@ -38,10 +38,14 @@ class FakeQueue:
|
||||
|
||||
def __init__(self):
|
||||
self.running, self.pending, self.number = [], [], 0
|
||||
self.flags = {}
|
||||
|
||||
def get_current_queue_volatile(self):
|
||||
return list(self.running), list(self.pending)
|
||||
|
||||
def set_flag(self, name, data):
|
||||
self.flags[name] = data
|
||||
|
||||
history = {}
|
||||
|
||||
def get_history(self, prompt_id=None, max_items=None, offset=-1, map_function=None):
|
||||
|
||||
Reference in New Issue
Block a user