Get Image Filename
Pull the filename back out of an image
- images
- filename
Once an image is loaded into a ComfyUI graph, it's just pixel data - a tensor. Whatever it was called on disk doesn't travel with it automatically. xO_GetImageFilename exists to close that gap: feed it an image, get the filename back as a plain string you can actually use downstream.
That's genuinely handy in a couple of common spots. You want your saved output to inherit the input's name instead of ComfyUI's generic ComfyUI_00001_.png counter. You're batch-processing a folder and want to log which file you're currently on. You're building a naming convention where the output filename is derived from the input one (add a suffix, swap an extension). All of those need the filename as a string somewhere in the graph, and this node is the one job that does that and nothing else.
How it works
There isn't much mechanism to describe, and that's worth being upfront about: this node ships with no description text, and it isn't in the pack's own README at all - the README only documents two of the pack's eight nodes (both Ollama-related), and this isn't one of them. So what you get here is what the schema tells you: one IMAGE in, one STRING out, named filename. Whatever extraction logic runs in between - reading it off the image's ComfyUI-injected metadata, most likely, since that's the standard mechanism a LoadImage node uses to carry a source filename forward - happens invisibly. The class name and the schema are the entire spec you get.
The inputs and outputs that matter
images(IMAGE, required) - wire this straight from aLoadImagenode for the best shot at getting a real filename back. If the image has already passed through a node that regenerates a fresh tensor (a resize, a color-space conversion, a composite), it may not carry the original name with it anymore.filename(STRING) - the only output. Worth noting it's flaggedis_list: falsein the schema, so if you feed it a batch of images rather than a single one, expect one filename back, not one per image - plan around that if you're processing a batch and need per-image names.
How to install it
Same install as every node in this pack. Through ComfyUI Manager, search ComfyUI Neural Nodes and install. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/xobiomesh/ComfyUI_xObiomesh
then restart ComfyUI. No models, no unusual dependencies for this node specifically - it's working entirely with data already in your graph.
Worth setting expectations before you dig further into the pack: it presents itself, via its README, as a multi-agent LLM conversation toolkit built around local Ollama models. In reality it ships six other utility and dev-tool nodes the README never mentions, this one included, and there's no visible community track record for it anywhere - searching for the pack turns up nothing. Small, personal-project-tier pack; treat the schema as your primary documentation.
Common issues & troubleshooting
Filename comes back empty or generic. Most likely the image lost its filename association before reaching this node. Trace the wire back - if there's any processing node between LoadImage and this one, try connecting straight off the loader instead and see if that fixes it.
You fed it a batch and only got one name. That's the is_list: false output behaving as documented, not a bug. If per-image filenames matter to your workflow, you'll need to process images one at a time through this node rather than as a batch.
It errors and you can't find why. Because there's no README entry, no node description, and no forum thread for this specific node, you're working from the schema alone. Double-check the folder under custom_nodes is named exactly ComfyUI_xObiomesh (not -main from a manual zip download) and that you did a full restart, not just a browser refresh - that resolves the large majority of "node behaves oddly" reports for any pack this thin on documentation.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| filename | STRING | — |