diff --git a/README.md b/README.md index ac63111..c2ee7af 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ │ └──────────────────────────────────┘ │ └───────────────┬──────────────────────┘ │ - image · mask · filename · index · total + image · mask · filename · index · total · file_path ``` Drop the node on the canvas, point it at a folder, wire **image** (and **mask** if you need it) into your graph, and Queue. Each Queue loads the next image; when it reaches the end it loops back to the start. That's the whole idea. @@ -98,6 +98,7 @@ While a hold is active, the other buttons grey out; **▶ Resume** restores the | `filename` | STRING | basename of the loaded file | | `index` | INT | 0-based position used this run | | `total` | INT | number of matching files found | +| `file_path` | STRING | absolute path of the loaded file (e.g. `C:\frames\frame_003.png`) | ## How "advance per Queue" works diff --git a/pyproject.toml b/pyproject.toml index 5d8020c..9c2c035 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "sequential-image-loader" description = "Load a folder of images one at a time, in order — a fresh image on every Queue press. A paced, single-image folder sequencer for batch-processing frames or photos through any ComfyUI workflow." -version = "1.3.0" +version = "1.4.0" license = { file = "LICENSE" } readme = "README.md" dependencies = [] diff --git a/sequential_loader.py b/sequential_loader.py index a2fde12..1492202 100644 --- a/sequential_loader.py +++ b/sequential_loader.py @@ -138,8 +138,10 @@ class SequentialImageLoader: } } - RETURN_TYPES = ("IMAGE", "MASK", "STRING", "INT", "INT") - RETURN_NAMES = ("image", "mask", "filename", "index", "total") + # file_path is declared last (newest output) so links in older saved + # workflows keep their slot positions. + RETURN_TYPES = ("IMAGE", "MASK", "STRING", "INT", "INT", "STRING") + RETURN_NAMES = ("image", "mask", "filename", "index", "total", "file_path") FUNCTION = "load" CATEGORY = "image" @@ -162,7 +164,7 @@ class SequentialImageLoader: ) pos = int(index) % total # wrap around at the end - path = files[pos] + path = os.path.abspath(files[pos]) filename = os.path.basename(path) image, mask = _load_image_tensors(path) @@ -174,7 +176,7 @@ class SequentialImageLoader: "index": pos, "total": total, }]}, - "result": (image, mask, filename, pos, total), + "result": (image, mask, filename, pos, total, path), }