From 5c5fbddbbe71c986e43214002069d0edd1260445 Mon Sep 17 00:00:00 2001 From: strint Date: Mon, 17 Nov 2025 15:34:50 +0800 Subject: [PATCH] debug mmap --- comfy/model_management.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/comfy/model_management.py b/comfy/model_management.py index f2e23c446..a2ad5db2a 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -28,8 +28,12 @@ import weakref import gc import os +from functools import lru_cache + +@lru_cache(maxsize=1) def get_mmap_mem_threshold_gb(): mmap_mem_threshold_gb = int(os.environ.get("MMAP_MEM_THRESHOLD_GB", "0")) + logging.debug(f"MMAP_MEM_THRESHOLD_GB: {mmap_mem_threshold_gb}") return mmap_mem_threshold_gb def get_free_disk():