IDM
INCLUSION AI / WESTLAKE UNIVERSITY 2026

Intrinsic
Distribution Matching.

Better few-step generation, with distributional supervision
from the generator itself.
用生成器自身提供分布监督,
让一步与少步生成保留更多细节。

Internal DMD guides the samples. EMA features align their statistics.
One generator, with an explicit constraint across samples.
内部 DMD 引导样本,EMA 特征对齐统计量。
在完整 DMD 校正之外,加入显式的跨样本约束。

Deyuan Liu1,2,† · Yansen Han2,4,† · Kaiwen Zheng3,† · Jun Xie1,2,4,5 · Jiacheng Liu1,6
Zhenglin Cheng1,2,4,5 · Peng Sun1,2,4 · Jintao Zhang3,* · Jianguo Li1,* · Tao Lin1,2,*
Affiliations & contributions单位与作者贡献

1 Inclusion AI · 2 Westlake University · 3 Tsinghua University
4 Zhejiang University · 5 Shanghai Innovation Institute · 6 MBZUAI
† Equal contribution. * Corresponding authors.† 共同贡献。* 通讯作者。

IDM samples.IDM 采样。

94.25%LongText-CN
90.20%LongText-EN
2 NFEZ-Image · Best among the compared methods
at this network-evaluation budget.
Z-Image · 在相同网络评估预算下,
取得对比方法中的最佳成绩。
01 THE CENTRAL IDEA核心思路

The generator can
also be the representation.
生成器,
也可以提供表征。

IDM augments internal DMD with feature-moment matching. Its EMA copy supplies a shared feature space for generated and reference samples.IDM 在内部 DMD 之上加入特征矩匹配。生成器的 EMA 副本为生成样本和参考样本提供共同的特征空间。

THE TRAINING OBJECTIVE训练目标 · Eq. 14

Swipe horizontally to read long equations →长公式可横向滑动查看 →

RCGM base objectiveRCGM 基础目标

Full internal DMD correction完整的内部 DMD 校正

Empirical EMA feature-moment lossEMA 特征矩的经验损失

Start with a score difference.从两个分布的 score 差出发。

A score points toward increasing log density. DMD uses the difference between the reference and generated scores to guide samples toward a lower model-to-reference density ratio.Score 指向对数密度增加的方向。DMD 使用参考分布与生成分布的 score 差,引导样本朝模型与参考密度比降低的方向移动。

Classical DMD uses a pretrained teacher for the reference score and learns a separate fake-score network for the changing generated distribution.经典 DMD 用预训练教师提供参考 score,并训练独立的 fake-score 网络来跟踪不断变化的生成分布。

Paper §2–3论文第2–3节 ↗
REVERSE-KL FIELD反向 KL 场 · Eq. 3
Descent direction下降方向

The sign matters: the field is model minus reference; descent uses its negative.注意正负号:场是“模型减参考”,下降方向取它的负值。

02 WHY MOMENTS?为什么约束矩?

A full field.
Two components.
完整的场,
两部分结构。

DMD already contains moment information. The decomposition reveals a part determined by means and covariances—and what remains beyond it.DMD 本身已经包含矩信息。分解揭示了由均值、协方差决定的部分,以及它们之外仍然存在的 score 结构。

Eq. 7 · EXACT DECOMPOSITION, AT FIXED CONDITION固定条件下的精确分解

Means and covariances均值与协方差

The difference between the scores of moment-matched Gaussians. If both moments match in the same coordinate space, this component vanishes.由矩匹配高斯的 score 差构成。在同一坐标空间中,均值和协方差相同,这一分量就消失。

Non-Gaussian residual非高斯残差

The remaining score structure. Equal means and covariances do not guarantee equal distributions, so the residual can still be nonzero.高斯近似之外的 score 结构。均值和协方差一致并不保证两个分布一致,因此残差仍可能非零。

IDM keeps the full DMD correction and adds a feature-space moment loss. The added loss is motivated by this decomposition; it does not estimate the sample-space Gaussian or residual component.IDM 保留完整 DMD 校正,再加入特征空间的矩损失。分解为该约束提供动机,但新增损失并不估计样本空间中的高斯分量或残差分量。

The score decomposition behind Eq. 7展开 Eq. 7 背后的 score 分解

For a smooth positive density with finite second moment and positive-definite covariance, its moment-matched Gaussian is对具有有限二阶矩、正定协方差的光滑正密度,其矩匹配高斯为 .

The Gaussian is an analytical approximation to the score; generated samples are not assumed to be Gaussian. Each residual is orthogonal to constant and linear functions under its own distribution, under the paper’s regularity conditions. The difference of two residuals need not inherit that orthogonality.高斯用于分析 score,并不假设生成样本服从高斯分布。在原文正则条件下,每个残差在自身分布下与常数及线性函数正交;两个残差之差不必继承这一正交性。

03 EXPLORE THE CONSTRAINT交互理解矩约束

Move the mean.
Match the spread.
对齐均值,
再对齐离散程度。

The mean term adjusts the feature average. The standard-deviation term adjusts the spread around that average. Try both below.均值项约束特征的平均位置,标准差项约束围绕均值的离散程度。可以在下方分别调整,观察损失如何变化。

POPULATION FEATURE-MOMENT LOSS总体特征矩损失 · Eq. 13
ONE FEATURE DIMENSION单维特征示意
Reference参考Generated生成
DensityFeature value

Illustrative Gaussian proxies, not measured feature distributions or image samples. Reference mean = 0, standard deviation = 1.曲线仅示意高斯近似,并非实测特征分布或图像样本。参考均值为0,标准差为1。

2.32
Mean term均值项 1.96Spread term标准差项 0.36

These moments pool across conditions. Matching them does not mean matching every conditional distribution—or the entire feature distribution.这些统计量跨条件汇总。对齐它们,不等于逐个匹配条件分布,也不等于匹配完整特征分布。

A

Where do the features come from?特征从哪里来?

mean-pools the EMA generator’s last-layer activations at high noise levels. Generated and reference samples use the same feature map. 对高噪声下 EMA 生成器的最后一层激活做均值池化。生成样本与参考样本使用同一个特征映射。

B

Where do gradients go?梯度传到哪里?

Current generated features retain gradients. EMA parameters and queued features are fixed within an update. The empirical loss is 当前生成特征保留梯度;单次更新中,EMA 参数及队列特征固定。实际使用的经验损失为 .

C

What remains at inference?推理时需要什么?

The learned generator, text encoder, and VAE. Feature extraction, feature queues, and moment computation are used only during training.训练后的生成器、文本编码器和 VAE。额外特征提取、特征队列与矩计算只用于训练。

How velocity and endpoint regression use the same DMD correction速度与端点回归如何使用同一 DMD 校正

With the paper’s convention, t = 1 is noise and t = 0 is data. The exact marginal velocity difference corresponds to the descent direction of the noisy reverse KL:沿用原文约定,t = 1 为噪声,t = 0 为数据。精确边缘速度之差对应噪声分布反向 KL 的下降方向:

The processed correction is detached and constructs both targets (sg denotes stop-gradient):经过处理的校正被停止梯度,并用于构造两个目标(sg 表示停止梯度):

At fixed input and time, 在固定输入与时间下,. The two regressions change time weighting and magnitude; they are not independent distributional signals. Equal weighting is selected empirically by the ablations.。两种回归改变时间权重与梯度大小,并非独立的分布信号。等权配置由消融实验选择。

04 THE EVIDENCE实验依据

What does the
added constraint buy?
新增的约束,
究竟带来多少收益?

First isolate the added moment loss under a shared training setting. Then look at the broader text-rendering comparison.先在相同训练配置下看新增矩损失的贡献,再看更广泛的文本渲染对比。

Controlled ablations · IDM (Z-Image), full tuning, 2 NFE · Paper Table 5受控消融 · IDM(Z-Image),全参数训练,2 NFE · 论文 Table 5
Configuration配置OneIGGenEvalDPG-BenchLongText-CNLongText-EN
Internal DMD, without moment loss内部 DMD,不加矩损失52.8777.4686.5493.8789.79
DMD + moment loss, DINOv2 featuresDMD + 矩损失,DINOv2 特征53.0077.7586.7194.1390.09
IDM · generator EMA featuresIDM · 生成器 EMA 特征53.0677.8186.8294.2590.20
Gain over internal DMD control相对内部 DMD 控制组的提升+0.19+0.35+0.28+0.38+0.41

Scores are percentages; gains are percentage points. All five reported aggregate metrics improve. EMA features perform close to DINOv2 without requiring an external encoder.分数为百分比,增量单位为百分点。五项汇总指标均有提升;EMA 特征效果接近 DINOv2,且无需外部编码器。

LONG-TEXT RENDERING · 2 NFE长文本渲染 · 2 NFE

Dense text.
In two evaluations.
两次网络评估,
生成密集文本。

External methods use their respective training data and configurations. This comparison complements the controlled ablation above.外部方法各自使用不同的训练数据和配置。该比较补充展示整体效果,与上方受控消融分别解读。

Score (%) ↑分数(%)↑0 — 100

Qualitative examples show more consistent dense-text preservation with full IDM. The v+x control omits the moment loss and produces more saturated colors in parts of the sushi poster. APEX is an external reference, not a controlled stage of the same training run.定性样例中,完整 IDM 对密集文本的保留更稳定。不含矩损失的 v+x 控制组在寿司海报部分区域颜色更饱和。APEX 是外部参照,不是同一次训练的受控阶段。

Evaluated with full-parameter & LoRA tuning支持全参数与 LoRA 训练评估Z-Image-Turbo 6BQwen-Image 20B
05 READ THE SYMBOLS符号速查

The paper’s notation.
Kept intact.
沿用原文符号,
把每一项说清楚。

Equation numbers refer to the original manuscript. A star denotes an exact marginal quantity; a hat denotes a learned or empirical estimate.公式编号对应原文。星号表示精确边缘量,帽子表示学习得到或经验估计的量。

Reference and generated distributions参考分布与生成分布
Sample, text condition, and Gaussian noise样本、文本条件与高斯噪声
Velocity network and one-step generator速度网络与一步生成器
Score and reverse-KL fieldScore 与反向 KL 场
Moment-matched Gaussian and score residual矩匹配高斯与 score 残差
EMA feature map and extracted featureEMA 特征映射与提取的特征
Pooled feature mean and coordinate variance汇总特征均值与逐坐标方差
Detached model and reference feature queues已停止梯度的模型与参考特征队列
One-step generation · t = 1 → t = 0一步生成 · t = 1 → t = 0
06 BUILD ON THE WORK引用与代码

Intrinsic by design.
Open to explore.
从内部出发,
欢迎继续探索。

If you use this work or its inference code, please cite IDM and APEX.如果这项工作或推理代码对你有所帮助,欢迎引用 IDM 和 APEX。

Explore the code查看代码仓库 ↗

Model weights: coming soon模型权重:Coming soon

BibTeX · IDM + APEX