๐ง VRGDG General VLM ๐ง
A Vision-Language Model in Your Graph, With 24 Image Slots
- image1
- image2
- image3
- image4
- image5
- image6
- image7
- image8
- image9
- image10
- image11
- image12
- image13
- image14
- image15
- image16
- image17
- image18
- image19
- image20
- image21
- image22
- image23
- image24
- text
- used_model
- status
Sometimes you want an LLM to look at your frames - caption a training set, describe a reference image for a prompt, or critique a generated still. VRGDG_GeneralVLM is the pack's wrapper for that: it runs a Hugging Face vision-language model locally inside ComfyUI, with task presets that prepackage the instructions for common jobs. It's not a chat companion; it's a tool you wire into a pipeline, and it can look at up to 24 images at once.
Under the hood it inherits from the pack's Qwen-based LLM base, so it's a transformers-powered AutoModelForVision2Seq-style load with presets for google/gemma-3-4b-it, google/gemma-3-12b-it, meta-llama/Llama-3.2-11B-Vision-Instruct, or a custom model id (a Hugging Face repo or a local folder). Task presets inject a built-in instruction block for text_to_image, text_to_video, image_to_video, image_edit, captioner_training, or custom (where custom_instructions takes over).
The inputs that matter
- model_preset - which VLM. Gemma 3 4B is the fast default; 12B is better and heavier; Llama 3.2 11B Vision is the other solid option.
- task_preset - the built-in instruction bundle.
captioner_trainingis the one you want for dataset captioning, and it's the only one that usestrigger_word(it prepends your LoRA trigger token). - user_input - your actual task and creative direction on top of the preset.
- image_count - how many of the up-to-24 optional
image1..image24inputs show on the node. Set it to what you need; unused ones just don't exist on the graph. - download_if_missing - lets the node fetch missing models into
ComfyUI/models/LLM/Qwen. Leave on for your first run unless you manage models yourself. - temperature / top_p / max_new_tokens - the usual sampling knobs. 0.6/0.95/800 are sane defaults.
- hf_token - needed only for gated repos like the gated Llama models;
meta-llama/Llama-3.2-11B-Vision-Instructwill want a Hugging Face token with access. - allow_custom_model_code - keep off unless a trusted custom repo (e.g. Phi-3.5 Vision) requires custom code.
Outputs: text, used_model (which model actually ran), and status.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
pip install -r requirements.txt # includes transformers, accelerate, huggingface_hub
Model weights download on first use per preset. A 4B model is a few GB; the 12B and 11B ones are chunkier, and VRAM is the binding constraint. The code already routes around known annoyances - it forces the SDPA attention implementation for Phi-3.5 Vision, for example, so that's one install fight you don't have to have.
Common issues
- Gated model access denied: set
hf_token- Llama 3.2 Vision is gated and needs a logged-in HF account. - OOM loading a 12B VLM: switch to the 4B preset, or
dtypetofloat16/bfloat16 rather than auto. - "Model not found" with
download_if_missingoff: turn it on, or place the weights inComfyUI/models/LLM/Qwenyourself. - Output is weirdly off-task: you've mixed a task preset and instructions that contradict it. Pick
customand own the full instruction block, or stripuser_inputdown.
Honest take: for one-off "what's in this image" questions you'd use a chat UI. This node earns its keep in automation - captioning a dataset, feeding a description into a prompt-creator stage, validating frames mid-pipeline. That's the use case, and it's a good one.
Inputs (39)
| Name | Type | Default | Description |
|---|---|---|---|
| model_preset | COMBO | Qwen/Qwen3.5-4B | Choose a model preset. Use custom_model_id to override this. |
| custom_model_id | STRING | Optional override. Can be a Hugging Face repo id or a local model folder path. | |
| task_preset | COMBO | text_to_image | Select a task preset with built-in instructions. |
| custom_instructions | STRING | Used only when task_preset is custom. Enter your own full instruction block. | |
| user_input | STRING | Your task details and creative direction for the selected preset. | |
| trigger_word | STRING | Optional LoRA/training trigger token. Used only by Captioner preset. | |
| image_count | INT | 00โ24 | How many optional image inputs to show on the node. |
| download_if_missing | BOOLEAN | false | If enabled, missing models can be downloaded to ComfyUI/models/LLM/Qwen. |
| device | COMBO | auto | Inference device selection. |
| dtype | COMBO | auto | Inference precision. Auto is recommended. |
| temperature | FLOAT | 0.600โ2 | Higher = more creative variation, lower = more deterministic output. |
| top_p | FLOAT | 0.950โ1 | Nucleus sampling cutoff. |
| max_new_tokens | INT | 80032โ32000 | Maximum number of output tokens. |
| hf_token | STRING | Optional Hugging Face access token for gated/private repos. | |
| allow_custom_model_code | BOOLEAN | false | Enable only for trusted model repos that require custom code (for example Phi-3.5 Vision). |
| image1opt | IMAGE | Optional reference image input. | |
| image2opt | IMAGE | Optional reference image input. | |
| image3opt | IMAGE | Optional reference image input. | |
| image4opt | IMAGE | Optional reference image input. | |
| image5opt | IMAGE | Optional reference image input. | |
| image6opt | IMAGE | Optional reference image input. | |
| image7opt | IMAGE | Optional reference image input. | |
| image8opt | IMAGE | Optional reference image input. | |
| image9opt | IMAGE | Optional reference image input. | |
| image10opt | IMAGE | Optional reference image input. | |
| image11opt | IMAGE | Optional reference image input. | |
| image12opt | IMAGE | Optional reference image input. | |
| image13opt | IMAGE | Optional reference image input. | |
| image14opt | IMAGE | Optional reference image input. | |
| image15opt | IMAGE | Optional reference image input. | |
| image16opt | IMAGE | Optional reference image input. | |
| image17opt | IMAGE | Optional reference image input. | |
| image18opt | IMAGE | Optional reference image input. | |
| image19opt | IMAGE | Optional reference image input. | |
| image20opt | IMAGE | Optional reference image input. | |
| image21opt | IMAGE | Optional reference image input. | |
| image22opt | IMAGE | Optional reference image input. | |
| image23opt | IMAGE | Optional reference image input. | |
| image24opt | IMAGE | Optional reference image input. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| text | STRING | โ |
| used_model | STRING | โ |
| status | STRING | โ |