Image-Text-to-Image
Diffusers
Safetensors
qwen3_vl
comfyui
text-to-image
image-editing
fp8
quantized
distilled
Instructions to use drbaph/HiDream-O1-Image-Dev-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use drbaph/HiDream-O1-Image-Dev-FP8 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("drbaph/HiDream-O1-Image-Dev-FP8", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
File size: 6,467 Bytes
0dc89ab 856f6a8 0dc89ab 11f517e 0dc89ab | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | ---
license: mit
pipeline_tag: image-text-to-image
library_name: diffusers
tags:
- comfyui
- text-to-image
- image-editing
- fp8
- quantized
- distilled
---
# HiDream-O1-Image-Dev β FP8 Mixed (ComfyUI)
This is the **FP8 mixed-precision** quantization of [HiDream-ai/HiDream-O1-Image-Dev](https://huggingface.co/HiDream-ai/HiDream-O1-Image-Dev) β the **distilled** variant of HiDream-O1-Image β for use with **ComfyUI**. This is the most accessible variant: only **~10 GB VRAM** and just **28 steps**, making it the fastest way to run HiDream O1 locally.

> **Custom ComfyUI Node:** [Saganaki22/HiDream_O1-ComfyUI](https://github.com/Saganaki22/HiDream_O1-ComfyUI)

---
## Dev vs Full β Key Differences
| | Full Model | Dev Model (this repo) |
| :--- | :---: | :---: |
| Inference Steps | 50 | **28** |
| Guidance Scale (CFG) | 5.0 | **0.0 (disabled)** |
| Shift | 3.0 | 1.0 |
| Scheduler | FlowUniPCMultistepScheduler | FlashFlowMatchEulerDiscreteScheduler |
| Speed | Slower, more detail | **~2Γ faster** |
The Dev model uses a custom Euler scheduler with built-in noise scaling tuned for fewer steps. CFG is disabled β negative prompts have no effect in Dev mode.
---
## VRAM Requirements
| Precision | Approximate VRAM |
| :--- | :---: |
| BF16 | 17 β 20 GB |
| FP16 | 17 β 20 GB |
| FP8 Mixed (this repo) | **~10 GB** |
This is the recommended variant for GPUs with less than 16 GB VRAM. Combined with the Dev model's 28-step schedule, it is the **lowest-cost way to run HiDream O1** β roughly 2Γ faster and half the VRAM of the full BF16 model.
> **What is FP8 Mixed?** Weights are stored in `float8_e4m3fn`. Sensitive layers (norms, embeddings, output heads) retain higher precision for stability. On RTX 40xx / H100 (Hopper/Ada), FP8 compute is hardware-accelerated. On older GPUs, weights dequantize on-the-fly β still saving VRAM, with a small speed penalty. Do not set `config.json` dtype to `float8_e4m3fn`; keep it as `bfloat16` β the node detects FP8 from the safetensors tensors directly.
---
## Quick Start β ComfyUI
### 1. Install the Custom Node
```bash
cd ComfyUI/custom_nodes
git clone https://github.com/Saganaki22/HiDream_O1-ComfyUI.git
cd HiDream_O1-ComfyUI
python -m pip install -r requirements.txt
```
Or search for `HiDream O1` in **ComfyUI Manager**.
Suggested transformers version: **4.57.1 β 5.3** (newer versions may break compatibility).
### 2. Download the Weights
Download the **entire model folder** (all files, not just the safetensors) and place it in `ComfyUI/models/diffusion_models/`:
```bash
huggingface-cli download drbaph/HiDream-O1-Image-Dev-FP8 \
--local-dir ComfyUI/models/diffusion_models/HiDream-O1-Image-Dev-fp8
```
The folder must contain the full Hugging Face support files alongside the weights:
`config.json`, `chat_template.json`, `generation_config.json`, `preprocessor_config.json`, `tokenizer.json`, `tokenizer_config.json`, `vocab.json`, `merges.txt`, `model.safetensors`
### 3. Load in ComfyUI
Use the workflow provided in the custom node repository. The loader will detect `dev` in the folder name and automatically apply Dev settings (28 steps, no CFG, Euler scheduler). Point the model loader to `HiDream-O1-Image-Dev-fp8`.
For the fastest inference on supported hardware, set precision to `fp8_e4m3fn_fast` in the model loader node.
---
## About HiDream-O1-Image
HiDream-O1-Image is a natively unified image generative foundation model built on a **Pixel-level Unified Transformer (UiT)** β no external VAEs, no disjoint text encoders. It encodes raw pixels, text, and task-specific conditions in a single shared token space, supporting:
- **Text-to-image generation** up to 2,048 Γ 2,048
- **Instruction-based image editing**
- **Subject-driven personalization** (multi-reference IP)
- **Long-text and multilingual text rendering**
At only 9B parameters it matches or exceeds much larger open-source DiTs and leading closed-source models. It debuted at **#8 in the Artificial Analysis Text to Image Arena** (2026-05-05).
---
## Key Features
- 𧬠**Pixel-Level Unified Transformer** β end-to-end on raw pixels, no VAE, no disjoint text encoder
- π¨ **One Model, Many Tasks** β T2I, editing, personalization, storyboard generation
- β‘ **28-Step Distilled Dev** β ~2Γ faster than the full model with minimal quality trade-off
- πΎ **FP8 Quantized** β ~half the VRAM of full-precision variants
- πΌοΈ **Native High Resolution** β direct synthesis up to 2,048 Γ 2,048
---
## All Model Variants
### Full Model
| Repo | Precision | VRAM | Steps |
| :--- | :---: | :---: | :---: |
| [drbaph/HiDream-O1-Image-BF16](https://huggingface.co/drbaph/HiDream-O1-Image-BF16) | BF16 | 17β20 GB | 50 |
| [drbaph/HiDream-O1-Image-FP16](https://huggingface.co/drbaph/HiDream-O1-Image-FP16) | FP16 | 17β20 GB | 50 |
| [drbaph/HiDream-O1-Image-FP8](https://huggingface.co/drbaph/HiDream-O1-Image-FP8) | FP8 Mixed | ~10 GB | 50 |
### Dev Model (distilled, faster)
| Repo | Precision | VRAM | Steps |
| :--- | :---: | :---: | :---: |
| [drbaph/HiDream-O1-Image-Dev-BF16](https://huggingface.co/drbaph/HiDream-O1-Image-Dev-BF16) | BF16 | 17β20 GB | **28** |
| [drbaph/HiDream-O1-Image-Dev-FP16](https://huggingface.co/drbaph/HiDream-O1-Image-Dev-FP16) | FP16 | 17β20 GB | **28** |
| [drbaph/HiDream-O1-Image-Dev-FP8](https://huggingface.co/drbaph/HiDream-O1-Image-Dev-FP8) *(this repo)* | FP8 Mixed | ~10 GB | **28** |
---
## License
The original HiDream-O1-Image model and code are released under the **MIT License**. This FP8 quantization inherits the same license.
---
## Links
- π Original Dev model: [HiDream-ai/HiDream-O1-Image-Dev](https://huggingface.co/HiDream-ai/HiDream-O1-Image-Dev)
- π Original Full model: [HiDream-ai/HiDream-O1-Image](https://huggingface.co/HiDream-ai/HiDream-O1-Image)
- π§ ComfyUI node: [Saganaki22/HiDream_O1-ComfyUI](https://github.com/Saganaki22/HiDream_O1-ComfyUI)
- π Technical report: [HiDream-O1-Image.pdf](https://github.com/HiDream-ai/HiDream-O1-Image/blob/main/assets/HiDream-O1-Image.pdf)
- π€ Online demo: [HiDream-O1-Image-Dev Space](https://huggingface.co/spaces/HiDream-ai/HiDream-O1-Image-Dev) |