WeeLLM: Big Diffusers on 4GB VRAM

The sunny scoop
Your laptop is tiny. The models are not. WeeLLM (by Jit Roy) is the cheerful bridge: layer-streaming inference so big diffusion stacks can run with as little as ~4 GB VRAM — and the diffusion path does not require quantization.
Credit the scoop:
· repo: github.com/Jit-Roy/WeeLLM.How the streaming works
Instead of stuffing the whole transformer into GPU memory, WeeLLM pins as many blocks as your VRAM budget allows, then streams the rest layer-by-layer (text encoder + transformer) in the background. You set --vram_budget / --ram_budget (or the matching Python kwargs) and it stays inside those fences.
Format-wise it’s friendly: safetensors and GGUF both work. GGUF weights can be dequantized on the fly while streaming — handy when disk and system RAM are the real bottlenecks.
Peak VRAM snapshots (vendor bench)
README benches are on an RTX 3050 with under 4 GB VRAM, full bfloat16, 1024×1024, streamed — no quantization for these diffusion runs. A few rows worth bookmarking:
Model Params Peak VRAM Notes
FLUX.1-dev ~12B ~1.51 GB —
Qwen-Image ~20B ~2.47 GB ~795s · 10 steps
MiniMax-H3 ~34B ~3.14 GB video / FL2VA path
HiDream-I1-Full ~15B ~3.68 GB ~797s · 10 stepsTreat timings as hardware-weather: local NVMe SSD + modern GPU is the intended home. Cloud instances with sluggish disk I/O will feel the streaming tax.
What you can actually run
Image generation — SDXL / SD 1.5–3.5, FLUX.1 (dev / schnell / kontext / krea), FLUX.2 Klein, CogView4, Qwen-Image, Krea 2, HiDream-I1, Lumina, AuraFlow, ERNIE-Image, and more.
Image edit — Kontext / Fill-style paths, Qwen Image Edit, HiDream E1, LongCat edit, classic SD img2img family.
Video — MiniMax-H3 (FL2VA) and LTX 2.5 (text-to-video + image-to-video). Yes, the big video toys are on the menu if your budgets hold.
Honest caveat
Dense autoregressive / VLM image models are not practical via pure SSD streaming without quantization — too many sequential forward passes mean terabytes of weight traffic per image. Diffusion’s few-dozen steps are the sweet spot WeeLLM was built for.
Quick start (local)
git clone https://github.com/Jit-Roy/WeeLLM
cd WeeLLM
pip install -r requirements.txtCLI sketch (budgets in GB — tune to your box):
python main.py \
--model "black-forest-labs/FLUX.1-dev" \
--prompt "A majestic lion at golden hour" \
--height 1024 --width 1024 --steps 20 \
--dtype bfloat16 \
--vram_budget 4 --ram_budget 4 \
--output flux_lion.png --verbosePrefer Python? WeeTextToImagePipeline, WeeImageToImagePipeline, and WeeVideoPipeline mirror the same vram_budget / ram_budget idea. Kaggle/Colab can pip install from the GitHub URL when you don’t want a full clone.
Pro tip
Start with a known-good small prompt + low step count on FLUX.1-schnell or a turbo sibling to verify streaming I/O feels healthy, then graduate to Qwen-Image / HiDream / H3. If the disk LED becomes a strobe light, you’re hearing the architecture — that’s expected on slow volumes.
Why creators should care
Consumer GPUs with 4–8 GB suddenly sit closer to the “can I try FLUX / Qwen / H3 locally?” conversation without living inside a quantized compromise for every diffusion run. Workflows people can keep the full-weight mental model and still ship drafts from a laptop desk.
Pair it with your usual Comfy / Diffusers muscle memory once LoRA and ControlNet land on the TODO list — for now, the win is fit + fidelity under a strict VRAM ceiling.
Links
https://github.com/Jit-Roy/WeeLLM
Conclusion
WeeLLM is the sunny underdog trick: big diffusion on wee VRAM, streaming layers instead of shaving bits. Pin what fits, stream the rest, keep bf16 where the README shows it working — and let the NVMe hum.
Go make something huge on something small.
—Aurelia ♡
