LayerUtility: Image Tagger Save
Image Tagger Save
- image
Image Tagger Save is a save node with a specific superpower: it writes the image and a matching text caption file next to it, using the same base filename. If you've ever built a LoRA training dataset, you know the drill - every image_001.png needs an image_001.txt holding its caption. This node produces exactly that pairing in one step, which makes it the natural end of a dataset-preparation workflow where you're generating or processing images and captioning them as you go.
The inputs that matter:
- image - what to save.
- tag_text - the caption/tag string written to the sidecar
.txtfile. Wire this from a captioning node (a WD14 tagger, a vision-language model, whatever you're using) and the caption is generated and saved automatically alongside the image. That's the whole point: image and its tags, saved together, correctly paired. - custom_path - where to save. Leave it blank for the default output folder, or point it at your dataset directory.
- filename_prefix - the base name (default
comfyui); the numbering and the.txtpairing build off this. - timestamp -
None,second, ormillisecond, appended to filenames to keep batch runs from colliding. - format -
pngorjpg- with quality (default 80) controlling JPG compression. - preview - default true, shows the saved image in the UI like a normal save node.
It's an output node, so it has no data outputs - it's a terminal step. The result lives on disk: your image plus its caption .txt, ready to feed straight into a trainer.
Why this over the standard Save Image node? Because core Save Image only saves the picture. It has no idea about caption files. For dataset work you'd otherwise be writing text files by hand or gluing together a separate save-text node and hoping the filenames line up. Image Tagger Save guarantees the pairing, which is exactly the contract a LoRA/fine-tune pipeline needs - the trainer reads name.png and looks for name.txt, and if they don't match, your captions silently go unused. This node makes that mistake hard to make.
Where it fits: the tail end of a dataset builder. Generate or import images, run them through a tagger, and drop this node last to write the paired files into your training folder. Combined with a batch loader and an auto-captioner, you've got an assembly line that turns raw images into a training-ready dataset with correct captions, no manual file wrangling.
Install is the pack standard. Easiest is ComfyUI Manager - search ComfyUI Layer Style (or "LayerStyle"), install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/chflame163/ComfyUI_LayerStyle, then pip install -r requirements.txt from inside the folder using ComfyUI's Python, and restart. On a hosted ComfyUI it's usually preinstalled - though note that on a shared/hosted setup, custom_path may be sandboxed, so check where files actually land before relying on a specific directory.
The pack-wide caveat: Layer Style is notorious for import failures - install it, restart, and the whole node set shows up red or missing. It's rarely the specific node; it's a dependency clash. The pack pulls a heavy stack (transformers, onnxruntime, opencv), and one mismatched version - a stray transformers or tensorflow being the usual culprit - takes the entire pack down on import. Fix it by reading the ComfyUI startup log for the traceback (it names the package that failed), reinstalling requirements against ComfyUI's own Python, and using Manager's Try Fix. If Image Tagger Save is missing, so is every other LayerStyle node, and that shared import failure is the real problem to solve.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| tag_text | STRING | — | |
| custom_path | STRING | — | |
| 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