ComfyUI Node

Load Pixtral Model

The Pixtral-only loader, for when you already know what you're running

By SeanScripts·Created 2 years ago·Updated 2 years ago· 79
Load Pixtral Model
    • VISION_MODEL
    model_name

    If Load Vision Model is the pack's "just figure it out for me" button, this is the "I know exactly what I want" button. PixtralModelLoader does one thing: it shows you every model in ComfyUI/models/LLM whose config.json declares the LlavaForConditionalGeneration architecture - which is what Pixtral's checkpoint uses - and loads it into a VISION_MODEL object.

    One input (model_name, a filtered dropdown), one output (VISION_MODEL). That's the whole node.

    Why use the strict loader instead of the auto one?

    Two real reasons. First, the filter is the safety net: the auto loader lists every model with a config.json, including plain text LLMs that will hard-fail in the generation nodes. This loader can only show you things that will actually run with Generate Text with Pixtral, so an empty dropdown is a useful error instead of a confusing one. Second, there's no trust_remote_code toggle here - Pixtral doesn't need it, and that's one less decision to make and one less surprise to hit.

    Under the hood it does the same lazy-loading trick as the rest of the pack: the processor/tokenizer loads now, and the multi-gigabyte weights load only when the generate node executes. That keeps your graph snappy to wire up.

    Getting the model in place

    The loader is only as useful as the folder structure feeding it. Each model gets its own subfolder with the standard HuggingFace layout:

    ComfyUI/models/LLM/pixtral-12b-nf4/
    ├── config.json
    ├── model.safetensors
    ├── tokenizer.json
    ├── tokenizer_config.json
    └── ...
    

    You want the architecture name in config.json to read LlavaForConditionalGeneration for this loader to show it. SeanScripts ships a 4-bit quantized build - SeanScripts/pixtral-12b-nf4 - which is the realistic option for most GPUs. The full 12B model in fp16 is a lot of VRAM for a captioning sidecar.

    Install

    ComfyUI Manager search: ComfyUI-PixtralLlamaVision, or clone it manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SeanScripts/ComfyUI-PixtralLlamaMolmoVision
    

    Requirements are transformers >= 4.45.0 (Pixtral needs a recent transformers), plus accelerate, bitsandbytes, and torchvision. On the Windows portable build:

    python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-PixtralLlamaMolmoVision\requirements.txt
    

    Then restart ComfyUI.

    Troubleshooting

    • Empty model list - either the model isn't in models/LLM, or its architecture isn't LlavaForConditionalGeneration. Check config.json.
    • OOM at generation - normal for 12B. Grab the nf4 quant and make sure bitsandbytes is installed.
    • Loading errors - an outdated transformers version is the usual culprit; this pack needs 4.45+.

    Load it, feed it to Generate Text with Pixtral, and you're done. If your Pixtral never shows up in the dropdown, start by checking the architectures line in its config - that's the filter everything hangs on.

    CategoryPixtralLlamaVision/Pixtral

    Inputs (1)

    NameTypeDefaultDescription
    model_nameCOMBO0 options:

    Outputs (1)

    NameTypeDescription
    VISION_MODELVISION_MODEL