Nodes/VRGameDevGirl Video Enhancement Nodes/๐Ÿง  VRGDG General VLM ๐Ÿง 
ComfyUI Node

๐Ÿง  VRGDG General VLM ๐Ÿง 

A Vision-Language Model in Your Graph, With 24 Image Slots

By vrgamegirl19ยทCreated about a year agoยทUpdated about 7 hours agoยท 718
๐Ÿง  VRGDG General VLM ๐Ÿง 
  • 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
โ—„model_presetQwen/Qwen3.5-4Bโ–บ
โ—„custom_model_idโ–บ
โ—„task_presettext_to_imageโ–บ
โ—„custom_instructionsโ–บ
โ—„user_inputโ–บ
โ—„trigger_wordโ–บ
โ—„image_count0โ–บ
โ—„download_if_missingfalseโ–บ
โ—„deviceautoโ–บ
โ—„dtypeautoโ–บ
โ—„temperature0.60โ–บ
โ—„top_p0.95โ–บ
โ—„max_new_tokens800โ–บ
โ—„hf_tokenโ–บ
โ—„allow_custom_model_codefalseโ–บ

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_training is the one you want for dataset captioning, and it's the only one that uses trigger_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..image24 inputs 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-Instruct will 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 dtype to float16/bfloat16 rather than auto.
  • "Model not found" with download_if_missing off: turn it on, or place the weights in ComfyUI/models/LLM/Qwen yourself.
  • Output is weirdly off-task: you've mixed a task preset and instructions that contradict it. Pick custom and own the full instruction block, or strip user_input down.

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.

CategoryVRGDG/LLM

Inputs (39)

NameTypeDefaultDescription
model_presetCOMBOQwen/Qwen3.5-4BChoose a model preset. Use custom_model_id to override this.
custom_model_idSTRINGOptional override. Can be a Hugging Face repo id or a local model folder path.
task_presetCOMBOtext_to_imageSelect a task preset with built-in instructions.
custom_instructionsSTRINGUsed only when task_preset is custom. Enter your own full instruction block.
user_inputSTRINGYour task details and creative direction for the selected preset.
trigger_wordSTRINGOptional LoRA/training trigger token. Used only by Captioner preset.
image_countINT00โ€“24How many optional image inputs to show on the node.
download_if_missingBOOLEANfalseIf enabled, missing models can be downloaded to ComfyUI/models/LLM/Qwen.
deviceCOMBOautoInference device selection.
dtypeCOMBOautoInference precision. Auto is recommended.
temperatureFLOAT0.600โ€“2Higher = more creative variation, lower = more deterministic output.
top_pFLOAT0.950โ€“1Nucleus sampling cutoff.
max_new_tokensINT80032โ€“32000Maximum number of output tokens.
hf_tokenSTRINGOptional Hugging Face access token for gated/private repos.
allow_custom_model_codeBOOLEANfalseEnable only for trusted model repos that require custom code (for example Phi-3.5 Vision).
image1optIMAGEOptional reference image input.
image2optIMAGEOptional reference image input.
image3optIMAGEOptional reference image input.
image4optIMAGEOptional reference image input.
image5optIMAGEOptional reference image input.
image6optIMAGEOptional reference image input.
image7optIMAGEOptional reference image input.
image8optIMAGEOptional reference image input.
image9optIMAGEOptional reference image input.
image10optIMAGEOptional reference image input.
image11optIMAGEOptional reference image input.
image12optIMAGEOptional reference image input.
image13optIMAGEOptional reference image input.
image14optIMAGEOptional reference image input.
image15optIMAGEOptional reference image input.
image16optIMAGEOptional reference image input.
image17optIMAGEOptional reference image input.
image18optIMAGEOptional reference image input.
image19optIMAGEOptional reference image input.
image20optIMAGEOptional reference image input.
image21optIMAGEOptional reference image input.
image22optIMAGEOptional reference image input.
image23optIMAGEOptional reference image input.
image24optIMAGEOptional reference image input.

Outputs (3)

NameTypeDescription
textSTRINGโ€”
used_modelSTRINGโ€”
statusSTRINGโ€”