The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
comfy-execution: cache: cache errors is RAM cache sizing scan (#16314)
rattusa2afcdb89910
diff --git a/comfy_execution/caching.py b/comfy_execution/caching.pyindex 9ff52fc48..25f471feb 100644--- a/comfy_execution/caching.py+++ b/comfy_execution/caching.py@@ -1,6 +1,7 @@import asyncioimport bisectimport itertools+import loggingimport timeimport torchfrom typing import Sequence, Mapping, Dict@@ -564,6 +565,7 @@ class RAMPressureCache(LRUCache):ram_usage = RAM_CACHE_DEFAULT_RAM_USAGEoom_ram_usage = ram_usage+ sizing_failed = Falseseen_storages = set()def scan_list_for_ram_usage(outputs):nonlocal ram_usage, oom_ram_usage@@ -588,9 +590,14 @@ class RAMPressureCache(LRUCache):oom_ram_usage = 1e30elif hasattr(output, "_comfy_cache_tensors"):scan_list_for_ram_usage(output._comfy_cache_tensors())- scan_list_for_ram_usage(cache_entry.outputs)+ try:+ scan_list_for_ram_usage(cache_entry.outputs)+ except Exception:+ logging.warning("Could not size cache entry %s; evicting it first", key, exc_info=True)+ sizing_failed = True+ oom_ram_usage = 1e30- if ram_usage < min_entry_size:+ if not sizing_failed and ram_usage < min_entry_size:continueoom_score *= oom_ram_usage