Nodes/ComfyUI_LayerStyle_Advance/LayerUtility: SmolVLM(Advance)
ComfyUI Node Runs on cloud

LayerUtility: SmolVLM(Advance)

SmolVLM — lightweight local image captioning, batch-friendly

By chflame163·Created 2 years ago·Updated 4 months ago· 696
LayerUtility: SmolVLM(Advance)
  • image
  • smolVLM_model
  • text
max_new_tokens512
user_promptdescribe this image

The vision sibling of this pack's SmolLM2 node, and the same design philosophy applies: HuggingFace built SmolVLM to be genuinely small, aimed at edge and on-device use rather than competing with a heavyweight vision-language model. It runs entirely local, no API key, and is noticeably lighter on VRAM than this pack's other captioning options - JoyCaption2/JoyCaption2Split or PhiPrompt's vision mode - at the honest cost of shallower, more generic descriptions.

How it works

Feed it an image, get a text description back. The README specifically notes it "supports batch images" - matching the output type in the node's own schema, which returns a list of strings rather than a single one, so a batch of N images in produces N captions out, one per image, in a single node execution rather than one call per image.

The inputs and outputs that matter

  • image - a single image or a batch.
  • smolVLM_model - the loaded model handle, fed in from the pack's separate Load SmolVLM Model node (which handles picking dtype and device). This node only does inference.
  • user_prompt (default "describe this image") - your instruction. Same as any vision-chat model, be specific if you want more than a generic description.
  • max_new_tokens (default 512) - caption length ceiling.

Output is text - a list, one entry per input image.

How to install it

Recommended: ComfyUI Manager, search "ComfyUI Layer Style Advance". Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_LayerStyle_Advance.git

Then install_requirements.bat / install_requirements_aki.bat, or pip install -r requirements.txt plus repair_dependency.bat. Restart.

Model files: download the SmolVLM-Instruct folder from Hugging Face (or the pack's Baidu mirror) into ComfyUI/models/smol.

Common issues & troubleshooting

No VRAM to spare for a captioner but need one anyway. This is exactly the case SmolVLM is built for - reach for it before PhiPrompt's vision mode (16GB VRAM minimum per the README) or the JoyCaption line if your GPU is tight. You'll trade caption depth and nuance for the lower footprint.

Captions come back generic or miss specifics you care about. Expected at this model size - it's not going to match JoyCaption's training-prompt formats or GLM-4V's detail level. Push on user_prompt first (ask for something more specific than the default "describe this image"), and if that's still not enough, this is the point where switching to a bigger model in the pack is the right call rather than fighting the small one further.

Node errors with no model connected. Check the Load SmolVLM Model node upstream is actually wired in and the SmolVLM-Instruct files are in ComfyUI/models/smol - this node has no fallback if either is missing.

General import/dependency failures on first load. Standard for this pack's heavier-dependency nodes - run repair_dependency.bat (or the Aki equivalent) if transformers is out of sync, the documented first fix for most import errors here.

Category😺dzNodes/LayerUtility

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
smolVLM_modelSmolVLM_MODEL
max_new_tokensINT5121–4096
user_promptSTRINGdescribe this image

Outputs (1)

NameTypeDescription
textSTRING