diff --git a/README.md b/README.md index 38163fb..fe9ba34 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ git clone https://github.com/RockyHong/ComfyUI-FilePathsFromFolder.git ``` 2. Restart ComfyUI -3. Search nodes by name: `Load File Paths From Folder`, `Get File Path By Index`, `File Paths For Loop Start`, `File Paths Loop Sync` +3. Search nodes by name: `Load File Paths From Folder`, `Get File Path By Index`, `File Paths For Loop Start`, `File Paths For Loop Sync` ### Alternative: Manual install (ZIP) @@ -56,7 +56,7 @@ Use this when you want the simplest setup: `File Paths For Loop Start` returns l ### Nodes used - `File Paths For Loop Start`: generates the per-file list outputs (`current_filepath`, `current_index`, etc.) -- `File Paths Loop End`: loop terminator / completion signal +- `File Paths For Loop End`: loop terminator / completion signal ### Example workflow (internal loop: once per file) @@ -66,8 +66,8 @@ Use this when you want the simplest setup: `File Paths For Loop Start` returns l 2. `current_filepath` → your loader node (e.g. Load Image) 3. Your processing nodes 4. (Optional) outputs you want to **guarantee run** (e.g. save/write/export nodes) → `FilePathsEnsureExecution.passthrough_1` … `passthrough_5` -5. `current_index` → `File Paths Loop End.current_index` -6. (Optional) `FilePathsEnsureExecution.passthrough` → `File Paths Loop End.passthrough` (this “anchors” the route so it executes) +5. `current_index` → `File Paths For Loop End.current_index` +6. (Optional) `FilePathsEnsureExecution.passthrough` → `File Paths For Loop End.passthrough` (this “anchors” the route so it executes) ### Memory note @@ -76,27 +76,27 @@ Use this when you want the simplest setup: `File Paths For Loop Start` returns l - **What you'll see**: it may run like **"load all → process all → save all"**, not "load → process → save" per file. - **When this is good**: if you want to run many files with the **same model/settings**, batching can help keep the model "warm" and avoid offload/reload each file. - **Why memory can climb**: more intermediate results may stay in RAM/VRAM until later nodes run. -- **Solution for mid-batch cleanup**: Use `File Paths Loop Sync Trigger` + `File Paths Loop Sync Resume` to run cleanup **once** between batch stages (see [Batch Synchronization](#batch-sync) below). +- **Solution for mid-batch cleanup**: Use `File Paths For Loop Sync Trigger` + `File Paths For Loop Sync Resume` to run cleanup **once** between batch stages (see [Batch Synchronization](#batch-sync) below). - **Need true one-file-at-a-time?** Use an external loop/for/while node pack that runs each file start→finish before moving on. ### (Optional) Ensure execution for save/write/export routes -Some ComfyUI workflows can “skip” routes that don’t affect the final output the graph thinks it needs. If you have save/write/export nodes that you **must** run, use `File Paths Loop Ensure Execution` (`FilePathsEnsureExecution`) as an anchor. +Some ComfyUI workflows can “skip” routes that don’t affect the final output the graph thinks it needs. If you have save/write/export nodes that you **must** run, use `File Paths For Loop Ensure Execution` as an anchor. -![File Paths Loop Ensure Execution](screenshots/File%20Paths%20Loop%20Ensure%20Execution.jpg) +![File Paths For Loop Ensure Execution](screenshots/File%20Paths%20Loop%20Ensure%20Execution.jpg) - Connect the nodes you want to guarantee run into `passthrough_1` … `passthrough_5` -- Connect `passthrough` output to `File Paths Loop End.passthrough` +- Connect `passthrough` output to `File Paths For Loop End.passthrough` ## Batch synchronization (run once between stages) Use this when you need to run something **exactly once between two batched stages** (e.g. LLM batch → clear VRAM once → T2I batch), without switching to an external per-file loop. -- **`File Paths Loop Sync Trigger`**: put this right after a batched output. It provides: +- **`File Paths For Loop Sync Trigger`**: put this right after a batched output. It provides: - **`anything`**: the original batch (passes through unchanged) - **`trigger`**: a single (non-batched) value you can feed into **any “run once”** node -- **`File Paths Loop Sync Resume`**: a simple wait point. It: +- **`File Paths For Loop Sync Resume`**: a simple wait point. It: - Takes the batch on **`anything`** (from Trigger) - Takes a completion signal on **`wait_for`** (from your one-time node) - Outputs the same batch so downstream nodes continue as a batch diff --git a/nodes.py b/nodes.py index 0f0f0a7..70eb1e8 100644 --- a/nodes.py +++ b/nodes.py @@ -262,8 +262,8 @@ NODE_DISPLAY_NAME_MAPPINGS = { "LoadFilePathsFromFolder": "Load File Paths From Folder", "GetPathByIndex": "Get File Path By Index", "FilePathsForLoop": "File Paths For Loop Start", - "FilePathsLoopClose": "File Paths Loop End", - "FilePathsEnsureExecution": "File Paths Loop Ensure Execution", - "FilePathsLoopSyncTrigger": "File Paths Loop Sync Trigger", - "FilePathsLoopSyncResume": "File Paths Loop Sync Resume", + "FilePathsLoopClose": "File Paths For Loop End", + "FilePathsEnsureExecution": "File Paths For Loop Ensure Execution", + "FilePathsLoopSyncTrigger": "File Paths For Loop Sync Trigger", + "FilePathsLoopSyncResume": "File Paths For Loop Sync Resume", } diff --git a/screenshots/File Paths Loop Ensure Execution.jpg b/screenshots/File Paths Loop Ensure Execution.jpg index 01ea3d6..8a39b17 100644 Binary files a/screenshots/File Paths Loop Ensure Execution.jpg and b/screenshots/File Paths Loop Ensure Execution.jpg differ diff --git a/screenshots/File Paths Loop Sync.jpg b/screenshots/File Paths Loop Sync.jpg index f56ec62..96e5974 100644 Binary files a/screenshots/File Paths Loop Sync.jpg and b/screenshots/File Paths Loop Sync.jpg differ diff --git a/screenshots/Option B (Interal Loop Node Method).jpg b/screenshots/Option B (Interal Loop Node Method).jpg index a4bca9b..2a64bc5 100644 Binary files a/screenshots/Option B (Interal Loop Node Method).jpg and b/screenshots/Option B (Interal Loop Node Method).jpg differ