From fb72654e8161b7f83791ffc1d11e7a5fcf13dddc Mon Sep 17 00:00:00 2001 From: Rocky-PC Date: Sun, 25 Jan 2026 05:21:19 +0800 Subject: [PATCH] Update Readme --- README.md | 19 +++++++++++++++++++ __pycache__/nodes.cpython-312.pyc | Bin 7156 -> 7156 bytes 2 files changed, 19 insertions(+) diff --git a/README.md b/README.md index f28de17..84ba30a 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,25 @@ When a node has `OUTPUT_IS_LIST = True`: This is ComfyUI's native batching/looping mechanism. +## ⚠️ Memory Management Warning + +**Important:** The simple loop mechanism in this node pack iterates **by node execution**, not by iteration cycle. This means all nodes in the loop execute for each file, which can lead to **Out of Memory (OOM) errors** if proper memory management is not implemented, especially when processing large batches or using memory-intensive operations. + +### Recommendations: + +1. **For Node-Based Loops (using FilePathsForLoop):** + - Use clean VRAM or clean RAM nodes after heavy procedure nodes complete (e.g., after any model loading required nodes like image generation, audio generation, or video generation) + - This ensures proper cleaning and unloading of unneeded models between iterations + - Example: After your image generation node, connect a "Clean VRAM" or "Clean RAM" node before the next iteration + +2. **For Sequential Loops (true iteration cycles):** + - **Recommended:** Use third-party for-loop/while-loop custom nodes for sequential iteration + - Use `LoadFilePathsFromFolder` node to get file count (as loop count) and file names data + - Pass the file count to your third-party loop node to set the iteration count + - Within the loop, connect the current index value to `GetPathByIndex` node + - Connect filenames/filepaths from `LoadFilePathsFromFolder` to `GetPathByIndex` node's inputs + - This approach provides better control over memory management and true sequential processing + ## Example Workflows ### Simple Loop Processing diff --git a/__pycache__/nodes.cpython-312.pyc b/__pycache__/nodes.cpython-312.pyc index c412e13a2201bd900c1cdbca1403822934cbdae4..3b1884d374a39d6d6ee785308b9f975b044441eb 100644 GIT binary patch delta 23 dcmexj{>7Z{G%qg~0}%YtEzO)NwUO_cGyq>|2g(2d delta 23 dcmexj{>7Z{G%qg~0}#}!m1Z83+{pJ#8UR~q2X+7e