Anima VLM Caption Config
The config node that usually needs no API key
- VLM_CAPTION_CONFIG
AnimaVlmCaptionConfig is a pure configuration node: it collects everything the captioning pipeline needs to know about the vision-language model and hands it downstream as a VLM_CAPTION_CONFIG object that AnimaBatchVlmCaption consumes. It never calls an API itself and it never downloads a model. The name sounds like it wants a key and a cloud account, but the intended setup is a local VLM server on your own machine - so api_key sits there, mostly empty, in the way all honest local-setup keys do.
How it works
Every field gets bundled into a config dict (VlmCaptionConfig in vlm_caption.py), which is validated on the way out - bogus caption_mode or trigger_mode values are quietly snapped back to hybrid and folder_name. The actual work happens one node downstream: AnimaBatchVlmCaption uses this config to build the OpenAI-format request, including the caption prompt that starts with your trigger word.
The inputs that matter
- api_url - the VLM endpoint, default
http://127.0.0.1:8000/v1/chat/completions. The pack'svlm_server.pyserves exactly this shape, and any OpenAI-compatible server works. Leave the default if you're running the bundled server. - api_key - leave blank for a local server. Only fill it if you point
api_urlat something that wants a bearer token. - model_name - what the server knows your model as, default
gemma-vlm. Match it to your server's registration or you'll get HTTP 400s. - caption_mode -
tags_only,hybrid, ornatural_language.hybrid(default) asks for the Anima-style line: trigger,anime illustration, booru-style tags, then one short natural-language phrase. That mirrors how Anima was trained - it understands tags and prose, per the KB's Anima notes - so hybrid is the natural default. - trigger_mode - where the trigger word comes from:
folder_name(the task folder's name),parent_folder, orroot_folder. - max_tokens (default 180), temperature (0.2 - low is right for captioning; you want consistency, not creativity), request_timeout (120s), overwrite_existing_caption (false = skip already-captioned images), and nsfw_caption_mode (true = keep adult content clinical, add safety rules to the prompt, and strip underage/ambiguous tags - worth knowing this pack applies that filter by default even though Anima itself is uncensored).
The single output, VLM_CAPTION_CONFIG, feeds straight into AnimaBatchVlmCaption.
Installing it
It's in the AnimaForge Windows pack: ComfyUI Manager → "ComfyUI-AnimaForge-Windows", or
cd C:\ComfyUI\custom_nodes
git clone https://github.com/AI-KSK/ComfyUI-AnimaForge-Windows.git
cd ComfyUI-AnimaForge-Windows
powershell -ExecutionPolicy Bypass -File .\scripts\install_windows.ps1
The pack's own requirements are just requests and pillow; the VLM side needs your local server up (a Gemma-class GGUF plus matching mmproj in ComfyUI\models\LLM).
Common issues
The number one beginner stumble is model_name mismatch - the node sends what you typed, and a llama-cpp server returns 400 if the id doesn't match its loaded model. Second: pointing api_url at a server that isn't running, which shows up downstream as a connection error per image. Third: forgetting that overwrite_existing_caption defaults to false is actually a feature - rerun the workflow to fill gaps, and flip it only when you've changed your caption mode and genuinely want to redo everything. The KB's captioning guidance holds here too: auto-caption big sets, but audit the small ones by hand, because multi-subject attribution is where every VLM slips.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| api_url | STRING | http://127.0.0.1:8000/v1/chat/completions | — |
| api_key | STRING | — | |
| model_name | STRING | gemma-vlm | — |
| caption_mode | COMBO | hybrid | 3 options: tags_only, hybrid, natural_language |
| trigger_mode | COMBO | folder_name | 3 options: folder_name, parent_folder, root_folder |
| max_tokens | INT | 18016–2048 | — |
| temperature | FLOAT | 0.200–2 | — |
| overwrite_existing_caption | BOOLEAN | false | — |
| nsfw_caption_mode | BOOLEAN | true | — |
| request_timeout | INT | 1205–1800 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| VLM_CAPTION_CONFIG | VLM_CAPTION_CONFIG | — |