TK JoyCaption Interrogator
The batch JoyCaption node — uncensored natural-language captions for a whole folder
- texts
- filenames
If you're captioning a training set in natural language, JoyCaption is the community default - an 8B VLM built from scratch for exactly this job, free, open, and uncensored by design. TK JoyCaption Interrogator is the batch wrapper that points it at a folder, writes a .txt caption for every image, and gives you back the texts. It's the pack's answer for "I want rich prose captions, not tags, and I don't want to ask an API."
How it works
Give it a source_path and an output_path. It loads the JoyCaption model (default fancyfeast/llama-joycaption-beta-one-hf-llava, with the old pre-alpha as the second option), pulls it into tk_comfyui_imageVL/models on first use, then for each image:
- optionally resizes (same megapixel / longest-edge toggles as the batch loader),
- builds the caption prompt from your controls,
- runs inference and writes
{prefix}{n}.txtintooutput_path, - copies the image over with its new
{prefix}{n}name.
Outputs are texts (LIST) and filenames (LIST), position-matched. Saving is automatic - there's no separate saver step.
The controls that actually shape the captions
- caption_type -
Descriptive(formal prose) orStable Diffusion Prompt(tag-style with quality boosters like "masterpiece, best quality"). This swaps the internal instruction the model follows. - caption_length -
any,very short,short,medium-length,long,very long. It's appended to the prompt, so treat it as a soft constraint, not a hard token limit. - user_prompt - overrides the built-in instruction entirely. Leave it empty to use the preset for your
caption_type. - max_new_tokens / temperature / top_p / top_k - generation knobs; 512 default is fine for captions.
- cache_model - keep it on. Off unloads the model after every run, and reloading an 8B VLM each time turns a batch into a waiting game.
- enable_captioning - flip this off and the node becomes a resize-and-rename batch loader that writes no captions. It's the escape hatch if you just want the image pipeline.
Installation
cd ComfyUI/custom_nodes
git clone https://github.com/tackcrypto1031/tk_comfyui_imageVL.git
cd tk_comfyui_imageVL
pip install -r requirements.txt
Restart ComfyUI after, or use ComfyUI Manager and search tk_comfyui_imageVL. The node leans on transformers>=4.45.0, accelerate, and huggingface-hub from the pack's requirements.
Where people get burned
- It's an 8B model. Beta One is Llama 3.1 8B plus a SigLIP2 vision encoder. It fits a consumer card but it's not instant - a folder of hundreds of images takes a while, and the first run downloads the weights.
- Multi-subject attribution. The author says it himself: when several people are in a frame, VLMs mix up who's wearing what. Auto-caption the bulk, audit the small sets by hand.
- Not the tool for anime tag datasets. JoyCaption's tag modes approximate booru vocabulary, but if you're captioning for Illustrious/Pony/NoobAI, a WD14 tagger emits the exact tags those models were trained on. Use this node when the base wants prose (Flux, Z-Image, most LLM-encoded models) - and its uncensored stance is a real advantage there, since the API captioners refuse exactly the content you might need captioned.
Batch JoyCaption in a node, no API key, no censorship dance, .txt files done for you. That's the pitch, and it mostly delivers.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| source_path | STRING | C:/input_images | — |
| output_path | STRING | C:/output_images | — |
| joycaption_model | COMBO | fancyfeast/llama-joycaption-beta-one-hf-llava | 2 options: fancyfeast/llama-joycaption-beta-one-hf-llava, fancyfeast/joy-caption-pre-alpha |
| caption_type | COMBO | Descriptive | 2 options: Descriptive, Stable Diffusion Prompt |
| caption_length | COMBO | long | 6 options: any, very short, short, medium-length, long, very long |
| user_prompt | STRING | — | |
| max_new_tokens | INT | 5121–4096 | — |
| temperature | FLOAT | 0.600–1 | — |
| top_p | FLOAT | 0.900–1 | — |
| top_k | INT | 00–100 | — |
| cache_model | BOOLEAN | true | — |
| filename_prefix | STRING | image_ | — |
| resize_mp | BOOLEAN | false | — |
| img_mp | FLOAT | 1.00.1–100 | — |
| resize_px | BOOLEAN | false | — |
| img_px | INT | 102464–8192 | — |
| enable_captioning | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| texts | LIST | — |
| filenames | LIST | — |