Nodes/ComfyUI-Qwen2/Qwen2 Model Load / Download
ComfyUI Node

Qwen2 Model Load / Download

Drag a vision-language model onto your GPU without leaving the graph

By ARZUMATA·Created 2 years ago·Updated about a year ago· 1
Qwen2 Model Load / Download
    • qwen2_model
    modelQwen2-VL-2B-Instruct
    quantizationnone
    precisionfp16
    attentionsdpa

    The ComfyUI UI calls this node "Qwen2 Model Load / Download," and the second word is doing real work. Qwen2ModelLoader is the front half of the two-node Qwen2-VL pipeline in ComfyUI-ARZUMATA-Qwen2: it grabs Alibaba's open Qwen2-VL vision-language model - the 2B and 7B Instruct family - and loads it straight into your graph, ready to describe whatever image you hand it.

    What it's for

    You reach for this when you want a vision-language model captioning images inside ComfyUI, not bolted onto the side as a separate script. The README says the author built the pack because none of the existing ComfyUI Qwen2 implementations "worked the way I wanted" - this is a personal, does-the-job-right setup, not a big ecosystem pack. There are other ways to run Qwen2-VL in a graph (IuvenisSapiens' ComfyUI_Qwen2-VL-Instruct predates this one and circulates on r/comfyui), so treat this as one more option that happens to auto-download its weights for you.

    Where it slots into the wider picture: captioning is the boring-but-load-bearing step of LoRA training for the natural-language generation models. Qwen2-VL writes paragraphs, not comma tags - that's the right shape for captioning Flux/Qwen-style training sets, the same niche JoyCaption and Florence 2 live in. For tag-based anime bases you'd still reach for WD14 instead.

    How it works

    The loader does two jobs in one node. First, if the model isn't on disk it calls snapshot_download from huggingface_hub and pulls qwen/Qwen2-VL-... into ComfyUI/models/LLM/. Then it loads the weights with Qwen2VLForConditionalGeneration, moving them to ComfyUI's selected torch device, and emits a QWEN2MODEL object.

    The four dropdowns are worth understanding before you touch them, because two of them can bite:

    • model - six choices: the 2B and 7B Instruct models, each in its plain form plus GPTQ-Int4 and GPTQ-Int8. Default is the 2B, which is the right default.
    • quantization - none, 4bit, or 8bit, using bitsandbytes. Here's the trap: the code only applies this to the non-GPTQ models. The GPTQ variants are already quantized, and trying to re-quantize one with bitsandbytes throws an error, so the node silently skips it. Pick GPTQ or set 4bit/8bit, not both.
    • precision - fp16 or bf16.
    • attention - sdpa, flash_attention_2, or eager. Default is sdpa, and unless you've separately installed flash-attn, leave it there. Flash attention is not in the pack's requirements.txt, so choosing it without that package installed is a one-way ticket to an import error.

    The only output is qwen2_model, and it wires directly into the pack's "Qwen2 Run Inference" node. That's its one job.

    Installing it

    Via ComfyUI Manager, search the pack title ComfyUI-ARZUMATA-Qwen2, or clone it manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ARZUMATA/ComfyUI-ARZUMATA-Qwen2
    

    Restart ComfyUI. The requirements are heavier than they look for an image-captioning pack: transformers>=4.45.0, accelerate, qwen-vl-utils[decord], auto-gptq, and decord (a video-decoding library the pack barely uses but drags in anyway). Let the install finish before restarting, or the node will import-fail.

    Where people get burned

    The first run isn't a "run" - it's a download. The 2B is a few gigabytes; the 7B is around 15 GB in bf16, and it lands in models/LLM/, so give the console time and disk room. VRAM follows the same math: the 2B fits comfortably on a mid-range card, the 7B wants 14–16 GB or a GPTQ-Int4 variant. And remember this is a small personal repo - the README itself opens with "May contain bugs." That's honest, and worth treating as a feature of your expectations rather than a bug report. Test it on one image before you point a 2,000-image batch at it.

    CategoryQwen2

    Inputs (4)

    NameTypeDefaultDescription
    modelCOMBOQwen2-VL-2B-Instruct6 options: Qwen2-VL-2B-Instruct-GPTQ-Int4, Qwen2-VL-2B-Instruct-GPTQ-Int8, Qwen2-VL-2B-Instruct, Qwen2-VL-7B-Instruct-GPTQ-Int4, Qwen2-VL-7B-Instruct-GPTQ-Int8, Qwen2-VL-7B-Instruct
    quantizationCOMBOnone3 options: none, 4bit, 8bit
    precisionCOMBOfp162 options: fp16, bf16
    attentionCOMBOsdpa3 options: flash_attention_2, sdpa, eager

    Outputs (1)

    NameTypeDescription
    qwen2_modelQWEN2MODEL