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 差构成。在同一坐标空间中,均值和协方差相同,这一分量就消失。
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 校正之外,加入显式的跨样本约束。
IDM samples.IDM 采样。
IDM augments internal DMD with feature-moment matching. Its EMA copy supplies a shared feature space for generated and reference samples.IDM 在内部 DMD 之上加入特征矩匹配。生成器的 EMA 副本为生成样本和参考样本提供共同的特征空间。
Swipe horizontally to read long equations →长公式可横向滑动查看 →
RCGM base objectiveRCGM 基础目标
Full internal DMD correction完整的内部 DMD 校正
Empirical EMA feature-moment lossEMA 特征矩的经验损失
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节 ↗The sign matters: the field is model minus reference; descent uses its negative.注意正负号:场是“模型减参考”,下降方向取它的负值。
Following APEX, the same network uses opposite condition vectors to select its reference and model velocity branches. Their difference estimates the DMD correction without a separate fake-score network.沿用 APEX,同一网络用相反的条件向量区分参考速度分支和模型速度分支。两者之差提供 DMD 校正的估计,无需独立的 fake-score 网络。
The model-score estimate is still learned. Here −c selects the model branch for the same condition c.模型 score 仍然需要学习。这里的 −c 是同一条件 c 对应的模型分支选择方式。
The interpretation assumes both branches approximate their marginal velocities.这一解释以两个分支能近似相应边缘速度为前提。
IDM keeps the full DMD correction and compares pooled feature statistics across generated and reference samples. The generator’s EMA copy supplies those features.IDM 保留完整 DMD 校正,并比较生成样本与参考样本的汇总特征统计量。这些特征由生成器自身的 EMA 副本提供。
Within an update, EMA parameters are fixed; gradients still pass through the feature network to current generated samples.单次更新中,EMA 参数固定;梯度仍可经过特征网络传回当前生成样本。
The same representation is used on both sides; no external feature encoder is needed.两侧使用同一表征,无需外部特征编码器。
DMD already contains moment information. The decomposition reveals a part determined by means and covariances—and what remains beyond it.DMD 本身已经包含矩信息。分解揭示了由均值、协方差决定的部分,以及它们之外仍然存在的 score 结构。
The difference between the scores of moment-matched Gaussians. If both moments match in the same coordinate space, this component vanishes.由矩匹配高斯的 score 差构成。在同一坐标空间中,均值和协方差相同,这一分量就消失。
The remaining score structure. Equal means and covariances do not guarantee equal distributions, so the residual can still be nonzero.高斯近似之外的 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,并不假设生成样本服从高斯分布。在原文正则条件下,每个残差在自身分布下与常数及线性函数正交;两个残差之差不必继承这一正交性。
The mean term adjusts the feature average. The standard-deviation term adjusts the spread around that average. Try both below.均值项约束特征的平均位置,标准差项约束围绕均值的离散程度。可以在下方分别调整,观察损失如何变化。
Illustrative Gaussian proxies, not measured feature distributions or image samples. Reference mean = 0, standard deviation = 1.曲线仅示意高斯近似,并非实测特征分布或图像样本。参考均值为0,标准差为1。
These moments pool across conditions. Matching them does not mean matching every conditional distribution—or the entire feature distribution.这些统计量跨条件汇总。对齐它们,不等于逐个匹配条件分布,也不等于匹配完整特征分布。
mean-pools the EMA generator’s last-layer activations at high noise levels. Generated and reference samples use the same feature map. 对高噪声下 EMA 生成器的最后一层激活做均值池化。生成样本与参考样本使用同一个特征映射。
Current generated features retain gradients. EMA parameters and queued features are fixed within an update. The empirical loss is 当前生成特征保留梯度;单次更新中,EMA 参数及队列特征固定。实际使用的经验损失为 .
The learned generator, text encoder, and VAE. Feature extraction, feature queues, and moment computation are used only during training.训练后的生成器、文本编码器和 VAE。额外特征提取、特征队列与矩计算只用于训练。
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.。两种回归改变时间权重与梯度大小,并非独立的分布信号。等权配置由消融实验选择。
First isolate the added moment loss under a shared training setting. Then look at the broader text-rendering comparison.先在相同训练配置下看新增矩损失的贡献,再看更广泛的文本渲染对比。
| Configuration配置 | OneIG | GenEval | DPG-Bench | LongText-CN | LongText-EN |
|---|---|---|---|---|---|
| Internal DMD, without moment loss内部 DMD,不加矩损失 | 52.87 | 77.46 | 86.54 | 93.87 | 89.79 |
| DMD + moment loss, DINOv2 featuresDMD + 矩损失,DINOv2 特征 | 53.00 | 77.75 | 86.71 | 94.13 | 90.09 |
| IDM · generator EMA featuresIDM · 生成器 EMA 特征 | 53.06 | 77.81 | 86.82 | 94.25 | 90.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,且无需外部编码器。
External methods use their respective training data and configurations. This comparison complements the controlled ablation above.外部方法各自使用不同的训练数据和配置。该比较补充展示整体效果,与上方受控消融分别解读。
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 是外部参照,不是同一次训练的受控阶段。
Equation numbers refer to the original manuscript. A star denotes an exact marginal quantity; a hat denotes a learned or empirical estimate.公式编号对应原文。星号表示精确边缘量,帽子表示学习得到或经验估计的量。
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