ComfyUI-FL-VLM
Fill Labs VLM nodes for ComfyUI, starting with Qwen3-VL image and image-batch inference.
FL VLM
Vision-language model nodes for ComfyUI powered by Qwen3-VL. Run image and image-batch inference with full Qwen prompting (system + user), optional 4-bit/8-bit quantization, attention backend selection, and a live progress UI. The pack is structured so additional VLM families can be added without changing the workflow shape.

Features
- Qwen3-VL Backend - 2B / 4B / 8B / 32B / 30B-A3B Instruct variants, plus any custom Hugging Face model ID
- Single Image or Batch - feed a single image or an entire ComfyUI image batch
- Two Batch Modes - one combined response for all images, or one response per image
- Resize Presets - 244p / 360p / 480p / 720p tuned for Qwen's
min_pixels/max_pixelsbudget, plus a manual mode - Quantization - 4-bit / 8-bit via
bitsandbytesfor fitting larger variants into smaller VRAM - Attention Backends -
sdpa,flash_attention_2, oreager - dtype Control -
auto/bfloat16/float16/float32(auto-detects bf16 support) - Live Progress - per-stage status, token-level streaming progress, and a metadata JSON output
- VLM Model Folder - registers
ComfyUI/models/VLMso HF downloads are reused across launches
Nodes
| Node | Description |
|------|-------------|
| FL VLM Model Loader | Downloads and loads a Qwen3-VL model. Selects quantization, dtype, attention backend, and device map. |
| FL VLM Image Inference | Runs a system + user prompt against one image or a ComfyUI image batch. Outputs response and a metadata_json string. |
Installation
ComfyUI Manager
Search for "FL VLM" and install.
Manual
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI-FL-VLM.git
cd ComfyUI-FL-VLM
pip install -r requirements.txt
Restart ComfyUI.
Quick Start
Describe a Single Image
- Add Load Image + FL VLM Model Loader + FL VLM Image Inference
- Loader: pick
Qwen3-VL-4B-Instruct, leave defaults - Inference: connect the image, leave the default prompt ("Describe the image in detail.")
- Queue prompt - model downloads to
ComfyUI/models/VLMon first run
Caption an Image Batch (one shared response)
- Connect an
IMAGEbatch to FL VLM Image Inference - Set
batch_modetoall_images_one_prompt - Use
image_start,image_stride,max_imagesto slice the batch - Queue prompt - Qwen sees all selected images at once
Caption an Image Batch (per-image responses)
- Same as above, set
batch_modetoeach_image_separately - The
responseoutput concatenates labeled responses ([image 0],[image 1], ...) metadata_jsoncontains a structured per-image array
Fit a Bigger Model in Less VRAM
- Loader: pick
Qwen3-VL-8B-Instruct(or larger) - Set
quantizationto4bit(or8bit) - Keep
dtypeatauto
Models
| Variant | HF ID | Approx. VRAM (bf16) |
|---------|-------|---------------------|
| Qwen3-VL-2B-Instruct | Qwen/Qwen3-VL-2B-Instruct | ~6 GB |
| Qwen3-VL-4B-Instruct | Qwen/Qwen3-VL-4B-Instruct | ~10 GB |
| Qwen3-VL-8B-Instruct | Qwen/Qwen3-VL-8B-Instruct | ~18 GB |
| Qwen3-VL-32B-Instruct | Qwen/Qwen3-VL-32B-Instruct | ~64 GB |
| Qwen3-VL-30B-A3B-Instruct | Qwen/Qwen3-VL-30B-A3B-Instruct | ~60 GB (MoE) |
Set custom_model_id on the loader to use any other Qwen3-VL checkpoint (e.g. fine-tunes from Hugging Face). Models auto-download to ComfyUI/models/VLM/ on first use.
Resize Presets
Image size strongly affects speed. The inference node resizes input via Qwen's internal min_pixels / max_pixels budget (each unit = 28 * 28 pixels).
| Preset | Approx. resolution (16:9) | Use when |
|--------|---------------------------|----------|
| 244p_fast | ~420x224 | Fast captions, lots of images |
| 360p_balanced | ~588x336 | Default - good speed/detail tradeoff |
| 480p_detail | ~840x448 | Need finer detail or small text |
| 720p_high | ~1176x672 | Maximum detail (slow) |
| manual_qwen_budget | uses min_pixels / max_pixels directly | You know what you're doing |
Batch Modes
| Mode | Behavior | |------|----------| | all_images_one_prompt | Sends every selected image to Qwen in a single call. One combined response. Use for "compare these N images" or "describe this sequence". | | each_image_separately | Runs the prompt independently per image and concatenates labeled responses. Use for per-image captions. |
image_start, image_stride, and max_images slice the input batch before inference.
Key Parameters
- quantization (
none) -4bit/8bitsave VRAM at a small quality/speed cost - dtype (
auto) - on high-VRAM NVIDIA GPUs,bfloat16is usually faster than any quantization - attention (
sdpa) -flash_attention_2is fastest where supported;eageris the safe fallback - device_map (
auto) - letsaccelerateshard large models across devices - resize_preset (
360p_balanced) - main speed knob - max_new_tokens (512) - upper bound on response length
- do_sample (false) - off for deterministic captioning; on with
temperature/top_p/top_kfor creative output - seed (-1) - set >= 0 for reproducible sampling
Requirements
- Python 3.10+
- NVIDIA GPU with 8GB+ VRAM (start with 2B/4B); 24GB+ for 8B in bf16
- For
flash_attention_2:flash-attninstalled and a supported GPU - For
4bit/8bit:bitsandbytesinstalled (already inrequirements.txt)
License
Apache-2.0 - Based on QwenLM/Qwen3-VL