Update Readme
This commit is contained in:
@@ -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
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user