Ideogram 4.0
High-quality image generation model based on the 9.3B parameter DiT architecture.
- 9.3B parameter Single-stream Diffusion Transformer (DiT): 34 transformer blocks, 4,608 embedding dimensions, 18 attention heads, SwiGLU with 12,288 intermediate dimensions. Implements QK-RMSNorm, 3D Multimodal RoPE, and AdaLN timestep modulation. Uses Flow-matching Euler sampler and asymmetric CFG (Classifier-Free Guidance). - Structured JSON prompt interface: The entire training process is performed using structured JSON captions, allowing for unified control over bounding box layout (0-1000 normalized coordinates, [y_min, x_min, y_max, x_max] format), conditioning with a maximum of 16 colors (5 colors per element) in a HEX color palette, and separating the literal string and visual styling of typed text elements into a single JSON schema. Includes a schema validation pipeline. - Industry-leading text rendering: English OCR accuracy of 0.97 (X-Omni benchmark), ranked #1 with a 47.9% selection rate in ContraLabs typography evaluation, supports multilingual text. Specialized in in-image typography such as logos, signs, and captions. - Flexible resolution and sampler presets: Native support for 256-2048px (multiples of 16), with a maximum aspect ratio of 6:1. Provides presets for 12 steps (fast draft), 20 steps (standard), and 48 steps (V4_QUALITY_48, highest quality). - Text encoder: Combines the hidden states of 13 intermediate layers of the Qwen3-VL-8B-Instruct vision-language model as feature dimensions (multi-layer feature fusion, not a single layer). - Magic Prompt API: An API that automatically expands plain text prompts into structured JSON prompts (requires an API key, IDEOGRAM_API_KEY environment variable). - Quantized checkpoints: Available for immediate download from HuggingFace in FP8 (all platforms) and NF4 (CUDA only) โ can be run on a single 24GB GPU using NF4.
๐ป System Requirements
For NF4 quantization, a single 24GB GPU (RTX 4090 / RTX 3090 level) is required. For FP8, 40GB+ is recommended (A100 / A6000 level). CPU-only execution is not officially supported.
NF4 checkpoints require approximately 5GB, FP8 checkpoints require approximately 10GB, the text encoder requires approximately 16GB, and the entire environment requires approximately 30-50GB.
โก Installation
### 4-1. Quick Start
```bash
# After approving access to the HuggingFace gate
pip install git+https://github.com/ideogram-oss/ideogram-4.git
```
### 4-2. Detailed Installation
```bash
# 1. Clone the repository
git clone https://github.com/ideogram-oss/ideogram-4.git
cd ideogram-4
# 2. Install dependencies
pip install .
# or development mode
pip install -e .
# 3. HuggingFace Authentication (access to gated models)
huggingface-cli login
# 4. Run inference (NF4 quantization)
python run_inference.py \
--prompt "your prompt here" \
--output out.png \
--quantization "nf4"
```
### 4-3. Python API (diffusers)
```python
from diffusers import DiffusionPipeline
import torch
pipe = DiffusionPipeline.from_pretrained(
"ideogram-ai/ideogram-4-fp8",
dtype=torch.bfloat16,
device_map="cuda"
)
image = pipe("Astronaut in jungle").images[0]
image.save("output.png")
```
### 4-4. Cloud API
```bash
# Obtain API key: developer.ideogram.ai
# Authentication: Api-Key header
curl -X POST https://api.ideogram.ai/v1/ideogram-v3/generate \
-H "Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "A serene mountain landscape at sunset"}'
```
API endpoints: Generate (text-to-image), Remix (image variation), Edit (partial modification), Reframe (resolution expansion), Replace Background (background replacement), Face Swapping (face replacement). Default concurrent request limit is 10. For large-scale processing, contact partnership@ideogram.ai.๐งฌ Bio Use Cases
Automated Logo and Branding Design
Using a JSON prompt, place the company name text at the specified bounding box location, and generate 100 logo design variations at once by specifying the brand colors with a HEX color palette of 6 colors. Text with an OCR accuracy of 0.97 is rendered accurately in the image, allowing designers to focus solely on selecting the best candidates.
Graphical Abstract Generation for Scientific Papers and Posters
When visualizing complex experimental workflows, specify the location of each step with bounding boxes and accurately place text labels ("Step 1: Sample Prep", "Step 2: Analysis", etc.). Achieve 2048x1024 high-resolution poster print quality for academic conferences using the V4_QUALITY_48 preset.
Multilingual Marketing Creatives
Simultaneously generate English, Korean, and Japanese versions of advertising images by replacing only the text elements in the same layout JSON. Maintain brand consistency with color palette conditioning while making subtle adjustments to the color scheme for each cultural region.
๐ Update Notes
No update notes yet.
๐งช Related Code of Life
No related Code of Life posts yet.