DaSiWa LLM Analyze
Run a local chat or vision-language model in your graph
- llm_config
- images
- response
- info
This is the node that actually runs your local model - DaSiWa_LLMModelSelector picks what loads, this one decides what you ask it and what you feed it. Point it at connected text, a still image, or a batch of video frames (from Load Image, a VHS frame loader, whatever produces an IMAGE batch), and it returns a plain STRING response you can route into a prompt, a metadata field, or just eyeball in a Preview node.
What it's for
The obvious use is captioning - feeding generated or reference images through a local VLM to get tags or natural-language descriptions back, the same idea as tools like JoyCaption or Florence2, except this node runs whatever chat/vision model you've pointed the Model Selector at rather than being locked to one checkpoint. The less obvious but genuinely useful case: video prompt enhancement. The pack ships built-in system prompt presets specifically tuned for LTX-2.3 and Wan2.2 - feed it your rough idea, get back a prompt written the way those models actually respond to, since both are notoriously more prompt-sensitive than most image models.
How it works
llm_config (required, from the Model Selector) tells it which model to run. system_prompt_preset is a 21-option dropdown covering custom (write your own via system_prompt), the two video-enhancement presets, and a spread of captioning presets crossed by detail level (simple/detailed/very_detailed) and style (mixed tags, tag-only, natural language) - pick the caption preset that matches how you want the output formatted rather than trying to coax a natural-language model into spitting out Danbooru tags via prompt alone. prompt is your actual instruction or question for this specific run.
For video, max_frames, frame_stride, and frame_strategy (evenly_spaced/first/middle/last/every_nth) control which frames the model actually sees - you don't need to feed it every frame of a long clip, and doing so just burns context and VRAM for no real gain in most captioning/analysis tasks. resize_max_px and resize_algorithm downscale frames before they hit the model, which matters a lot for VRAM on longer sequences.
The inputs and outputs that matter
promptandsystem_prompt- your instruction and the model's framing; both multiline text you'll actually edit per run.max_new_tokens(default 256) - cap on response length; bump it up for detailed captions, keep it low for tags or short answers.temperature(default 0.2) andtop_p(default 0.9) - low temperature keeps captioning consistent and literal; push it up if you want more varied, creative phrasing.- Optional
imagesandtext_input- at least one of these needs to be connected for the node to have anything to analyze. memory_cleanup(off/before_run/after_run/before_and_after) - free VRAM around the run if you're chaining this into a heavier sampling step afterward.
Outputs: response (the actual answer) and info (diagnostic/run metadata - useful when something looks wrong and you need to know what actually got sent to the model).
How to install it
ComfyUI Manager - search DaSiWa-Nodes, install, restart. Manual: clone into custom_nodes, pip install -r requirements.txt, restart. You'll also need an actual model in ComfyUI/models/llm - see the companion DaSiWa LLM Model Selector page for how models get there. This node does nothing without one wired into llm_config.
Common issues & troubleshooting
Out of memory on a big VLM. Drop max_frames, lower resize_max_px, or set memory_cleanup to after_run so the model doesn't sit resident through the rest of your workflow. Vision-language models are considerably heavier than text-only ones for the same parameter count - budget accordingly.
Response is generic or ignores your prompt. Check system_prompt_preset isn't fighting your prompt - a captioning preset's system instruction can override or dilute a custom question. Switch to custom and write both fields yourself if you need precise control.
Slow on repeated runs. That's use_kv_cache and cache_mode (on the Model Selector) working against each other, or the model reloading every run because cache mode is set to unload. If you're iterating fast, keep the model cached rather than eating a load penalty every queue.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| llm_config | DASIWA_LLM_CONFIG | — | |
| system_prompt_preset | COMBO | custom | 21 options: custom, enhance_video_ltx23, enhance_video_wan22, caption_image_simple_mixed, caption_image_simple_tag, caption_image_simple_natural, +15 |
| system_prompt | STRING | You are a concise, helpful visual and text analysis assistant. | — |
| prompt | STRING | Follow the selected system instruction for the connected text, image, or video input. | — |
| max_new_tokens | INT | 2561–8192 | — |
| max_input_tokens | INT | 00–131072 | — |
| temperature | FLOAT | 0.200–2 | — |
| top_p | FLOAT | 0.900.01–1 | — |
| repetition_penalty | FLOAT | 1.000.1–3 | — |
| use_kv_cache | BOOLEAN | true | — |
| seed | INT | -1-1–18446744073709550000 | — |
| max_frames | INT | 80–256 | — |
| frame_stride | INT | 11–4096 | — |
| frame_strategy | COMBO | evenly_spaced | 5 options: evenly_spaced, first, middle, last, every_nth |
| resize_max_px | INT | 7680–4096 | — |
| resize_algorithm | COMBO | lanczos | 6 options: lanczos, bicubic, bilinear, hamming, box, nearest |
| memory_cleanup | COMBO | off | 4 options: off, before_run, after_run, before_and_after |
| imagesopt | IMAGE | — | |
| text_inputopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| response | STRING | — |
| info | STRING | — |