LayerUtility: Image Tagger Save V2
Image Tagger Save V2 — save an image with its caption as a matching text file
- image
A Save Image node with a specific job in mind: dataset building. Every time you save an image with this node, it can also write a matching text file alongside it containing whatever tag or caption text you feed it - the exact image.png / image.txt pairing that LoRA and fine-tuning trainers expect. If your workflow generates a caption automatically (a captioning model upstream) or you're hand-typing tags as you go, this saves the pairing step you'd otherwise do manually in a file browser.
How it works
It's an output node - nothing flows out of it, it just writes files to disk, which is why it's the terminal node in whatever branch it sits on. Alongside the image, it writes tag_text to a same-named .txt file next to the image, following whatever filename logic you've configured, so the pair stays matched.
The inputs that matter
image- what gets saved.tag_text- the caption/tag string written to the matching text file. Wire this from a captioning node upstream, or a text box you're hand-editing between runs.custom_path/custom_filename- override the default output location and filename; leave blank to use ComfyUI's normal output folder and auto-naming.remove_custom_filename_ext(default true) - strips any extension you accidentally typed intocustom_filename, so you don't end up with a file literally namedphoto.png.png.filename_prefix(defaultcomfyui) - prepended to auto-generated filenames.timestamp-None,second, ormillisecondprecision appended to the filename, useful for avoiding collisions across a batch run.format(png or jpg) andquality(10–100, jpg only) - output format and compression.preview(default true) - whether the saved image also shows up in the ComfyUI preview panel.
No outputs - this is a terminal, save-only node.
How to install it
Search ComfyUI Layer Style in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_LayerStyle
pip install -r ComfyUI_LayerStyle/requirements.txt
Restart; find it under 😺dzNodes → LayerUtility → SystemIO.
Common issues
If you're building a dataset for training and the text files aren't showing up where you expect, check custom_path first - an empty value falls back to the standard ComfyUI output directory, which might not be the folder your trainer is actually pointed at. Worth remembering: a lot of trainers, and the community consensus in general, treat auto-captioning models like BLIP as genuinely weak for this purpose compared to hand-written captions or a stronger captioner (Florence 2, JoyCaption) - this node just saves whatever text you hand it, it doesn't judge the quality of the caption, so garbage in the tag_text input is garbage in your training set. And if you're running a batch and filenames keep colliding or overwriting each other, that's timestamp set to None - bump it to second or millisecond so each run in the batch gets a unique name instead of stomping the last one.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| tag_text | STRING | — | |
| custom_path | STRING | — | |
| custom_filename | STRING | — | |
| remove_custom_filename_ext | BOOLEAN | true | — |
| filename_prefix | STRING | comfyui | — |
| timestamp | COMBO | 3 options: None, second, millisecond | |
| format | COMBO | 2 options: png, jpg | |
| quality | INT | 8010–100 | — |
| preview | BOOLEAN | true | — |
Outputs (0)
No outputs