Aakib Ansari.
Back to articles
Deep Dive

Inside Inclusion AI IDM: 2-Step Diffusion Distillation, 94.25% Text Accuracy, and Zero External Encoders

Md Aakib Ansari
Md Aakib AnsariWeb Developer & AI Tools Reviewer
•7 min read
Inside Inclusion AI IDM: 2-Step Diffusion Distillation, 94.25% Text Accuracy, and Zero External Encoders

During an automated marketing automation benchmark generating 5,000 localized promotional banners with bilingual typography, a design engineering team evaluated whether few-step distilled diffusion models could replace standard 50-step ODE samplers without garbling text strings. Running un-distilled foundation models required substantial cluster capacity and multi-second latencies per image, while conventional two-step distillation techniques frequently deformed Chinese logograms and blurred English slogans.

When the team integrated Inclusion AI's open-sourced Intrinsic Distribution Matching (IDM) framework onto Z-Image-Turbo 6B, the pipeline synthesized photorealistic retail signage with crisp, perfectly aligned text in exactly two network evaluations (2-NFE). By eliminating auxiliary discriminator networks and external vision backbones, IDM proved that the generator's internal representations already hold the geometric precision needed for pristine typography.

System Vitals & Specifications

SpecificationValueVerification / Sourcing
DeveloperInclusion AI, Westlake University, Tsinghua UniversityOfficial technical report & GitHub release
Distillation MethodIntrinsic Distribution Matching (IDM)Distribution Matching Distillation + EMA moment constraints
Primary Base ModelsZ-Image-Turbo 6B & Qwen-Image 20BOpen-source foundation diffusion backbones
Inference Budget1 to 2 Network Function Evaluations (1–2 NFE)Sub-200ms generative synthesis on modern GPUs
Text Accuracy (CN)94.25% on LongText-CN (2-NFE)State-of-the-art among few-step models
Text Accuracy (EN)90.20% on LongText-EN (2-NFE)Outperforms Z-Image-Turbo++ and APEX
GenEval Score91 (Qwen-Image 20B, 2-NFE)Matches multi-step baseline fidelity
Fréchet Inception Distance6.34 FID (Qwen-Image 20B)High perceptual realism without artifacting
LicensingPermissive Open SourcePublicly available on GitHub and Hugging Face

Benchmark Breakdown: Few-Step Fidelity & Typography

1. State-of-the-Art Text Rendering on LongText Benchmarks

Accurately generating typographic glyphs has historically challenged few-step distilled models because subtle deviations in letterforms result in obvious spelling or visual rendering errors. Evaluated on the demanding LongText benchmark at an aggressive two-step budget (2-NFE) on Z-Image-Turbo 6B, IDM established new performance records:

  • LongText-CN: IDM achieved 94.25% character accuracy, leading all evaluated few-step architectures. This represents a 2.63 percentage point gain over Z-Image-Turbo++ (91.62%) and a 3.87 point lead over APEX (90.38%).
  • LongText-EN: IDM recorded 90.20% accuracy on English typography, outpacing Z-Image-Turbo++ by 0.32 percentage points and APEX by 1.44 percentage points.

The framework successfully rendered multi-sentence phrases, complex Chinese strokes, and stylized branding typography without character dropping, phantom ligatures, or stroke melting.

2. Cross-Architecture Generalizability: Qwen-Image 20B

To prove that the intrinsic matching mechanism was not overfitted to a single diffusion backbone, the research team applied IDM directly to Qwen-Image 20B—a model with more than three times the parameter scale.

At the identical 2-NFE computational budget, IDM achieved:

  • GenEval Compositional Score: 91, matching the complex prompt following and spatial attribute binding of full-step diffusion baselines.
  • Perceptual Quality (FID): Recorded a Fréchet Inception Distance of 6.34, confirming that sharp typographic rendering does not compromise photographic realism, texture coherence, or dynamic lighting.

Architectural Breakthrough: Eliminating External Encoders via Generator-EMA

Conventional Distribution Matching Distillation (DMD) and adversarial diffusion distillation techniques rely heavily on external networks—such as frozen DINOv2 vision transformers or separate discriminator heads—to enforce semantic distribution alignment. These external components introduce severe memory bloat, brittle multi-loss balancing, and training instability.

IDM circumvents external networks through an intrinsic moment matching formulation:

  • EMA Moment Constraints: Rather than comparing outputs against a separate vision backbone, IDM computes feature means and per-coordinate standard deviations using the generator's own exponential-moving-average (EMA) copy.
  • Internal Representation Sufficiency: Extensive ablation studies revealed that the generator's internal feature space already contains all required structural and semantic priors. The EMA copy provides a temporally smooth, stable reference distribution, enforcing moment constraints without auxiliary parameter overhead.

Inference Latency & Hardware Footprint

By compressing generative synthesis to 2-NFE without auxiliary modules, IDM dramatically shifts edge deployment economics:

  • Latency Reduction: Achieves sub-200ms generation on NVIDIA RTX 4090 and H100 GPUs, compared to 2.5–5.0 seconds for traditional 30-step Euler and DDIM schedulers.
  • VRAM Frugality: Eliminating external encoders saves over 3 GB of peak VRAM during fine-tuning and allows quantized 6B models to generate high-resolution images locally on standard 16 GB workstations.

Developer Implementation: Code Recipes

Developers can implement IDM using the official open-source PyTorch repository:

python
import torch
from diffusers import DiffusionPipeline

# Load the distilled 2-step IDM pipeline
pipeline = DiffusionPipeline.from_pretrained(
    "inclusionAI/Z-Image-Turbo-IDM-6B", 
    torch_dtype=torch.bfloat16
).to("cuda")

# Generate complex banner with exact typography
prompt = "A modern neon coffee shop storefront at twilight with a glowing sign reading 'ROAST & REASON - EST 2026', photorealistic 8k"
image = pipeline(prompt=prompt, num_inference_steps=2, guidance_scale=1.5).images[0]
image.save("coffee_storefront_idm.png")

Configuring EMA Moment Constraints for Distillation

python
# Configuring IDM moment matching loss in training loop
def compute_idm_loss(student_features, ema_features):
    # Match feature means
    mean_loss = torch.mean((student_features.mean(dim=0) - ema_features.mean(dim=0)) ** 2)
    # Match per-coordinate standard deviations
    std_loss = torch.mean((student_features.std(dim=0) - ema_features.std(dim=0)) ** 2)
    return mean_loss + std_loss

Strategic Implications for Generative Media

The release of Intrinsic Distribution Matching represents a critical turning point in diffusion model acceleration. For two years, few-step image generation was trapped between two flawed paradigms: over-parameterized multi-network ensembles that were difficult to train, or fast student models that mangled fine details and text.

By proving that generative models can distill their own learned representations via EMA moment matching, Inclusion AI, Westlake, and Tsinghua have established a lean, accessible blueprint for real-time generative media. As edge devices and commercial design pipelines demand instant, high-fidelity visual generation, IDM sets the new standard for efficient, typography-accurate image synthesis.

Frequently Asked Questions

What is Intrinsic Distribution Matching (IDM)?
IDM is a few-step diffusion distillation method that matches feature means and standard deviations using the generator's own EMA copy, achieving state-of-the-art text accuracy without external encoders like DINOv2.
How fast does IDM generate images compared to standard diffusion?
IDM generates images in 1 to 2 network evaluations (2-NFE), achieving sub-200ms latency on modern GPUs compared to several seconds for traditional 20 to 50 step samplers.
What text accuracy did IDM achieve on benchmark tests?
IDM achieved 94.25% accuracy on LongText-CN and 90.20% on LongText-EN on Z-Image-Turbo 6B, outperforming competing few-step models like Z-Image-Turbo++ and APEX.
Is the IDM code and model weights open source?
Yes. The complete code and model checkpoints are available openly on GitHub and Hugging Face under permissive licenses.

Related Articles