HiDream-I1 Complete Introduction and Deployment Tutorial: Running a 17B Text-to-Image Model on 16GB VRAM

A new domestic text-to-image star with 17B parameters, runs smoothly on 16GB VRAM

🎯 Project Overview

HiDream-I1 is a 17B parameter text-to-image foundational model open-sourced by Zhixiang Future in April 2025. It excels in multiple benchmarks, surpassing FLUX and becoming a new benchmark in open-source image generation.

📐 Parameter Scale
17B Parameters
🏗️ Architecture
DiT + MoE
📜 License
MIT (Commercial Use)
🖼️ Resolution
Up to 2K

✨ Core Architecture Highlights

🔄 Dual-Stream MMDiT Module

Efficiently processes multimodal information for deep semantic alignment between text and images

🎯 Single-Stream DiT Module

Optimizes global consistency, ensuring details and overall harmony in generated images

⚡ Sparse Diffusion Transformer

Significantly reduces VRAM requirements, allowing 17B model to run on 16GB graphics cards

🧠 MoE (Mixture of Experts) System

Enhances model expressiveness for higher quality image generation

📊 Model Version Comparison

🔹 Official Versions

Version Inference Steps Quality Speed Use Case
HiDream-I1-Full 50 Steps ⭐⭐⭐⭐⭐ Slower Pursuing Best Quality
HiDream-I1-Dev 28 Steps ⭐⭐⭐⭐ Moderate Balancing Quality and Speed
HiDream-I1-Fast 16 Steps ⭐⭐⭐ Fastest Quick Preview, Batch Generation

🔹 Quantized Versions (Recommended for Low VRAM)

Quantization Format VRAM Requirement Quality Loss Recommended GPU
FP16 Original ~20GB None RTX 3090/4090 (24GB)
FP8 Version ✅ ~16GB Minimal RTX 4060Ti 16GB
GGUF Q8 ~14GB Very Small 16GB GPU
GGUF Q6 ~12GB Small 12GB GPU
NF4 Quantized <16GB Acceptable 8-12GB GPU

💡 Recommended Solution for 16GB VRAM

  1. First Choice: FP8 Version — Best quality, VRAM just enough
  2. Alternative: GGUF Q8 — Leaves more VRAM headroom
  3. Alternative: GGUF Q6 — Allows running other programs simultaneously

🚀 ComfyUI Deployment Tutorial

Step 1: Install ComfyUI

# Clone ComfyUI
git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI

Create virtual environment

python -m venv venv source venv/bin/activate # Linux/Mac

or venv\Scripts\activate # Windows

Install dependencies

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 pip install -r requirements.txt

Step 2: Download Model Files (FP8 Version)

# Enter model directory
cd ComfyUI/models/diffusion_models/

Download FP8 Dev version (recommended)

wget https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI_repackaged/resolve/main/hidream_i1_dev_fp8.safetensors

Or GGUF quantized version (requires ComfyUI-GGUF plugin)

wget https://huggingface.co/city96/HiDream-I1-Dev-gguf/resolve/main/hidream-i1-dev-Q8_0.gguf

Step 4: Launch and Use

# Launch ComfyUI
python main.py --listen 0.0.0.0 --port 8188

Access via browser at http://localhost:8188

Drag in workflow JSON or image to start generating

🐍 Diffusers Deployment (Alternative)

# Install dependencies
pip install torch diffusers transformers accelerate sentencepiece
pip install git+https://github.com/huggingface/diffusers

Python inference code

import torch from diffusers import HiDreamImagePipeline

pipe = HiDreamImagePipeline.from_pretrained( "HiDream-ai/HiDream-I1-Dev", torch_dtype=torch.float16, variant="fp8" ) pipe.to("cuda")

prompt = "A majestic lion in a mystical forest, ultra detailed, 8k" image = pipe(prompt, guidance_scale=5.0, num_inference_steps=28).images[0] image.save("output.png")

📈 Performance Reference (RTX 4060Ti 16GB)

Configuration Generation Speed Resolution Quality
FP8 Dev ~30 sec/image 1024×1024 ⭐⭐⭐⭐⭐
GGUF Q8 ~25 sec/image 1024×1024 ⭐⭐⭐⭐
GGUF Q6 ~20 sec/image 1024×1024 ⭐⭐⭐

🔗 Resource Links

✨ Summary

RTX 4060Ti 16GB can smoothly run HiDream-I1!
Recommended to use FP8 Dev Version + ComfyUI
For the best image quality and generation experience 🎨

评论

暂无评论。

登录后可发表评论。