Nodes/ComfyUI-VideoTagger/Tagger from Glm4vPlus
ComfyUI Node

Tagger from Glm4vPlus

A frontier Chinese VLM describes your video

By civen-cn·Created about a year ago·Updated about a year ago· 1
Tagger from Glm4vPlus
    • text
    • tokens
    video
    api_key
    role_textdesc video

    The name is a mouthful, but the pitch is simple: give this node a video file, and a hosted vision model - Zhipu's glm-4v-plus - watches it and writes back a description. No local model, no VRAM, no download. Just an API key and a video path. It's the "tagging brain" of the ComfyUI-VideoTagger pack, and the piece that makes the whole thing more than a fancy file copier.

    Why would you trust a model you've maybe never heard of with your footage? Because GLM-4V is legit. It comes from Zhipu, the Tsinghua-affiliated lab behind the THUDM line, and the open glm-4v-9b is well regarded in this community for exactly this job - one local wrapper thread called it "completely blown my mind" for captioning, competing with JoyCaption and WD14. The plus version here is the hosted API, so you skip the 30GB local model and just pay per call.

    How it works

    The mechanism is about as direct as an API wrapper gets. It reads the whole video file into memory, base64-encodes it, and POSTs it to Zhipu's chat.completions endpoint with model="glm-4v-plus". The message content is the video as a video_url plus your role_text as the text instruction. It returns whatever the model says, plus the token count from the response usage.

    The inputs and outputs

    Three required inputs:

    • video - absolute path to a video file. It's read from disk and base64'd, so it needs to be a local path, not a URL.
    • api_key - from Zhipu's BigModel console at open.bigmodel.cn. It's a Chinese service; the signup and billing are in Chinese, budget for it.
    • role_text - the instruction you send alongside the video. Multiline, and here's the first trap: the default is literally desc video. That's the author's placeholder, not a thoughtful prompt. You will get much better results by writing your own - "output comma-separated Danbooru-style tags for a training set," "describe the subject, camera motion, and lighting," whatever your downstream actually needs.

    Two outputs:

    • text (STRING) - the model's reply. Wire this into Save Media with Tags' tag_content (or any text consumer) and you've got an auto-tagged archive.
    • tokens (INT) - total_tokens from the API usage, so you can meter cost and see that a long video burned a surprising number of them.

    Where people get burned

    • The whole file goes over the wire, base64'd. Encoding inflates size by ~33%, and the model is processing every frame it's fed. Long or high-res clips will blow past the API's video limits or just take forever. Trim to short segments (a few seconds to a low double-digit count) before tagging; this is a captioner, not a film critic.
    • It's per-call metered. Each run costs tokens, and video input is the expensive end of VLM pricing. The tokens output exists so you can watch that number climb.
    • Your footage leaves your machine. This is the standard API-wrapper trade, and worth stating plainly because this category has already shipped malware once: the node holds a credential and makes network calls by design. zhipuai is a well-known official client and this pack is a tiny readable source file, but don't paste a real key into a workflow you'll share - the JSON you post carries it.

    Installing it

    cd ComfyUI/custom_nodes
    git clone https://github.com/civen-cn/ComfyUI-VideoTagger
    cd ComfyUI-VideoTagger
    pip install -r requirements.txt
    

    requirements.txt is a single line: zhipuai, the official client. That import happens at module load, so if you skip the pip step, the whole pack fails to load - all three nodes vanish, not just this one. Restart after installing, and grab your key from BigModel before your first run.

    CategoryVideoTagger

    Inputs (3)

    NameTypeDefaultDescription
    videoSTRING
    api_keySTRING
    role_textSTRINGdesc video

    Outputs (2)

    NameTypeDescription
    textSTRING
    tokensINT