Save Media with Tags
Copy the clip, write the caption, done
- status
This is the payoff node of the ComfyUI-VideoTagger pack - the "write it down" step after something figured out what your media is. You feed it a media file path and some tag text, and it does two boring-but-essential things: copies the file into an output folder and writes a same-name .txt next to it with the tags. That's it. It's the terminal of the pipeline, marked as an output node, which in ComfyUI-speak means it always runs and is what the graph ends on.
How it works
The mechanism is unapologetically plain Python. It creates the output directory if it doesn't exist (os.makedirs), checks the media file is actually there, copies it with shutil.copy2, and writes tag_content to base_name.txt in UTF-8. Two behaviors are easy to miss:
- The copy is skip-on-exists. If a file with that name already lives in the output folder, the node quietly skips the copy and moves on. No overwrite, no warning. Re-running a workflow with updated tags updates the
.txtbut leaves the media alone - which is usually exactly what you want, until it isn't. - The
.txtalways overwrites. Same name, fresh write every run, so your latesttag_contentwins.
Also worth knowing: the status string it returns is in Chinese - a 成功:... (success) message or an 错误:... (error) message if the media path is missing. The error check means a bad path won't hard-crash your graph; it just hands you a Chinese error string.
The inputs that matter
Three required inputs, all plain strings:
- output_directory - where the copies land. It's created for you if missing.
- media_path - absolute path of the source media. Wire this to Media List's
media_pathoutput to process a scanned queue. - tag_content - the text written to the
.txt. Wire this to thetextoutput of Tagger from Glm4vPlus, or just type or pipe in any caption. The node doesn't care where the text came from.
One output: status (STRING), for logging or feeding a text display.
Where you'd actually use it
The pattern the pack is built for: Media List scans a folder → the tagger (or you) produces text → this node copies the file and its caption into a curated output folder while leaving your raw footage untouched. That's a genuinely useful archival loop - you keep the messy originals where they are and collect the tagged selects in one place. Don't reach for it as a general file manager though: it keeps original filenames, does no dedup, and renames nothing. It's a lazy copy-plus-caption helper, and it's good at being exactly that.
Installing it
ComfyUI Manager (search "ComfyUI-VideoTagger") or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/civen-cn/ComfyUI-VideoTagger
cd ComfyUI-VideoTagger
pip install -r requirements.txt
Then restart ComfyUI. The one dependency in requirements.txt is zhipuai - the GLM API client - and because the pack imports it at module load, a skipped install means none of the three nodes appear, not just the tagger. If the pack's nodes are missing from your list, that's your first suspect. No model downloads here; this node itself touches nothing heavy.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| output_directory | STRING | — | |
| media_path | STRING | — | |
| tag_content | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| status | STRING | — |