MCPcopy Create free account
hub / github.com/Comfy-Org/ComfyUI / __init__

Method __init__

execution.py:114–129  ·  view source on GitHub ↗
(self, cache_type=None, cache_args={})

Source from the content-addressed store, hash-verified

112
113class CacheSet:
114 def __init__(self, cache_type=None, cache_args={}):
115 if cache_type == CacheType.NONE:
116 self.init_null_cache()
117 logging.info("Disabling intermediate node cache.")
118 elif cache_type == CacheType.RAM_PRESSURE:
119 cache_ram = cache_args.get("ram", 16.0)
120 self.init_ram_cache(cache_ram)
121 logging.info("Using RAM pressure cache.")
122 elif cache_type == CacheType.LRU:
123 cache_size = cache_args.get("lru", 0)
124 self.init_lru_cache(cache_size)
125 logging.info("Using LRU cache")
126 else:
127 self.init_classic_cache()
128
129 self.all = [self.outputs, self.objects]
130
131 # Performs like the old cache -- dump data ASAP
132 def init_classic_cache(self):

Callers

nothing calls this directly

Calls 5

init_null_cacheMethod · 0.95
init_ram_cacheMethod · 0.95
init_lru_cacheMethod · 0.95
init_classic_cacheMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected