To install a local AI image model with Diffusers, you need three things: a Python environment with PyTorch, the Diffusers library, and enough GPU memory for the model you choose. The Hugging Face Diffusers library provides a DiffusionPipeline API that loads pretrained diffusion models and runs inference in a few lines of code, with optimizations like offloading and quantization for memory-constrained devices (Diffusers documentation). This guide compares the main open local routes described in the fetched sources and walks through a concrete install.
Which local AI image model should you install?
Not every model you see in a benchmark is locally deployable. According to the Nano Banana quickstart guide, the key distinction is whether a route is closed cloud-only or open and locally deployable. As of the April 2026 snapshot on that page:
- HunyuanImage 3.0 — an 80B open-weight MoE with editing support and Chain-of-Thought reasoning. It can run locally, but it is heavy on VRAM.
- Qwen-Image-Edit-2511 — a 20B BF16 image-editing model with an Apache-2.0 license and official Diffusers support. The official model card does not state one universal minimum VRAM figure.
- HiDream-O1-Image — an 8B pixel-level unified Transformer (no VAE) under the MIT license, with native 2048px generation. It can run locally.
- Z-Image / Turbo — a fast local generation route with an official release.
- GLM-Image — a 9B hybrid autoregressive model for dense information generation. The official offload reference is about 23GB GPU memory with CPU offload, at slower speed.
By contrast, Qwen-Image 3.0 is hosted only: the quickstart page states that official weights and local deployment have not been released. FLUX 3 is listed as early access with image access coming soon and no public weights or local deployment yet. Nano Banana 2, ChatGPT Image 2, and Seedream 4.5 are closed cloud models that cannot run locally. If you want a hosted route instead, the quickstart guide covers cloud API options.
AI image model VRAM requirements: what to expect
VRAM is the deciding factor for most local installs. The quickstart page gives one concrete figure: GLM-Image needs about 23GB GPU memory with CPU offload, and runs slower in that mode. For HunyuanImage 3.0, the page describes it as an 80B MoE that is heavy on VRAM but does not publish a single minimum number. For Qwen-Image-Edit-2511, the official model card does not state one universal minimum VRAM figure. Treat any specific number you see elsewhere as unverified unless it comes from the model card.
Diffusers itself provides the tools to fit larger models into smaller memory: offloading and quantization are built in, and torch.compile can boost inference speed when memory is not the bottleneck (Diffusers documentation). For a broader discussion of how VRAM maps to model size, see the hardware requirements guide.
Step-by-step: install Diffusers and run a model
The Diffusers documentation recommends starting with the Hugging Face Diffusion Models Course if you are new to diffusion theory. For installation, the library is distributed on PyPI and the docs list an Installation page as the first step. The exact command is not reproduced in the fetched source text, so follow the official Diffusers installation page for the current command.
Once Diffusers is installed, the general workflow is:
- Install PyTorch with CUDA support for your GPU. The HunyuanImage quickstart on the Nano Banana page shows a CUDA 12.8 example:
pip install torch==2.8.0 torchvision==0.23.0 --index-url https://download.pytorch.org/whl/cu128. - Install Diffusers from the official installation instructions.
- Load a pipeline with
DiffusionPipeline.from_pretrained(...). The Diffusers docs describe theDiffusionPipelineas the core API for inference, mixing and matching components, and loading adapters like LoRA. - Apply memory optimizations if needed — offloading and quantization are documented in the library.
- Generate by calling the pipeline with a prompt and saving the output image.
For HunyuanImage 3.0 specifically, the Nano Banana quickstart shows a Transformers-based path rather than a Diffusers pipeline. The example loads the model with AutoModelForCausalLM.from_pretrained and calls model.generate_image(...):
from transformers import AutoModelForCausalLM
model_id = "./HunyuanImage-3-Instruct"
kwargs = dict(
attn_implementation="sdpa",
trust_remote_code=True,
torch_dtype="auto",
device_map="auto",
moe_impl="eager", # Use "flashinfer" if installed
moe_drop_tokens=True,
)
model = AutoModelForCausalLM.from_pretrained(model_id, **kwargs)
model.load_tokenizer(model_id)
prompt = "A futuristic city at sunset with flying vehicles"
cot_text, samples = model.generate_image(
prompt=prompt,
seed=42,
image_size="1024x1024",
use_system_prompt="en_unified",
bot_task="think_recaption",
diff_infer_steps=50,
verbose=2
)
samples[0].save("output.png")
That snippet is from the Nano Banana quickstart page and is the only runnable HunyuanImage example in the fetched evidence. If you want a Diffusers-native pipeline, Qwen-Image-Edit-2511 is the model the quickstart page explicitly says has official Diffusers support. The exact pipeline class name is not in the fetched source, so check the model card on Hugging Face before writing code.
HunyuanImage local vs Qwen Image local vs FLUX local installation
Here is how the three routes compare based on the fetched evidence:
- HunyuanImage 3.0 — 80B MoE, open weights, editing and reasoning support, heavy VRAM. The quickstart page lists three variants: HunyuanImage-3.0 (text-to-image, 50 steps), HunyuanImage-3.0-Instruct (editing + reasoning, 50 steps), and HunyuanImage-3.0-Instruct-Distil (fast inference, 8 steps). License is the Tencent Hunyuan Community License; review the repository's current terms before commercial deployment.
- Qwen Image local — Qwen-Image-Edit-2511 is a 20B BF16 editing model with Apache-2.0 and official Diffusers support. Qwen-Image 3.0 is hosted only, so it is not a local option. No universal minimum VRAM is stated on the model card.
- FLUX local installation — FLUX 3 is early access with no public weights or local deployment yet. The quickstart page mentions a FLUX 3 Dev roadmap but does not confirm availability. Do not plan a FLUX 3 local install until weights are released.
If you want the smallest local footprint among the open models with stated sizes, HiDream-O1-Image at 8B is the lightest option, though it is a pixel-level Transformer without a VAE. If you want the fastest local generation, Z-Image Turbo is described as the efficient local route, though its parameter count is not stated in the fetched evidence.
Practical installation checklist
- Confirm your GPU has enough VRAM for the model class you picked. GLM-Image needs about 23GB with CPU offload; HunyuanImage 3.0 is heavier but no single figure is published.
- Install PyTorch with the CUDA build matching your driver. The quickstart example uses CUDA 12.8.
- Install Diffusers from the official installation page.
- Download the model weights from Hugging Face. For HunyuanImage, the example uses a local path
./HunyuanImage-3-Instruct. - Set
device_map="auto"and considermoe_impl="eager"if flashinfer is not installed. - Run a small test prompt at 1024x1024 before scaling up.
- If you run out of memory, enable offloading or quantization in Diffusers.
When local is the wrong choice
Local installs are not always the best route. If you do not own a GPU, the quickstart page recommends cloud API routes on CPU. Closed models like Nano Banana 2, ChatGPT Image 2, and Seedream 4.5 cannot run locally at all. For a side-by-side comparison of cloud versus local tradeoffs, see the benchmarks page. And remember: installing a client or API wrapper does not make a hosted model local or offline — only open-weight models with released weights can run on your own hardware.
FAQ
Can I run Qwen Image locally?
Qwen-Image-Edit-2511 can run locally and has official Diffusers support. Qwen-Image 3.0 is hosted only, with no released weights for local deployment.
How much VRAM does HunyuanImage 3.0 need?
The fetched sources do not state a single minimum VRAM figure for HunyuanImage 3.0. It is described as an 80B MoE that is heavy on VRAM. Check the model card for current requirements.
Is FLUX available for local installation?
FLUX 3 is listed as early access with no public weights or local deployment yet. A FLUX 3 Dev roadmap is mentioned, but availability is not confirmed in the fetched evidence.
Do I need Diffusers for every local model?
No. HunyuanImage 3.0's quickstart example uses Transformers, not Diffusers. Diffusers is the recommended route for models with official pipeline support, such as Qwen-Image-Edit-2511.