Feature Request: Expose filename from **Load Image** node for dynamic output naming
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 155
Description
## Is your feature request related to a problem?
I want the files my workflow exports to keep a reference to the *original* image name (e.g., `cat_01.png` → `cat_01_upscaled.png`).\
Currently, the **Load Image** node provides only the image tensor. Because it doesn’t also output the file’s name, I can’t feed that string into a **Concatenate** (or any string‑handling) node to craft the new filename automatically.\
The result is a brittle workflow that forces me to hard‑code names or rename files afterwards.
## Describe the solution you’d like
- Add a new **string** output socket on **Load Image**—perhaps called `filename` or `source_path`.
- Emit either:
- the full path, **or**
- the basename (configurable flag could be handy—happy with either as a first step).
- The socket’s type should match whatever ComfyUI’s **Concatenate** node expects for string inputs, so the two can connect directly.
## Describe alternatives you’ve considered
1. **Manual renaming**: error‑prone and undermines automation.
2. **Custom Python node**: doable, but overkill for what feels like core functionality.
3. **Regex inside a Text node**: still requires me to manually enter the original name.
## Example workflow
```text
[Load Image]──(image)──▶ …processing… ──▶ [Save Image]
│
└──(filename)──▶ [Concatenate "_upscaled"]──▶ [Save Image filename input]
```
In batch mode this would automatically create outputs such as:
- `cat_01_upscaled.png`
- `dog_12_upscaled.png`
## Why this matters
- **Traceability** – keeps a clear link between source and result files.
- **Automation** – fully scriptable end‑to‑end pipelines.
- **Scalability** – no manual tweaks when processing hundreds of images.
## Environment
- ComfyUI version:
ComfyUI_frontend v1.23.3
ComfyUI_desktop v0.4.53
ComfyUI-Manager V3.30.4
- OS: Windows 11
Contributor guide
Assessment
This issue has not been assessed yet.