mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(nodes): default node_cache_size
in MemoryInvocationCache
to 0 (fully disabled)
This commit is contained in:
parent
0a09f84b07
commit
c1aa2b82eb
@ -12,13 +12,15 @@ class MemoryInvocationCache(InvocationCacheBase):
|
|||||||
__cache_ids: Queue
|
__cache_ids: Queue
|
||||||
__invoker: Invoker
|
__invoker: Invoker
|
||||||
|
|
||||||
def __init__(self, max_cache_size: int = 512) -> None:
|
def __init__(self, max_cache_size: int = 0) -> None:
|
||||||
self.__cache = dict()
|
self.__cache = dict()
|
||||||
self.__max_cache_size = max_cache_size
|
self.__max_cache_size = max_cache_size
|
||||||
self.__cache_ids = Queue()
|
self.__cache_ids = Queue()
|
||||||
|
|
||||||
def start(self, invoker: Invoker) -> None:
|
def start(self, invoker: Invoker) -> None:
|
||||||
self.__invoker = invoker
|
self.__invoker = invoker
|
||||||
|
if self.__max_cache_size == 0:
|
||||||
|
return
|
||||||
self.__invoker.services.images.on_deleted(self._delete_by_match)
|
self.__invoker.services.images.on_deleted(self._delete_by_match)
|
||||||
self.__invoker.services.latents.on_deleted(self._delete_by_match)
|
self.__invoker.services.latents.on_deleted(self._delete_by_match)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user