Nodes/WAS LMStudio Easy-Query/LM Studio Easy-Caption
ComfyUI Node

LM Studio Easy-Caption

Caption images with a local vision model — no cloud, no key

By WASasquatch·Created 11 months ago·Updated 6 months ago· 19
LM Studio Easy-Caption
  • model
  • images
  • options
  • captions
modeone-by-one
task_nameBooru-Style
user_prompt

LM Studio Easy-Caption is the node that turns your local vision model into a captioning machine. You feed it images, it asks LM Studio to describe them, and it hands you back text - with the twist that the "how to describe them" part comes from preset task files that are tuned for training. If you've been captioning datasets by hand or through a cloud API, this is the local, keyless replacement.

Captioning is still the highest-leverage step in LoRA training, and it splits by architecture: the Danbooru-tag lineage (Illustrious, Pony, NoobAI) wants comma-separated tags like WD14 produces, while LLM-encoder models like Flux and the Wan family want natural-language prose. This pack's preset tasks map straight onto that split. Pick "Booru-Style" for a tag-based anime dataset, "SDXL Family" or "Flux Family" for natural-language captions aimed at those bases, "Wan Family" for video training sets, "Photorealism Caption" for photo sets. Each preset is just a .txt file in the pack's tasks/ folder used as the system prompt - so you can edit them or drop your own in and they show up in the dropdown. That's a genuinely nice design, and the reason people reach for this pack over a raw LM Studio call.

The mechanism is the pack's standard one: images arrive on the images socket, get resized to image_max_size (set on the Model node) to keep the context and VRAM footprint sane, get encoded, and go to LM Studio. The vision model does the rest. mode controls batching - one-by-one (default) sends one request per image, batch sends all of them in a single request. Batch is faster but harder on the context window; for a folder of mixed images, one-by-one is the safe default.

The inputs that matter:

  • model - LMSTUDIO_MODEL from the LM Studio Model node. This is where you pick the VLM (a qwen2.5-vl or Qwen3-VL variant) and set temperature. Keep it low - captioning is a deterministic task.
  • images - the IMAGE input. One image or many.
  • task_name - the preset that becomes your system prompt. This is the whole point of the node.
  • user_prompt - optional extra instructions appended to the task preset; leave blank to use the preset alone.
  • options (optional) - an LMSTUDIO_OPTIONS wire for per-request overrides.

The single output, captions, is a list of strings - one per image in one-by-one mode, one total in batch mode. Wire it to a text display or save node, or chain it into whatever consumes captions.

Install it with the pack: ComfyUI Manager searching "WAS LMStudio Easy-Query", or

cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/ComfyUI_LMStudio_EasyQuery

restart, pip install lmstudio numpy Pillow, and have LM Studio running with a VLM downloaded. The pack downloads no models itself.

Where people get burned: you wire images in, pick a text-only model, and the responses come back as if the images never existed. Check the Model node is set to a vision model, and that images are actually reaching the images socket. If you're captioning with a thinking model, flip strip_thinking_tags on via an Options node or you'll get reasoning text in your captions. And if the output reads like it's not matching the preset's style, check user_prompt - extra instructions appended to the system prompt can quietly steer the result off-preset.

CategoryLM Studio

Inputs (6)

NameTypeDefaultDescription
modelLMSTUDIO_MODELLM Studio model settings produced by the LM Studio Model node. Contains model_id, temperature, max_tokens, seed, and image_max_size.
imagesIMAGEIMAGE input to caption. One or more images are accepted. Each will be resized to image_max_size before encoding.
modeCOMBOone-by-oneBatch sends all images in a single request; one-by-one sends one request per image using the same task and user prompt.
task_nameCOMBOBooru-StyleBuilt-in task preset name loaded from /tasks/*.txt. The file content is used as the system prompt.
user_promptSTRINGOptional user instructions appended to the task's system prompt. Leave blank to use only the task preset.
optionsoptLMSTUDIO_OPTIONSPer-request overrides (temperature, max_tokens, seed, top_p, top_k, penalties, stop). These take precedence over values from the Model node.

Outputs (1)

NameTypeDescription
captionsSTRING