Nodes/ComfyUI-WeeLLM/WeeLLM Loader
ComfyUI Node

WeeLLM Loader

A 12B FLUX pipeline on a 4 GB card, no quantization

By Jit-Roy·Created 15 days ago·Updated 15 days ago· 1
WeeLLM Loader
    • WEE_PIPELINE
    model_pathblack-forest-labs/FLUX.1-schnell
    tasktext-to-image
    dtypebfloat16

    The name says "LLM," which is a lie in the best way. WeeLLM isn't a language model and doesn't call any API or need a key. It's a loading technique - layer-streaming inference for diffusion models - and this Loader node is how you ask ComfyUI to use it. The pitch, straight from the author's repo: run FLUX.1, SD3, even MiniMax-H3 video on GPUs with under 4 GB of VRAM, no quantization, full bfloat16 weights.

    That cuts against everything the community has learned to reach for. The standard answer to "FLUX won't fit my card" has been fp8, then GGUF Q4-Q8 - you shrink the weights and eat a little quality. WeeLLM refuses the trade: instead of compressing the model, it schedules it.

    How it works

    WeeLLM's parent library (Jit-Roy/weellm) is a diffusers-style engine. Instead of loading all 12B parameters of FLUX onto the GPU at once, it pins as many transformer blocks as your VRAM can physically hold and streams the rest in from system RAM layer-by-layer while inference runs, swapping each block back out when it's done. Your GPU never sees the whole model. That's why the benchmark table shows FLUX.1-schnell at 1.64 GB peak VRAM on an RTX 3050 - no quantization anywhere.

    The honest trade-off is time. That same 3050 takes ~159 seconds for a 1024×1024 schnell image. Layer streaming is a RAM-bus-bandwidth game, and system RAM is roughly 10x slower to feed a GPU than VRAM is. WeeLLM is for "my 4-6 GB card genuinely can't do this any other way," not for people who own a 3090 and want to speed FLUX up. If you have the VRAM for GGUF Q8, GGUF Q8 is still the right call.

    This Loader node itself does no math. It picks the right pipeline class from the weellm library based on your task, loads it with from_pretrained, and caches it for the rest of the workflow - so one Loader can feed many generation nodes without reloading.

    The inputs that matter

    Only three, and only two you'll usually touch:

    • model_path - a Hugging Face repo ID (the default is black-forest-labs/FLUX.1-schnell) or a local directory holding the model in diffusers format. Note that last bit: this is not a path into ComfyUI/models/diffusion_models. WeeLLM wants the full repo with config.json and companion files, because it has to know how to split and stream every block. Pointing it at a lone .safetensors file will fail.
    • task - text-to-image, image-to-image, or video. This picks which pipeline class loads, and it matters: if you load text-to-image and then wire an image into the Generate node, that pipeline won't know what to do with it. Set the task to match how you'll actually generate.
    • dtype - bfloat16 (default), float16, or float32. bf16 is what the benchmarks use and what you should keep for Ampere (RTX 30-series) and newer. On pre-Ampere cards bf16 can fall back to slow emulated paths, so try float16 there.

    Output is a single WEE_PIPELINE socket - it only plugs into the WeeLLM Generate or Video Generate nodes from the same pack.

    Installing it

    Easiest via ComfyUI Manager: search ComfyUI-WeeLLM and install, then restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Jit-Roy/ComfyUI-WeeLLM.git
    cd ComfyUI-WeeLLM
    pip install -r requirements.txt
    

    That last line isn't optional. Unlike most node packs, this one depends on an external library (weellm, pip-installed straight from GitHub) plus a diffusers build pinned to a specific git commit. That pin is the fragile part - if another custom node pulls a different diffusers, pip can fight over the version, so if the Loader throws import errors after installing, that's the first thing to suspect. You'll also want plenty of free disk and system RAM; the first run downloads the whole model into your Hugging Face cache (~24 GB for FLUX.1-schnell), and layer streaming leans on RAM as much as VRAM.

    Wire WEE_PIPELINE into WeeLLM Generate for images, or set task to video and use WeeLLM Video Generate instead.

    CategoryWeeLLM

    Inputs (3)

    NameTypeDefaultDescription
    model_pathSTRINGblack-forest-labs/FLUX.1-schnell
    taskCOMBOtext-to-image3 options: text-to-image, image-to-image, video
    dtypeCOMBObfloat163 options: bfloat16, float16, float32

    Outputs (1)

    NameTypeDescription
    WEE_PIPELINEWEE_PIPELINE