From 40cb519cf66d52bd0705d056742553d3b743fb94 Mon Sep 17 00:00:00 2001 From: Isi Date: Thu, 28 Aug 2025 11:28:46 +0100 Subject: [PATCH] Update README.md --- README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3794635..e06418c 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ This is especially useful for **low VRAM & low RAM environments**, helping to re gc.collect() -🛠️ Installation +## 🛠️ Installation 1. Navigate to your ComfyUI custom_nodes folder: ```python @@ -40,7 +40,7 @@ This is especially useful for **low VRAM & low RAM environments**, helping to re pip install -r requirements.txt ``` -📝 Usage +## 📝 Usage Assume you have a large CLIP model that you want to remove from VRAM (without unloading it into low system RAM) before loading your diffusion model to avoid OOM errors: @@ -52,3 +52,56 @@ Assume you have a large CLIP model that you want to remove from VRAM (without un The CLIP model will be deleted from memory after use, while your encoded text (data) continues downstream into the workflow. + +## 🔍 How This Node Differs from Normal ComfyUI Memory Management + +By default, ComfyUI has its own memory manager that tries to balance VRAM and system RAM usage: + +When a model is not needed in VRAM, ComfyUI may move it from VRAM to system RAM (“unloading” it) so it can be reloaded faster later. + +This is efficient if you have enough RAM, because models don’t need to be reloaded from disk each time. + +However, in low RAM environments, this behavior can cause your system RAM to fill up, leading to slowdowns or even OOM crashes. + + +## ⚖️ Downsides of Using This Node + +While this node is powerful for low-memory setups, there are trade-offs: + +**Slower reloads** + +Since the model is completely deleted, if you need it again later in the workflow, ComfyUI must reload it from disk. + +Disk loads are much slower than reloading from RAM. + +**No caching benefit** + +ComfyUI’s memory manager caches models to speed up reuse. + +This node removes that cache advantage; models won’t be instantly available later. + +**Workflow fragility** + +If another node down the line expects the model still to exist, your workflow may break. + +This node is best used only when you’re sure the model will not be needed again. + +**One-way action** + +Once deleted, the model is gone. There’s no “undo” unless it is explicitly reloaded by another loader node. + + +## 📝 When to Use This Node + +You have low VRAM and low system RAM. + +You want to run multiple heavy models in a single workflow without hitting OOM errors. + +You are done using a model (e.g., CLIP for text encoding, or a helper model), and it won’t be needed again later. + + +## 🚫 When Not to Use This Node + +If you have enough RAM and want to benefit from ComfyUI’s smart caching. + +If you plan to use the same model multiple times in the workflow.