From 4f1b7bbb4e3670bfd9dc1e0cb4553bd65d315e40 Mon Sep 17 00:00:00 2001 From: zhaoyingzhuo Date: Fri, 28 Mar 2025 02:30:39 +0000 Subject: [PATCH] [doc]: add reminder to readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6bb2a98..7e9196c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A model cached-loader custom node for ComfyUI. Recommended Comfy version: v0.3.26. # How does it work? -Some custom nodes call comfy.utils.load_torch_file whey they are executed. However, it is waste of time for these frequently executed workflows. Here is a easy implementation for ComfyUI to cache torch file and avoid from duplicated loading torch files. By Using symbols hijack, many functions that read disk freqently can be cached in host memory. So when they are called next time, it will take no time. In order to trap tensor status after user clicks **`Clear Execution Cache`**(After user clicks that button, the tensors on gpu will be released and the caches are dirty), I add decorator "cache_model" to get the tensor status. If the tensors are released, they will load them again instead of use the dirty cache. +Some custom nodes call comfy.utils.load_torch_file whey they are executed. However, it is waste of time for these frequently executed workflows. Here is a easy implementation for ComfyUI to cache torch file and avoid from duplicated loading torch files. By Using symbols hijack, many functions that read disk freqently can be cached in host memory. So when they are called next time, it will take no time. In order to trap tensor status after user clicks **`Clear Execution Cache`**(After user clicks that button, the tensors on gpu will be released and the caches are dirty), I add decorator "cache_model" to get the tensor status. If the tensors are released, they will load them again instead of use the dirty cache. **As a reminder, this behavior will also take up some VRAM. This is the way to use VRAM to increase efficiency.** # How to install? This node has been registed to [Comfy Registry](https://registry.comfy.org/). If you have installed comfy manager, you can use command below: