LayerUtility: Llama Vision(Advance)
Llama Vision — ComfyUI Node Guide
- image
- text
This node runs Meta's Llama 3.2 Vision model locally to look at an image and write something about it - a caption, a description, an answer to a specific question, whatever you prompt it for. It's a local, no-API-key alternative to the Gemini/GLM4V/DeepSeek nodes that live elsewhere in this pack, which matters if you don't want to hand your images to a cloud API or you're doing this offline.
Under the hood it's a straightforward vision-language model call: the image and your prompts go in, the model reasons over both and streams text out. Part of the implementation is lifted from ComfyUI-PixtralLlamaMolmoVision, credited in the README, so if that name rings a bell, it's the same lineage.
The inputs worth knowing about: image is your source picture, and model currently only offers one option - Llama-3.2-11B-Vision-Instruct-nf4, an 11-billion-parameter model quantized to 4-bit. That quantization matters practically: it's what makes an 11B vision model runnable on consumer GPUs at all. Then you get a system_prompt (defaults to "You are a helpful AI assistant") and user_prompt (defaults to "Describe this image in natural language") - this is where you actually steer what comes out, whether that's a plain caption, a Danbooru-style tag dump, or an answer to something specific about the image. Generation controls follow standard LLM sampling knobs: max_new_tokens (default 256), temperature (0.3 default - fairly conservative, good for consistent captions), top_p, top_k, and do_sample. There's also stop_strings to cut generation short, seed for reproducibility, include_prompt_in_output if you want your prompt echoed back in the result, and cache_model so repeated runs in the same session don't reload the checkpoint every time. The single output is text, ready to feed straight into a CLIP Text Encode or a prompt-editing node downstream.
Installing it: search "ComfyUI Layer Style Advance" in ComfyUI Manager, or git clone https://github.com/chflame163/ComfyUI_LayerStyle_Advance into custom_nodes and run install_requirements.bat / pip install -r requirements.txt followed by repair_dependency.bat. One extra requirement specific to this node: the README calls out that transformers needs to be 4.45.0 or higher for Llama Vision to work - check your version before you assume the node is broken.
The model itself is a real download - this is an 11B vision-language model, even quantized. Grab it from huggingface.co/SeanScripts/Llama-3.2-11B-Vision-Instruct-nf4 (or BaiduNetdisk for the CN mirror) and copy it into ComfyUI/models/LLM. Budget real disk space and VRAM for this one; it's not a lightweight captioner like SmolVLM elsewhere in this pack.
Where this trips people up: an old transformers install is the most common failure, since a version below 4.45.0 will throw import errors or just silently misbehave rather than giving you a clean crash - if generation looks wrong or the node errors on load, check that version first. Beyond that, the general pack-wide gotchas apply: this is a big dependency footprint (this repo exists specifically because it splits off the nodes from the original LayerStyle pack that need heavier dependencies), so if the node fails to import at all, running repair_dependency.bat and reinstalling clean usually clears it up before you go hunting for anything more exotic.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| model | COMBO | 1 options: Llama-3.2-11B-Vision-Instruct-nf4 | |
| system_prompt | STRING | You are a helpful AI assistant. | — |
| user_prompt | STRING | Describe this image in natural language. | — |
| max_new_tokens | INT | 2561–4096 | — |
| do_sample | BOOLEAN | true | — |
| temperature | FLOAT | 0.3 | — |
| top_p | FLOAT | 0.90–1 | — |
| top_k | INT | 40 | — |
| stop_strings | STRING | <|eot_id|> | — |
| seed | INT | 00–4294967295 | — |
| include_prompt_in_output | BOOLEAN | false | — |
| cache_model | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |