ComfyUI Node
π¬ Ray's LLM: Folder Captioner
Caption images alphabetically with a connected CLIP/VLM on GPU. Return aligned lists of answers, original images, and absolute paths. Connect a full vision-language CLIP (for example Qwen3-VL from CLIPLoader, type qwen_image), not a text-only encoder. No sidecars are written. Caption one image at a time. Enable return_images only when needed: output images are decoded after captioning and remain in RAM until outputs are released; use start_index and limit to bound that output.
π¬ Ray's LLM: Folder Captioner
- clip
- text
- image
- image_path
βfolderβΊ
βrecurse_subfoldersfalseβΊ
βstart_index0βΊ
βlimit-1βΊ
βuser_promptDescribe the visible contents of this image in detail.βΊ
βmax_length1024βΊ
βtemperature0.25βΊ
βtop_k40βΊ
βtop_p0.90βΊ
βmin_p0.05βΊ
βrepetition_penalty1.05βΊ
βseed-1βΊ
βthinkingfalseβΊ
βreturn_imagesfalseβΊ
βcleanup_every16βΊ
Categoryπ Ray/π¬ LLM
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | Full generative vision-language CLIP, such as Qwen3-VL from CLIPLoader (type qwen_image). Text-only encoders cannot caption. | |
| folder | STRING | Enter the folder containing images to caption. | |
| recurse_subfolders | BOOLEAN | false | Include images in subfolders, sorted by relative path. |
| start_index | INT | 0 | Skip this many images in alphabetical relative-path order. |
| limit | INT | -1 | Caption at most this many images; use -1 for all remaining images. |
| user_prompt | STRING | Describe the visible contents of this image in detail. | Enter the instruction to apply independently to every image. |
| max_length | INT | 10241β32768 | Set the maximum number of generated tokens per image. |
| temperature | FLOAT | 0.250β2 | Set sampling randomness; use 0 for greedy decoding. |
| top_k | INT | 400β1000 | Keep this many candidate tokens; use 0 to disable top-k filtering. |
| top_p | FLOAT | 0.900β1 | Set the cumulative probability threshold for nucleus sampling. |
| min_p | FLOAT | 0.050β1 | Filter tokens relative to the most probable token; use 0 to disable. |
| repetition_penalty | FLOAT | 1.050β5 | Set the repetition penalty; use 1 for no penalty. |
| seed | INT | -1-1β2147483647 | -1 for random; any >=0 value is reproducible. |
| thinking | BOOLEAN | false | Enable thinking when supported by the selected model; return its decoded response unchanged. |
| return_imagesopt | BOOLEAN | false | Return original-size images after all captions finish. Off keeps the image output empty and avoids retaining the folder's decoded images in RAM. |
| cleanup_everyopt | INT | 160β1024 | Collect transient objects and release unused ComfyUI VRAM caches every N captions. 0 disables periodic cleanup; low-memory cleanup still applies. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| text | STRING | Decoded VLM answers, one per image, in scan order. |
| image | IMAGE | Original RGB images, decoded after captioning when return_images is enabled; otherwise an empty list. |
| image_path | STRING | Absolute source image paths, paired with the answers and images. |