Kaijing Ma
中英对照 · 词汇注释 · arXiv 2403.03206v1
点击点状下划线词语查看释义

Scaling Rectified Flow Transformers for High-Resolution Image Synthesis

面向高分辨率图像合成的整流流 Transformer 扩展研究

作者: Patrick Esser*、Sumith Kulal、Andreas Blattmann、Rahim Entezari、Jonas Müller、Harry Saini、Yam Levi、Dominik Lorenz、Axel Sauer、Frederic Boesel、Dustin Podell、Tim Dockhorn、Zion English、Kyle Lacey、Alex Goodwin、Yannik Marek、Robin Rombach*。

机构: Stability AI。* 表示同等贡献。联系邮箱格式:<first.last>@stability.ai。

阅读方式:每组先读英文原文,再看对应中文。带点状下划线的词可以点击查看本文语境中的释义。上方可切换阅读模式,也可关闭词汇标注。原文为 arXiv:2403.03206v1(2024 年 3 月 5 日),英文段落按同版 HTML 与同版 PDF 对齐。公式、数据、原图及独立标明的译注保留。个别跨公式句子合并为一组对照。

原文第 1 页图示
ENGLISH 原文

Figure 1: High- samples from our 8B model, showcasing its capabilities in , precise and spatial reasoning, to fine details, and high image quality across a wide variety of styles.

中文译文
图 1。 我们的 80 亿参数整流流模型生成的高分辨率样本,展示了它在文字排印、精确遵循提示词与空间推理、关注精细细节,以及在多种风格下保持高图像质量等方面的能力。
原文第 1 页

图 1 中可读文字的译文:“Go with the flow”为“顺流而行”;“Achievement unlocked: Diffusion models can spell now!”为“成就已解锁:扩散模型现在会拼写了!”;“they left me here to rust and rot away like all the others”为“他们把我留在这里,让我像其他所有同类一样生锈、腐烂”;“Astronaut & Pigsy: Buddies for Life”为“宇航员与小猪:一辈子的伙伴”。

Abstract摘要

ENGLISH 原文

create data from noise by the forward paths of data towards noise and have as a powerful generative modeling technique for high-dimensional, data such as images and videos. is a recent generative model that connects data and noise in a straight line. Despite its better properties and , it is not yet as . In this work, we improve existing noise techniques for training rectified flow models by biasing them towards perceptually relevant scales. Through a large-scale study, we demonstrate the superior performance of this approach compared to established diffusion formulations for high-resolution text-to-image synthesis.

中文译文

扩散模型通过逆转数据向噪声演化的前向路径,从噪声中创建数据,并已成为一种强大的生成建模技术,适用于图像和视频等高维感知数据。整流流是一种近期提出的生成模型形式,它以直线连接数据与噪声。尽管它具有更好的理论性质,且概念简单,但它尚未确立为公认的标准实践。在这项工作中,我们改进了训练整流流模型时使用的现有噪声采样技术,使其偏向与感知相关的尺度。通过一项大规模研究,我们证明,在高分辨率文本生成图像任务中,与已有的扩散建模形式相比,这种方法具有更优的性能。

ENGLISH 原文

Additionally, we present a novel transformer-based for text-to-image generation that uses separate weights for the two and enables a flow of information between image and text tokens, improving text comprehension, , and human ratings. We demonstrate that this architecture follows trends and lower to improved text-to-image synthesis as measured by various and human evaluations. Our largest models models, and we will make our experimental data, code, and model weights publicly available.

中文译文

此外,我们提出了一种用于文本生成图像的新型 Transformer 架构,它对两种模态采用独立权重,并允许信息在图像 token 与文本 token 之间双向流动,从而改善文本理解、文字排印和人类偏好评分。我们证明,该架构遵循可预测的规模扩展趋势;通过多种指标和人工评估可以观察到,更低的验证损失与更好的文本生成图像表现相关。我们最大的模型优于最先进的模型,我们将公开实验数据、代码和模型权重。

1. Introduction1. 引言

ENGLISH 原文

create data from noise (Song et al., 2020). They are trained to forward paths of data towards random noise and, , in conjunction with and properties of neural networks, can be used to generate new data points that are not present in the training data but follow the distribution of the training data (Sohl-Dickstein et al., 2015; Song & Ermon, 2020). This generative modeling technique has proven to be very effective for modeling high-dimensional, data such as images (Ho et al., 2020). In recent years, diffusion models have become the de-facto approach for generating high- images and videos from natural language inputs with impressive generalization capabilities (Saharia et al., 2022b; Ramesh et al., 2022; Rombach et al., 2022; Podell et al., 2023; Dai et al., 2023; Esser et al., 2023; Blattmann et al., 2023b; Betker et al., 2023; Blattmann et al., 2023a; Singer et al., 2022). Due to their iterative nature and the associated computational costs, as well as the long times during , research on for more efficient training and/or faster sampling of these models has increased (Karras et al., 2023; Liu et al., 2022).

中文译文

扩散模型从噪声中创建数据(Song et al., 2020)。它们通过训练来逆转数据向随机噪声演化的前向路径,因此,结合神经网络的逼近与泛化性质,就可以生成训练数据中不存在、但服从训练数据分布的新数据点(Sohl-Dickstein et al., 2015; Song & Ermon, 2020)。这种生成建模技术已被证明十分适合对图像等高维感知数据建模(Ho et al., 2020)。近年来,扩散模型已成为根据自然语言输入生成高分辨率图像和视频的事实标准方法,并展现出令人印象深刻的泛化能力(Saharia et al., 2022b; Ramesh et al., 2022; Rombach et al., 2022; Podell et al., 2023; Dai et al., 2023; Esser et al., 2023; Blattmann et al., 2023b; Betker et al., 2023; Blattmann et al., 2023a; Singer et al., 2022)。由于这些模型的迭代性质及其相关计算成本,以及推理时较长的采样时间,人们越来越多地研究能够实现更高效训练和/或更快速采样的模型形式(Karras et al., 2023; Liu et al., 2022)。

ENGLISH 原文

While specifying a forward path from data to noise leads to efficient training, it also raises the question of which path to choose. This choice can have important for . For example, a that fails to remove all noise from the data can lead to a in training and test distribution and result in such as gray image samples (Lin et al., 2024). Importantly, the choice of the forward process also influences the learned backward process and, , the sampling efficiency. While curved paths require many integration steps to simulate the process, a straight path could be simulated with a single step and is less error . Since each step corresponds to an of the neural network, this has a direct impact on the sampling speed.

中文译文

虽然指定一条从数据到噪声的前向路径能够实现高效训练,但这也提出了应当选择哪条路径的问题。这种选择可能对采样产生重要影响。例如,若一个前向过程未能从数据中去除全部噪声,就可能造成训练分布与测试分布之间的差异,并产生灰色图像样本等伪影(Lin et al., 2024)。重要的是,前向过程的选择还会影响所学到的反向过程,从而影响采样效率。弯曲路径需要许多积分步才能模拟该过程,而直线路径可以用一步模拟,也不容易积累误差。由于每一步都对应一次神经网络求值,这会直接影响采样速度。

译注 1: 上段“从数据中去除全部噪声”按原文 “remove all noise from the data” 翻译。结合前向加噪与终端分布的上下文,这里疑似应指未能彻底消除数据信号,或未能达到纯噪声分布。此处未擅自改写原句。

ENGLISH 原文

A particular choice for the forward path is a so-called  (Liu et al., 2022; Albergo & Vanden-Eijnden, 2022; Lipman et al., 2023), which connects data and noise on a straight line. Although this model class has better properties, it has not yet become in practice. So far, some advantages have been demonstrated in small and medium-sized experiments (Ma et al., 2024), but these are mostly limited to class- models. In this work, we change this by introducing a of the noise scales in rectified flow models, similar to noise-predictive  (Ho et al., 2020). Through a large-scale study, we compare our new to existing diffusion formulations and demonstrate its benefits.

中文译文

前向路径的一种特定选择是所谓的整流流(Rectified Flow;Liu et al., 2022; Albergo & Vanden-Eijnden, 2022; Lipman et al., 2023),它在一条直线上连接数据与噪声。尽管这一类模型具有更好的理论性质,但它尚未在实践中确立明确的主导地位。迄今为止,已有一些小规模和中等规模实验从经验上展示了某些优势(Ma et al., 2024),但这些实验主要局限于类别条件模型。在这项工作中,我们通过对整流流模型中的噪声尺度引入重新加权来改变这一状况,这与噪声预测型扩散模型中的做法类似(Ho et al., 2020)。通过一项大规模研究,我们将新的形式与现有扩散形式进行比较,并展示其优势。

ENGLISH 原文

We show that the widely used approach for text-to-image synthesis, where a fixed text is fed directly into the model (e.g., via  (Vaswani et al., 2017; Rombach et al., 2022)), is not ideal, and present a new that incorporates learnable streams for both image and text tokens, which enables a flow of information between them. We combine this with our improved and investigate its . We demonstrate a trend in the and show that a lower validation loss strongly with improved automatic and human evaluations.

Our largest models state-of-the art open models such as SDXL (Podell et al., 2023), SDXL-Turbo (Sauer et al., 2023), Pixart-α (Chen et al., 2023), and closed-source models such as DALL-E 3 (Betker et al., 2023) both in  (Ghosh et al., 2023) of prompt understanding and human ratings.

中文译文

我们表明,文本生成图像中广泛使用的做法,即将固定的文本表示直接输入模型,例如通过交叉注意力(Vaswani et al., 2017; Rombach et al., 2022),并不理想;我们提出一种新架构,分别为图像 token 和文本 token 设置可学习的处理流,使两者之间能够双向传递信息。我们将它与改进后的整流流形式结合,并研究其可扩展性。我们展示了验证损失中可预测的规模扩展趋势,并表明,更低的验证损失与自动评估及人工评估结果的改善高度相关。我们最大的模型,在提示词理解的定量评估(Ghosh et al., 2023)和人类偏好评分这两个方面,都优于 SDXL(Podell et al., 2023)、SDXL-Turbo(Sauer et al., 2023)、Pixart-α(Chen et al., 2023)等最先进的开放模型,以及 DALL-E 3(Betker et al., 2023)等闭源模型。

ENGLISH 原文

The core contributions of our work are: (i) We conduct a large-scale, systematic study on different and to identify the best setting. For this purpose, we introduce new noise for rectified flow models that improve performance over previously known samplers. (ii) We devise a novel, scalable for text-to-image synthesis that allows mixing between text and image token streams within the network. We show its benefits compared to such as UViT (Hoogeboom et al., 2023) and DiT (Peebles & Xie, 2023). Finally, we (iii) perform a study of our model and demonstrate that it follows scaling trends. We show that a lower strongly with improved text-to-image performance assessed via metrics such as T2I-CompBench (Huang et al., 2023), GenEval (Ghosh et al., 2023) and human ratings. We make results, code, and model weights publicly available.

中文译文

本工作的核心贡献如下:(i)我们对不同的扩散模型与整流流形式开展了大规模系统研究,以确定最佳设置。为此,我们引入了用于整流流模型的新噪声采样器,它们比此前已知的采样器表现更好。(ii)我们设计了一种新颖、可扩展的文本生成图像架构,使文本 token 流与图像 token 流能够在网络内部双向混合。我们展示了它相对于 UViT(Hoogeboom et al., 2023)和 DiT(Peebles & Xie, 2023)等已有骨干网络的优势。最后,(iii)我们对模型开展了规模扩展研究,并证明它遵循可预测的扩展趋势。我们表明,更低的验证损失与更好的文本生成图像表现高度相关,这些表现通过 T2I-CompBench(Huang et al., 2023)、GenEval(Ghosh et al., 2023)和人工评分等指标进行评估。我们公开结果、代码和模型权重。

2. Simulation-Free Training of Flows2. 流的免模拟训练

ENGLISH 原文

We consider generative models that define a mapping between samples x1 from a noise distribution p1 to samples x0 from a data distribution p0 in terms of an (ODE),

中文译文

我们考虑这样一类生成模型:它们通过常微分方程(ODE),定义噪声分布 p1p_1 中的样本 x1x_1 与数据分布 p0p_0 中的样本 x0x_0 之间的映射:

dyt=vΘ(yt,t) dt.(1)d y_t=v_\Theta(y_t,t)\,dt.\tag{1}
ENGLISH 原文

where the v is by the weights Θ of a neural network. Prior work by Chen et al. (2018) suggested to directly solve Equation 1 via differentiable ODE solvers. However, this process is computationally expensive, especially for large network that parameterize vΘ​(yt,t). A more efficient alternative is to directly a ut that generates a between p0 and p1. To construct such a ut, we define a , corresponding to a probability path pt between p0 and p1=𝒩⁡(0,1), as

中文译文

其中,速度 vv 由神经网络权重 Θ\Theta 参数化。Chen et al.(2018)的先前工作提出,通过可微 ODE 求解器直接求解式(1)。然而,这一过程的计算代价很高,对于用大型网络架构参数化 vΘ(yt,t)v_\Theta(y_t,t) 的情况尤其如此。一种更高效的替代方案,是直接回归一个向量场 utu_t,使其生成连接 p0p_0 和 p1p_1 的概率路径。为构造这样的 utu_t,我们定义如下前向过程,它对应于 p0p_0 与 p1=N(0,1)p_1=\mathcal N(0,1) 之间的概率路径 ptp_t:

zt=atx0+btϵ,ϵ∼N(0,I).(2)z_t=a_t x_0+b_t\epsilon,\qquad \epsilon\sim\mathcal N(0,I).\tag{2}
ENGLISH 原文

For a0=1,b0=0,a1=0 and b1=1, the ,

中文译文

当 a0=1,b0=0,a1=0,b1=1a_0=1,b_0=0,a_1=0,b_1=1 时,边缘分布

pt(zt)=Eϵ∼N(0,I)pt(zt∣ϵ)(3)p_t(z_t)=\mathbb E_{\epsilon\sim\mathcal N(0,I)}p_t(z_t\mid\epsilon)\tag{3}
ENGLISH 原文

are with the data and noise distribution.

中文译文

与数据分布和噪声分布相一致。

ENGLISH 原文

To express the relationship between zt,x0 and ϵ, we introduce ψt and ut as

中文译文

为表达 ztz_t、x0x_0 和 ϵ\epsilon 之间的关系,我们引入 ψt\psi_t 和 utu_t:

ψt(⋅∣ϵ):x0↦atx0+btϵ,(4)\psi_t(\cdot\mid\epsilon):x_0\mapsto a_t x_0+b_t\epsilon,\tag{4}
ut(z∣ϵ):=ψt′(ψt−1(z∣ϵ)∣ϵ).(5)u_t(z\mid\epsilon):=\psi'_t\bigl(\psi_t^{-1}(z\mid\epsilon)\mid\epsilon\bigr).\tag{5}
ENGLISH 原文

Since zt can be written as solution to the ODE zt′=ut​(zt|ϵ), with initial value z0=x0, ut(⋅|ϵ) generates pt(⋅|ϵ). Remarkably, one can construct a ut which generates the marginal pt (Lipman et al., 2023) (see B.1), using the vector fields ut(⋅|ϵ):

中文译文

由于 ztz_t 可写成以 z0=x0z_0=x_0 为初值的 ODE zt′=ut(zt∣ϵ)z'_t=u_t(z_t\mid\epsilon) 的解,因此 ut(⋅∣ϵ)u_t(\cdot\mid\epsilon) 生成 pt(⋅∣ϵ)p_t(\cdot\mid\epsilon)。值得注意的是,可以利用条件向量场 ut(⋅∣ϵ)u_t(\cdot\mid\epsilon),构造出生成边缘概率路径 ptp_t 的边缘向量场 utu_t(Lipman et al., 2023;见 B.1):

ut(z)=Eϵ∼N(0,I)[ut(z∣ϵ)pt(z∣ϵ)pt(z)].(6)u_t(z)=\mathbb E_{\epsilon\sim\mathcal N(0,I)}\left[u_t(z\mid\epsilon)\frac{p_t(z\mid\epsilon)}{p_t(z)}\right].\tag{6}
ENGLISH 原文

While ut with the

LFM=Et,pt(z)∥vΘ(z,t)−ut(z)∥22(7)\mathcal L_{FM}=\mathbb E_{t,p_t(z)}\|v_\Theta(z,t)-u_t(z)\|_2^2\tag{7}

directly is due to the in Equation 6, (see B.1),

LCFM=Et,pt(z∣ϵ),p(ϵ)∥vΘ(z,t)−ut(z∣ϵ)∥22(8)\mathcal L_{CFM}=\mathbb E_{t,p_t(z\mid\epsilon),p(\epsilon)}\|v_\Theta(z,t)-u_t(z\mid\epsilon)\|_2^2\tag{8}

with the ut​(z|ϵ) provides an equivalent yet .

中文译文

由于式(6)中的边缘化,直接使用流匹配(Flow Matching)目标

LFM=Et,pt(z)∥vΘ(z,t)−ut(z)∥22(7)\mathcal L_{FM}=\mathbb E_{t,p_t(z)}\|v_\Theta(z,t)-u_t(z)\|_2^2\tag{7}

来回归 utu_t 在计算上不可行;而使用条件向量场 ut(z∣ϵ)u_t(z\mid\epsilon) 的条件流匹配(Conditional Flow Matching,见 B.1)

LCFM=Et,pt(z∣ϵ),p(ϵ)∥vΘ(z,t)−ut(z∣ϵ)∥22(8)\mathcal L_{CFM}=\mathbb E_{t,p_t(z\mid\epsilon),p(\epsilon)}\|v_\Theta(z,t)-u_t(z\mid\epsilon)\|_2^2\tag{8}

则提供了一个等价、但可计算的目标。

ENGLISH 原文

To convert the loss into an form we insert ψt′​(x0|ϵ)=at′​x0+bt′​ϵ and ψt−1​(z|ϵ)=z−bt​ϵat into (5)

中文译文

为将损失转为显式形式,我们将 ψt′(x0∣ϵ)=at′x0+bt′ϵ\psi'_t(x_0\mid\epsilon)=a'_t x_0+b'_t\epsilon 和 ψt−1(z∣ϵ)=(z−btϵ)/at\psi_t^{-1}(z\mid\epsilon)=(z-b_t\epsilon)/a_t 代入式(5):

zt′=ut(zt∣ϵ)=at′atzt−ϵbt(at′at−bt′bt).(9)z'_t=u_t(z_t\mid\epsilon)=\frac{a'_t}{a_t}z_t-\epsilon b_t\left(\frac{a'_t}{a_t}-\frac{b'_t}{b_t}\right).\tag{9}
ENGLISH 原文

Now, consider the λt:=log⁡at2bt2. With λt′=2​(at′at−bt′bt), we can rewrite Equation 9 as

中文译文

现在考虑信噪比 λt:=log⁡(at2/bt2)\lambda_t:=\log(a_t^2/b_t^2)。利用 λt′=2(at′/at−bt′/bt)\lambda'_t=2(a'_t/a_t-b'_t/b_t),我们可以将式(9)改写为

ut(zt∣ϵ)=at′atzt−bt2λt′ϵ.(10)u_t(z_t\mid\epsilon)=\frac{a'_t}{a_t}z_t-\frac{b_t}{2}\lambda'_t\epsilon.\tag{10}
ENGLISH 原文

Next, we use Equation 10 to Equation 8 as a noise-prediction :

中文译文

接下来,我们利用式(10),将式(8)重新参数化为噪声预测目标:

LCFM=Et,pt(z∣ϵ),p(ϵ)∥vΘ(z,t)−at′atz+bt2λt′ϵ∥22,(11)\mathcal L_{CFM}=\mathbb E_{t,p_t(z\mid\epsilon),p(\epsilon)}\left\|v_\Theta(z,t)-\frac{a'_t}{a_t}z+\frac{b_t}{2}\lambda'_t\epsilon\right\|_2^2,\tag{11}
=Et,pt(z∣ϵ),p(ϵ)[(−bt2λt′)2∥ϵΘ(z,t)−ϵ∥22],(12)=\mathbb E_{t,p_t(z\mid\epsilon),p(\epsilon)}\left[\left(-\frac{b_t}{2}\lambda'_t\right)^2\|\epsilon_\Theta(z,t)-\epsilon\|_2^2\right],\tag{12}
ENGLISH 原文

where we defined ϵΘ≔−2λt′​bt​(vΘ−at′at​z).

中文译文

其中,我们定义 ϵΘ:=−2λt′bt(vΘ−at′atz)\epsilon_\Theta:=-\frac{2}{\lambda'_t b_t}(v_\Theta-\frac{a'_t}{a_t}z)。

ENGLISH 原文

Note that the of the above does not change when introducing a time-dependent . , one can various weighted that provide a signal towards the desired solution but might affect the . For a unified analysis of different approaches, including classic diffusion , we can write the objective in the following form (following Kingma & Gao (2023)):

中文译文

注意,引入依赖时间的权重不会改变上述目标的最优解。因此,可以推导出多种加权损失函数,它们都为所需解提供学习信号,但可能影响优化轨迹。为了统一分析不同方法,包括经典扩散形式,我们可以将目标写成如下形式(遵循 Kingma & Gao, 2023):

Lw(x0)=−12Et∼U(t),ϵ∼N(0,I)[wtλt′∥ϵΘ(zt,t)−ϵ∥2],\mathcal L_w(x_0)=-\frac12\mathbb E_{t\sim\mathcal U(t),\epsilon\sim\mathcal N(0,I)}\left[w_t\lambda'_t\|\epsilon_\Theta(z_t,t)-\epsilon\|^2\right],
ENGLISH 原文

where wt=−12​λt′​bt2 corresponds to ℒC​F​M.

中文译文

其中,wt=−12λt′bt2w_t=-\frac12\lambda'_t b_t^2 对应 LCFM\mathcal L_{CFM}。

译注 2: 原文将 λt\lambda_t 称为信噪比,但该定义实际是对数信噪比(log-SNR)。本文后续也使用 log-SNR 一词。

3. Flow Trajectories3. 流轨迹

ENGLISH 原文

In this work, we consider different of the above formalism that we briefly describe in the following.

中文译文

在这项工作中,我们考虑上述形式体系的不同变体,并在下文作简要介绍。

ENGLISH 原文

Rectified Flows (RFs) (Liu et al., 2022; Albergo & Vanden-Eijnden, 2022; Lipman et al., 2023) define the as straight paths between the data distribution and a , i.e.

中文译文

整流流。 整流流(RF;Liu et al., 2022; Albergo & Vanden-Eijnden, 2022; Lipman et al., 2023)将前向过程定义为数据分布与标准正态分布之间的直线路径,即

zt=(1−t)x0+tϵ,(13)z_t=(1-t)x_0+t\epsilon,\tag{13}
ENGLISH 原文

and uses ℒC​F​M which then corresponds to wtRF=t1−t. The network output directly the vΘ.

中文译文

并使用 LCFM\mathcal L_{CFM},此时它对应于 wtRF=t/(1−t)w_t^{RF}=t/(1-t)。网络输出直接参数化速度 vΘv_\Theta。

ENGLISH 原文

EDM EDM (Karras et al., 2022) uses a of the form

中文译文

EDM。 EDM(Karras et al., 2022)使用如下形式的前向过程:

zt=x0+btϵ,(14)z_t=x_0+b_t\epsilon,\tag{14}
ENGLISH 原文

where (Kingma & Gao, 2023) bt=exp⁡F𝒩−1​(t|Pm,Ps2) with F𝒩−1 being the of the normal distribution with mean Pm and Ps2. Note that this choice results in

中文译文

其中(Kingma & Gao, 2023),bt=exp⁡FN−1(t∣Pm,Ps2)b_t=\exp F_{\mathcal N}^{-1}(t\mid P_m,P_s^2),FN−1F_{\mathcal N}^{-1} 是均值为 PmP_m、方差为 Ps2P_s^2 的正态分布的分位数函数。注意,这一选择使得

λt∼N(−2Pm,(2Ps)2),t∼U(0,1).(15)\lambda_t\sim\mathcal N(-2P_m,(2P_s)^2),\qquad t\sim\mathcal U(0,1).\tag{15}
ENGLISH 原文

The network is through an F-prediction (Kingma & Gao, 2023; Karras et al., 2022) and the loss can be written as ℒwtEDM with

中文译文

该网络通过 F 预测进行参数化(Kingma & Gao, 2023; Karras et al., 2022),损失可写为 LwtEDM\mathcal L_{w_t^{EDM}},其中

wtEDM=N(λt∣−2Pm,(2Ps)2)(e−λt+0.52).(16)w_t^{EDM}=\mathcal N(\lambda_t\mid-2P_m,(2P_s)^2)(e^{-\lambda_t}+0.5^2).\tag{16}
ENGLISH 原文

Cosine (Nichol & Dhariwal, 2021) proposed a of the form

中文译文

余弦。 Nichol & Dhariwal(2021)提出了如下形式的前向过程:

zt=cos⁡(π2t)x0+sin⁡(π2t)ϵ.(17)z_t=\cos\left(\frac\pi2t\right)x_0+\sin\left(\frac\pi2t\right)\epsilon.\tag{17}
ENGLISH 原文

In combination with an ϵ- and loss, this corresponds to a wt=sech⁡(λt/2). When combined with a v-prediction loss (Kingma & Gao, 2023), the weighting is given by wt=e−λt/2.

中文译文

当它与 ϵ\epsilon 参数化及相应损失结合时,对应的权重为 wt=sech⁡(λt/2)w_t=\operatorname{sech}(\lambda_t/2)。当它与 vv 预测损失结合时(Kingma & Gao, 2023),权重为 wt=e−λt/2w_t=e^{-\lambda_t/2}。

ENGLISH 原文

(LDM-)Linear LDM (Rombach et al., 2022) uses a modification of the DDPM (Ho et al., 2020). Both are preserving schedules, i.e. bt=1−at2, and define at for discrete t=0,…,T−1 diffusion coefficients βt as at=(∏s=0t(1−βs))12. For given boundary values β0 and βT−1, DDPM uses βt=β0+tT−1​(βT−1−β0) and LDM uses βt=(β0+tT−1​(βT−1−β0))2.

中文译文

(LDM)线性。 LDM(Rombach et al., 2022)使用了 DDPM 调度(Ho et al., 2020)的一种修改形式。两者都是方差保持调度,即 bt=1−at2b_t=\sqrt{1-a_t^2},并针对离散时间步 t=0,…,T−1t=0,\ldots,T-1,通过扩散系数 βt\beta_t 定义 at=(∏s=0t(1−βs))1/2a_t=\left(\prod_{s=0}^{t}(1-\beta_s)\right)^{1/2}。给定边界值 β0\beta_0 和 βT−1\beta_{T-1},DDPM 使用 βt=β0+tT−1(βT−1−β0)\beta_t=\beta_0+\frac{t}{T-1}(\beta_{T-1}-\beta_0),而 LDM 使用 βt=(β0+tT−1(βT−1−β0))2\beta_t=\left(\sqrt{\beta_0}+\frac{t}{T-1}(\sqrt{\beta_{T-1}}-\sqrt{\beta_0})\right)^2。

3.1. Tailored SNR Samplers for RF models3.1. 为 RF 模型定制的 SNR 采样器

ENGLISH 原文

The RF loss trains the vΘ uniformly on all in [0,1]. , however, the resulting velocity prediction target ϵ−x0 is more difficult for t in the middle of [0,1], since for t=0, the optimal prediction is the mean of p1, and for t=1 the optimal prediction is the mean of p0. In general, changing the distribution over t from the commonly used 𝒰⁡(t) to a distribution with π⁡(t) is equivalent to a weighted loss ℒwtπ with

中文译文

RF 损失在 [0,1][0,1] 的所有时间步上均匀地训练速度 vΘv_\Theta。不过,直观而言,当 tt 位于 [0,1][0,1] 中间位置时,由此产生的速度预测目标 ϵ−x0\epsilon-x_0 更难预测,因为在 t=0t=0 时,最优预测是 p1p_1 的均值,而在 t=1t=1 时,最优预测是 p0p_0 的均值。一般而言,将 tt 的分布从常用的均匀分布 U(t)\mathcal U(t) 改为密度为 π(t)\pi(t) 的分布,等价于使用加权损失 Lwtπ\mathcal L_{w_t^\pi},其中

wtπ=t1−tπ(t).(18)w_t^\pi=\frac{t}{1-t}\pi(t).\tag{18}
ENGLISH 原文

, we aim to give more weight to by them more frequently. Next, we describe the timestep π⁡(t) that we use to train our models.

中文译文

因此,我们希望通过更频繁地采样中间时间步,赋予它们更大的权重。接下来,我们描述训练模型时使用的时间步密度 π(t)\pi(t)。

译注 3: 上述端点处“最优预测是均值”的说法为原文表述。若严格针对速度目标 ϵ−x0\epsilon-x_0,则条件最优速度在 t=0t=0 时为 E[ϵ]−x0\mathbb E[\epsilon]-x_0,在 t=1t=1 时为 ϵ−E[x0]\epsilon-\mathbb E[x_0];只有待推断的另一端点涉及相应分布均值。

ENGLISH 原文

One option for a distribution that puts more weight on steps is the logit-normal distribution (Atchison & Shen, 1980). Its ,

中文译文

Logit 正态采样。 对中间时间步赋予更多权重的一种分布选择,是 logit 正态分布(Atchison & Shen, 1980)。它的密度为

πln(t;m,s)=1s2π1t(1−t)exp⁡(−(logit⁡(t)−m)22s2),(19)\pi_{ln}(t;m,s)=\frac{1}{s\sqrt{2\pi}}\frac{1}{t(1-t)}\exp\left(-\frac{(\operatorname{logit}(t)-m)^2}{2s^2}\right),\tag{19}
ENGLISH 原文

where logit​(t)=log⁡t1−t, has a , m, and a , s. The location parameter enables us to the training towards either data p0 (negative m) or noise p1 (positive m). As shown in Figure 11, the scale parameters controls how wide the distribution is.

In practice, we sample the random variable u from a u∼𝒩⁡(u,m,s) and map it through the standard logistic function.

中文译文

其中 logit⁡(t)=log⁡t1−t\operatorname{logit}(t)=\log\frac{t}{1-t},它有一个位置参数 mm 和一个尺度参数 ss。位置参数使我们能够将训练时间步偏向数据 p0p_0(负的 mm)或噪声 p1p_1(正的 mm)。如图 11 所示,尺度参数 ss 控制分布的宽度。在实际操作中,我们从正态分布 u∼N(u;m,s)u\sim\mathcal N(u;m,s) 中采样随机变量 uu,再通过标准 logistic 函数进行映射。

ENGLISH 原文

Mode with The always vanishes at the 0 and 1. To study whether this has adverse effects on the performance, we also use a sampling distribution with strictly positive density on [0,1]. For a scale parameter s, we define

中文译文

具有重尾的众数采样。 Logit 正态密度在端点 0 和 1 处总是趋于零。为研究这是否会对性能造成不利影响,我们还使用一种在 [0,1][0,1] 上密度严格为正的时间步采样分布。对于尺度参数 ss,我们定义

fmode(u;s)=1−u−s(cos⁡2(π2u)−1+u).(20)f_{mode}(u;s)=1-u-s\left(\cos^2\left(\frac\pi2u\right)-1+u\right).\tag{20}
ENGLISH 原文

For −1≤s≤2π−2, this function is , and we can use it to sample from the implied πmode​(t,s)=|dd​t​fmode−1​(t)|. As seen in Figure 11, the controls the degree to which either the midpoint (positive s) or the (negative s) are favored during . This also includes a uniform πmode​(t,s=0)=𝒰⁡(t) for s=0, which has been used widely in previous works on (Liu et al., 2022; Ma et al., 2024).

中文译文

当 −1≤s≤2π−2-1\leq s\leq\frac{2}{\pi-2} 时,该函数单调,因此我们可以利用它从隐含密度 πmode(t;s)=∣ddtfmode−1(t)∣\pi_{mode}(t;s)=\left|\frac{d}{dt}f_{mode}^{-1}(t)\right| 中采样。如图 11 所示,尺度参数控制采样时偏好中点(正的 ss)或端点(负的 ss)的程度。此形式也包含 s=0s=0 时的均匀加权 πmode(t;s=0)=U(t)\pi_{mode}(t;s=0)=\mathcal U(t),这种加权已广泛用于先前的整流流研究(Liu et al., 2022; Ma et al., 2024)。

ENGLISH 原文

CosMap Finally, we also consider the cosine (Nichol & Dhariwal, 2021) from Section 3 in the RF setting. , we are looking for a mapping f:u↦f⁡(u)=t,u∈[0,1], such that the matches that of the cosine schedule: 2​log⁡cos⁡(π2​u)sin⁡(π2​u)=2​log⁡1−f⁡(u)f⁡(u). Solving for f, we obtain for u∼𝒰⁡(u)

中文译文

CosMap。 最后,我们还在 RF 设置下考虑第 3 节中的余弦调度(Nichol & Dhariwal, 2021)。具体而言,我们寻找一个映射 f:u↦f(u)=tf:u\mapsto f(u)=t,u∈[0,1]u\in[0,1],使其对数信噪比与余弦调度一致:2log⁡cos⁡(πu/2)sin⁡(πu/2)=2log⁡1−f(u)f(u)2\log\frac{\cos(\pi u/2)}{\sin(\pi u/2)}=2\log\frac{1-f(u)}{f(u)}。求解 ff,对于 u∼U(u)u\sim\mathcal U(u),我们得到

t=f(u)=1−1tan⁡(πu/2)+1,(21)t=f(u)=1-\frac{1}{\tan(\pi u/2)+1},\tag{21}
ENGLISH 原文

from which we obtain the

中文译文

由此得到密度

πCosMap(t)=∣ddtf−1(t)∣=2π−2πt+2πt2.(22)\pi_{CosMap}(t)=\left|\frac{d}{dt}f^{-1}(t)\right|=\frac{2}{\pi-2\pi t+2\pi t^2}.\tag{22}

4. Text-to-Image Architecture4. 文本生成图像架构

ENGLISH 原文

For text- of images, our model has to take both , text and images, into account. We use models to suitable and then describe the of our diffusion . An overview of this is presented in Figure 2.

中文译文

为了在文本条件下采样图像,我们的模型必须同时考虑文本和图像这两种模态。我们使用预训练模型来获得合适的表示,随后描述扩散骨干网络的架构。图 2 展示了其整体概况。

ENGLISH 原文

Our general setup follows LDM (Rombach et al., 2022) for training text-to-image models in the of a . Similar to the encoding of images to , we also follow previous approaches (Saharia et al., 2022b; Balaji et al., 2022) and encode the text conditioning c using pretrained, text models. Details can be found in Section B.2.

中文译文

我们的总体设置遵循 LDM(Rombach et al., 2022),在预训练自编码器的潜在空间中训练文本生成图像模型。与将图像编码为潜在表示类似,我们也遵循先前的方法(Saharia et al., 2022b; Balaji et al., 2022),使用预训练且冻结的文本模型编码文本条件 cc。细节见附录 B.2。

ENGLISH 原文

Diffusion Our builds upon the DiT (Peebles & Xie, 2023) architecture. DiT only considers class image generation and uses a mechanism to condition the network on both the of the diffusion process and the class label. Similarly, we use of the timestep t and cvec as inputs to the modulation mechanism. However, as the text only information about the text input (Podell et al., 2023), the network also requires information from the sequence representation cctxt.

中文译文

多模态扩散骨干网络。 我们的架构建立在 DiT(Peebles & Xie, 2023)架构之上。DiT 仅考虑类别条件图像生成,并使用调制机制,将扩散过程的时间步和类别标签作为网络的条件。类似地,我们使用时间步 tt 和 cvecc_{vec} 的嵌入作为调制机制的输入。不过,由于池化后的文本表示仅保留文本输入中的粗粒度信息(Podell et al., 2023),网络还需要来自序列表示 cctxtc_{ctxt} 的信息。

ENGLISH 原文

We construct a sequence consisting of of the text and image inputs. Specifically, we add and 2×2 of the pixel x∈ℝh×w×c to a patch encoding sequence of length 12⋅h⋅12⋅w. After embedding this patch encoding and the text encoding cctxt to a common dimensionality, we the two sequences. We then follow DiT and apply a sequence of modulated and MLPs.

中文译文

我们构造一个由文本输入和图像输入嵌入组成的序列。具体而言,我们加入位置编码,并将潜在像素表示 x∈Rh×w×cx\in\mathbb R^{h\times w\times c} 的 2×22\times2 图块展平为长度为 12h⋅12w\frac12h\cdot\frac12w 的图块编码序列。在将该图块编码与文本编码 cctxtc_{ctxt} 嵌入到相同维度之后,我们拼接这两个序列。随后,我们遵循 DiT,依次应用一系列经过调制的注意力层与多层感知机(MLP)。

ENGLISH 原文

Since text and image are conceptually quite different, we use two separate sets of weights for the two . As shown in Figure 2(b), this is equivalent to having two independent transformers for each modality, but joining the sequences of the two modalities for the operation, such that both can work in their own space yet take the other one into account.

中文译文

由于文本嵌入和图像嵌入在概念上差异很大,我们为两种模态使用两套独立权重。如图 2b 所示,这等价于为每种模态分别设置一个独立的 Transformer,但在注意力操作时,将两种模态的序列合并;这样,两种表示既能在各自的空间中工作,又能考虑另一种表示。

ENGLISH 原文

For our experiments, we the size of the model the model’s depth d, i.e. the number of blocks, by setting the hidden size to 64⋅d (expanded to 4⋅64⋅d channels in the MLP blocks), and the number of attention heads equal to d.

中文译文

在规模扩展实验中,我们以模型深度 dd,即注意力块的数量,来参数化模型大小:将隐藏维度设置为 64d64d(在 MLP 块中扩展到 4⋅64d4\cdot64d 个通道),并将注意力头数设置为 dd。

原文第 5 页图示
ENGLISH 原文

Figure 2: Our model . is indicated by ⊙ and element-wise multiplication by ∗. The RMS-Norm for Q and K can be added to stabilize training runs. Best viewed zoomed in.

(a) Overview of all components.

(b) One MM-DiT block

中文译文
图 2。我们的模型架构。 拼接以 ⊙ 表示,逐元素乘法以 * 表示。可以为 Q 和 K 加入 RMS-Norm,以稳定训练。建议放大查看。(a)所有组件的概览。(b)一个 MM-DiT 块。
原文第 5 页

图中标签译文:Caption 为图像描述;Pooled 为池化输出;Linear 为线性层;MLP 为多层感知机;Sinusoidal Encoding 为正弦编码;Timestep 为时间步;Noised Latent 为加噪后的潜变量;Patching 为图块化;Positional Embedding 为位置嵌入;Modulation 为调制;Unpatching 为逆图块化;Output 为输出;Layernorm 为层归一化;Attention 为注意力;Opt. RMS-Norm 为可选的均方根归一化。图中的 77 + 77 tokens 表示两段各有 77 个 token 的序列,4096 channel 表示 4096 个通道。

5. Experiments5. 实验

5.1. Improving Rectified Flows5.1. 改进整流流

ENGLISH 原文

We aim to understand which of the approaches for training of normalizing flows as in Equation 1 is the most efficient. To enable comparisons across different approaches, we control for the algorithm, the model , the dataset and . In addition, the losses of different approaches are incomparable and also do not necessarily with the quality of output samples; we need that allow for a comparison between approaches. We train models on ImageNet (Russakovsky et al., 2014) and CC12M (Changpinyo et al., 2021), and evaluate both the training and the EMA weights of the models during training using , CLIP scores (Radford et al., 2021; Hessel et al., 2021), and FID (Heusel et al., 2017) under different sampler settings (different guidance scales and steps). We calculate the FID on CLIP features as proposed by (Sauer et al., 2021). All metrics are evaluated on the COCO-2014 validation split (Lin et al., 2014). Full details on the training and sampling are provided in Section B.3.

中文译文

我们希望理解,在式(1)所示的归一化流免模拟训练方法中,哪一种最高效。为能够比较不同方法,我们对优化算法、模型架构、数据集和采样器进行控制。此外,不同方法的损失不可直接比较,而且也不一定与输出样本的质量相关;因此,我们需要能够在不同方法之间进行比较的评估指标。我们在 ImageNet(Russakovsky et al., 2014)和 CC12M(Changpinyo et al., 2021)上训练模型,并在训练期间,使用验证损失、CLIP 分数(Radford et al., 2021; Hessel et al., 2021)和 FID(Heusel et al., 2017),在不同采样器设置下,即不同引导强度与采样步数下,评估模型的训练权重与指数移动平均(EMA)权重。我们按照 Sauer et al.(2021)提出的方法,在 CLIP 特征上计算 FID。所有指标都在 COCO-2014 验证集划分(Lin et al., 2014)上评估。训练与采样超参数的完整细节见附录 B.3。

5.1.1. Results5.1.1. 结果

ENGLISH 原文

We train each of 61 different on the two datasets. We include the following from Section 3:

中文译文

我们分别在两个数据集上训练了 61 种不同形式中的每一种。我们纳入了第 3 节中的以下变体:

ENGLISH 原文

For each run, we select the step with minimal when with EMA weights and then collect CLIP scores and FID obtained with 6 different settings both with and without EMA weights.

中文译文

对于每次训练运行,我们选择以 EMA 权重评估时验证损失最小的训练步,然后分别在使用与不使用 EMA 权重的情况下,收集 6 种不同采样器设置所得的 CLIP 分数与 FID。

ENGLISH 原文

For all 24 combinations of settings, EMA weights, and dataset choice, we rank the different using a algorithm. For this, we repeatedly compute the that are according to CLIP and FID scores, assign those variants the current iteration index, remove those variants, and continue with the remaining ones until all variants get ranked. Finally, we average those ranks over the 24 different control settings.

We present the results in Tab. 1, where we only show the two best-performing for those variants that were with different . We also show ranks where we restrict the averaging over settings with 5 steps and with 50 steps.

中文译文

对于采样器设置、EMA 权重和数据集选择的全部 24 种组合,我们使用非支配排序算法对不同形式进行排序。具体而言,我们反复计算在 CLIP 和 FID 分数上达到帕累托最优的变体,将当前迭代序号赋予这些变体,再移除它们,继续处理剩余变体,直至所有变体都得到排名。最后,我们对这 24 种不同控制设置下的排名求平均。表 1 展示了结果;对于使用不同超参数进行评估的变体,我们仅展示其中表现最好的两种。我们还展示了仅对 5 步和 50 步采样器设置求平均时的排名。

ENGLISH 原文

Table 1: Global ranking of . For this ranking, we apply averaged over EMA and non-EMA weights, two datasets and different settings.

中文译文

表 1。各变体的全局排名。 该排名采用非支配排序,并对 EMA 与非 EMA 权重、两个数据集和不同采样设置求平均。

Variant变体 Mean rank: all全部设置的平均排名 Mean rank: 5 steps5 步的平均排名 Mean rank: 50 steps50 步的平均排名
rf/lognorm(0.00, 1.00) 1.54 1.25 1.50
rf/lognorm(1.00, 0.60) 2.08 3.50 2.00
rf/lognorm(0.50, 0.60) 2.71 8.50 1.00
rf/mode(1.29) 2.75 3.25 3.00
rf/lognorm(0.50, 1.00) 2.83 1.50 2.50
eps/linear 2.88 4.25 2.75
rf/mode(1.75) 3.33 2.75 2.75
rf/cosmap 4.13 3.75 4.00
edm(0.00, 0.60) 5.63 13.25 3.25
rf 5.67 6.50 5.75
v/linear 6.83 5.75 7.75
edm(0.60, 1.20) 9.00 13.00 9.00
v/cos 9.17 12.25 8.75
edm/cos 11.04 14.25 11.25
edm/rf 13.04 15.25 13.25
edm(-1.20, 1.20) 15.58 20.25 15.00
ENGLISH 原文

We observe that rf/lognorm(0.00, 1.00) achieves a good rank. It a with uniform (rf) and confirms our hypothesis that timesteps are more important. Among all the , only rectified flow formulations with modified timestep sampling perform better than the LDM-Linear (Rombach et al., 2022) formulation (eps/linear) used previously.

中文译文

我们观察到,rf/lognorm(0.00,1.00) 始终获得较好的排名。它优于采用均匀时间步采样的整流流形式(rf),从而证实了我们关于中间时间步更加重要的假设。在所有变体中,只有修改时间步采样方式后的整流流形式,优于此前使用的 LDM-Linear(Rombach et al., 2022)形式(eps/linear)。

ENGLISH 原文

We also observe that some perform well in some settings but worse in others, e.g. rf/lognorm(0.50, 0.60) is the best-performing variant with 50 steps but much worse (average rank 8.5) with 5 sampling steps. We observe a similar behavior the two in Tab. 2. The first group shows representative variants and their metrics on both datasets with 25 sampling steps. The next group shows the variants that achieve the best CLIP and FID scores. With the exception of rf/mode(1.75), these variants typically perform very well in one metric but relatively badly in the other. , we once again observe that rf/lognorm(0.00, 1.00) achieves good performance across metrics and datasets, where it obtains the third-best scores two out of four times and once the second-best performance.

中文译文

我们还观察到,某些变体在一些设置中表现良好,却在其他设置中较差。例如,rf/lognorm(0.50,0.60) 在 50 个采样步时表现最好,但在 5 个采样步时明显更差,平均排名为 8.5。对于表 2 中的两个指标,我们也观察到了类似现象。第一组展示了具有代表性的变体,以及它们在两个数据集上使用 25 个采样步时的指标。下一组展示了取得最佳 CLIP 分数与 FID 分数的变体。除 rf/mode(1.75) 外,这些变体通常在一个指标上表现很好,在另一个指标上却相对较差。相比之下,我们再次观察到,rf/lognorm(0.00,1.00) 在不同指标和数据集上都取得良好表现,在四种情况下有两次排名第三,一次排名第二。

ENGLISH 原文

Table 2: for different . FID and CLIP scores of different variants with 25 steps. We highlight the best, second best, and third best entries.

中文译文

表 2。不同变体的指标。 使用 25 个采样步时,不同变体的 FID 与 CLIP 分数。原表对第一、第二和第三名进行了高亮显示。

Variant变体 ImageNet CLIPImageNet CLIP ImageNet FIDImageNet FID CC12M CLIPCC12M CLIP CC12M FIDCC12M FID
rf 0.247 49.70 0.217 94.90
edm(-1.20, 1.20) 0.236 63.12 0.200 116.60
eps/linear 0.245 48.42 0.222 90.34
v/cos 0.244 50.74 0.209 97.87
v/linear 0.246 51.68 0.217 100.76
rf/lognorm(0.50, 0.60) 0.256 80.41 0.233 120.84
rf/mode(1.75) 0.253 44.39 0.218 94.06
rf/lognorm(1.00, 0.60) 0.254 114.26 0.234 147.69
rf/lognorm(-0.50, 1.00) 0.248 45.64 0.219 89.70
rf/lognorm(0.00, 1.00) 0.250 45.78 0.224 89.91
ENGLISH 原文

Finally, we illustrate the behavior of different in Figure 3, where we use different colors for different groups of formulations (edm, rf, eps and v). formulations generally perform well and, compared to other formulations, their performance degrades less when reducing the number of steps.

中文译文

最后,我们在图 3 中展示了不同形式的定性表现,其中使用不同颜色表示不同形式组(edm、rf、eps 和 v)。整流流形式总体表现良好,并且与其他形式相比,当减少采样步数时,其性能下降更小。

原文第 7 页图示
ENGLISH 原文

Figure 3: are sample efficient. Rectified Flows perform better then other when fewer steps. For 25 and more steps, only rf/lognorm(0.00, 1.00) remains competitive to eps/linear.

中文译文
图 3。整流流具有较高的采样效率。 当采样步数较少时,整流流的表现优于其他形式。在 25 步及以上时,只有 rf/lognorm(0.00,1.00) 仍能与 eps/linear 竞争。横轴为采样步数,纵轴为 FID。
原文第 7 页

5.2. Improving Modality Specific Representations5.2. 改进模态专属表示

ENGLISH 原文

Having found a in the previous section that allows models to not only compete with diffusion formulations such as LDM-Linear (Rombach et al., 2022) or EDM (Karras et al., 2022), but even them, we now turn to the application of our formulation to high- text-to-image synthesis. Accordingly, the final performance of our algorithm depends not only on the training formulation, but also on the via a neural network and the quality of the image and text we use. In the following sections, we describe how we improve all these components before our final method in Section 5.3.

中文译文

上一节找到的形式使整流流模型不仅能够与 LDM-Linear(Rombach et al., 2022)或 EDM(Karras et al., 2022)等成熟扩散形式竞争,甚至超越它们;现在,我们转向将该形式应用于高分辨率文本生成图像。因此,算法的最终表现不仅依赖于训练形式,还依赖于神经网络的参数化方式,以及所使用的图像和文本表示的质量。在以下各节中,我们先介绍如何改进所有这些组件,然后在第 5.3 节扩展最终方法的规模。

5.2.1. Improved Autoencoders5.2.1. 改进自编码器

ENGLISH 原文

achieve high efficiency by operating in the of a  (Rombach et al., 2022), which maps an input RGB X∈ℝH×W×3 into a lower-dimensional space x=E⁡(X)∈ℝh×w×d. The quality of this autoencoder provides an upper bound on the achievable image quality after latent diffusion training. Similar to Dai et al. (2023), we find that increasing the number of latent channels d significantly boosts reconstruction performance, see Table 3. , predicting latents with higher d is a more difficult task, and models with increased should be able to perform better for larger d, ultimately achieving higher image quality. We confirm this hypothesis in Figure 10, where we see that the d=16 autoencoder exhibits better performance sample FID. For the remainder of this paper, we thus choose d=16.

中文译文

潜在扩散模型通过在预训练自编码器的潜在空间中运作,实现了较高效率(Rombach et al., 2022);该自编码器将输入 RGB 图像 X∈RH×W×3X\in\mathbb R^{H\times W\times3} 映射到更低维的空间 x=E(X)∈Rh×w×dx=E(X)\in\mathbb R^{h\times w\times d}。这一自编码器的重建质量,为潜在扩散训练之后所能达到的图像质量提供了上界。与 Dai et al.(2023)类似,我们发现,增加潜在通道数 dd 能显著提升重建性能,见表 3。直观而言,预测具有更大 dd 的潜变量是一项更困难的任务,因此,容量更大的模型应当能在更大的 dd 下表现得更好,最终实现更高的图像质量。我们在图 10 中证实了这一假设:可以看到,d=16d=16 的自编码器在样本 FID 方面呈现出更好的规模扩展表现。因此,在本文其余部分中,我们选择 d=16d=16。

ENGLISH 原文

Table 3: Improved . performance for different channel configurations. The downsampling factor for all models is f=8.

中文译文

表 3。改进的自编码器。 不同通道配置的重建性能指标。所有模型的下采样因子均为 f=8f=8。

Metric指标 4 channels4 通道 8 channels8 通道 16 channels16 通道
FID ↓ 2.41 1.56 1.06
感知相似性 ↓ 0.85 0.68 0.45
SSIM ↑ 0.75 0.79 0.86
PSNR ↑ 25.12 26.40 28.62

5.2.2. Improved Captions5.2.2. 改进图像描述

ENGLISH 原文

Betker et al. (2023) demonstrated that synthetically generated can greatly improve text-to-image models trained at scale. This is due to the oftentimes simplistic nature of the human-generated captions that come with large-scale image datasets, which overly focus on the image subject and usually omit details describing the background or composition of the scene, or, if applicable, displayed text (Betker et al., 2023). We follow their approach and use an off-the-shelf, vision-language model, CogVLM (Wang et al., 2023), to create for our large-scale image dataset. As synthetic captions may cause a text-to-image model to forget about certain concepts not present in the VLM’s knowledge , we use a ratio of 50 % original and 50 % synthetic captions.

中文译文

Betker et al.(2023)表明,合成生成的图像描述能够大幅改善大规模训练的文本生成图像模型。这是因为,大规模图像数据集中随附的人类生成描述往往较为简单,过度关注图像主体,通常会省略描述背景、场景构图或图中可见文字的细节(Betker et al., 2023)。我们遵循他们的方法,使用现成的最先进视觉语言模型 CogVLM(Wang et al., 2023),为大规模图像数据集创建合成标注。由于合成描述可能导致文本生成图像模型遗忘某些不在视觉语言模型知识语料中的概念,我们采用 50% 原始描述与 50% 合成描述的比例。

ENGLISH 原文

To assess the effect of training on this mix, we train two d=15 MM-DiT models for 250k steps, one on only original captions and the other on the 50/50 mix. We the trained models using the GenEval  (Ghosh et al., 2023) in Table 4. The results demonstrate that the model trained with the addition of captions clearly the model that only utilizes original captions. We use the 50/50 synthetic/original caption mix for the remainder of this work.

中文译文

为评估在这种描述混合上训练的效果,我们训练两个 d=15d=15 的 MM-DiT 模型,各训练 25 万步,其中一个仅使用原始描述,另一个使用 50/50 混合。我们使用 GenEval 基准(Ghosh et al., 2023)评估训练后的模型,结果见表 4。结果表明,加入合成描述进行训练的模型,明显优于仅使用原始描述的模型。因此,在本工作其余部分中,我们使用合成与原始描述各占 50% 的混合。

ENGLISH 原文

Table 4: Improved . Using a 50/50 mixing ratio of (via CogVLM (Wang et al., 2023)) and original captions improves text-to-image performance. Assessed via the GenEval (Ghosh et al., 2023) .

中文译文

表 4。改进图像描述。 以 50/50 比例混合通过 CogVLM(Wang et al., 2023)得到的合成描述与原始描述,可以提升文本生成图像性能。评估采用 GenEval(Ghosh et al., 2023)基准。

Category类别 Original captions: success (%)原始描述成功率(%) 50/50 mix: success (%)50/50 混合成功率(%)
颜色属性归属 11.75 24.75
颜色 71.54 68.09
位置 6.50 18.00
计数 33.44 41.56
单个物体 95.00 93.75
两个物体 41.41 52.53
总体得分 43.27 49.78

5.2.3. Improved Text-to-Image Backbones5.2.3. 改进文本生成图像骨干网络

ENGLISH 原文

In this section, we compare the performance of existing transformer-based diffusion with our novel transformer-based diffusion backbone, MM-DiT, as introduced in Section 4. MM-DiT is specifically designed to handle different domains, here text and image tokens, using (two) different sets of trainable model weights. More specifically, we follow the experimental setup from Section 5.1 and compare text-to-image performance on CC12M of DiT, CrossDiT (DiT but with cross-attending to the text tokens instead of sequence-wise  (Chen et al., 2023)) and our MM-DiT. For MM-DiT, we compare models with two sets of weights and three sets of weights, where the latter handles the CLIP (Radford et al., 2021) and T5 (Raffel et al., 2019) tokens (c.f. Section 4) separately. Note that DiT (w/ concatenation of text and image tokens as in Section 4) can be interpreted as a special case of MM-DiT with one shared set of weights for all . Finally, we consider the UViT (Hoogeboom et al., 2023) as a hybrid between the widely used UNets and transformer .

中文译文

在本节中,我们将现有基于 Transformer 的扩散骨干网络,与第 4 节介绍的新型多模态 Transformer 扩散骨干网络 MM-DiT 进行性能比较。MM-DiT 专门通过使用两套不同的可训练模型权重,处理不同领域的信息,在这里即文本 token 与图像 token。更具体地,我们遵循第 5.1 节的实验设置,在 CC12M 上比较 DiT、CrossDiT 和我们的 MM-DiT 的文本生成图像性能;CrossDiT 是一种 DiT 变体,它对文本 token 使用交叉注意力,而不是沿序列维度进行拼接(Chen et al., 2023)。对于 MM-DiT,我们比较使用两套权重与三套权重的模型,后者分别处理 CLIP(Radford et al., 2021)和 T5(Raffel et al., 2019)的 token(参见第 4 节)。注意,按照第 4 节将文本 token 与图像 token 拼接的 DiT,可以解释为 MM-DiT 的一个特例:所有模态共享一套权重。最后,我们还考虑了 UViT(Hoogeboom et al., 2023)架构,它是广泛使用的 U-Net 与 Transformer 变体之间的一种混合架构。

ENGLISH 原文

We analyze the behavior of these in Figure 4: Vanilla DiT underperforms UViT. The DiT CrossDiT achieves better performance than UViT, although UViT seems to learn much faster initially. Our MM-DiT variant significantly the cross-attention and vanilla variants. We observe only a small gain when using three parameter sets instead of two (at the cost of increased parameter count and VRAM usage), and opt for the former option for the remainder of this work.

中文译文

我们在图 4 中分析这些架构的收敛行为:原始 DiT 的表现不如 UViT。交叉注意力 DiT 变体 CrossDiT 的表现优于 UViT,不过 UViT 最初似乎学习得快得多。我们的 MM-DiT 变体显著优于交叉注意力变体和原始变体。我们观察到,与两套参数相比,使用三套参数仅带来很小的提升,同时会增加参数数量和显存使用量,因此本文其余部分选择前一种方案。

译注 4: 原文此处的 “former option” 指代存在歧义。结合图 2 的双流架构和后文所用模型,所采用的是两套权重方案;上述译文保留了原文“前一种方案”的措辞。

原文第 9 页图示
ENGLISH 原文

Figure 4: Training dynamics of model . Comparative analysis of DiT, CrossDiT, UViT, and MM-DiT on CC12M, focusing on , CLIP score, and FID. Our proposed MM-DiT performs favorably across all .

中文译文
图 4。模型架构的训练动态。 在 CC12M 上比较 DiT、CrossDiT、UViT 和 MM-DiT,重点考察验证损失、CLIP 分数与 FID。我们提出的 MM-DiT 在所有指标上都表现良好。图中 steps 表示训练步数,val loss 表示验证损失。
原文第 9 页

Examples and Prompts · Source Page 8原文第 8 页:生成示例与提示词

原文第 8 页图示
原文第 8 页的生成样本。以下按阅读顺序翻译提示词。
原文第 8 页
  1. ENGLISH 原文

    a space elevator, cinematic scifi art

    中文译文
    一部太空电梯,电影风格的科幻艺术。
  2. ENGLISH 原文

    A cheeseburger with juicy beef patties and melted cheese sits on top of a toilet that looks like a throne and stands in the middle of the royal chamber.

    中文译文
    一个夹着多汁牛肉饼和融化奶酪的芝士汉堡,放在一个看起来像王座的马桶上,马桶立于王室房间中央。
  3. ENGLISH 原文

    a hole in the floor of my bathroom with small gremlins living in it

    中文译文
    我家浴室地板上有一个洞,里面住着小怪物。
  4. ENGLISH 原文

    a small office made out of car parts

    中文译文
    一间用汽车零件搭建的小办公室。
  5. ENGLISH 原文

    This dreamlike digital art captures a vibrant, bird in a rainforest.

    中文译文
    这幅梦幻般的数字艺术作品,描绘了一只色彩鲜艳、如万花筒般的鸟,栖身于茂密雨林。
  6. ENGLISH 原文

    human life depicted entirely out of

    中文译文
    完全由分形构成的人类生活。
  7. ENGLISH 原文

    an origami pig on fire in the middle of a dark room with a on the floor

    中文译文
    一只着火的折纸猪,位于一个黑暗房间中央,地板上画着五芒星。
  8. ENGLISH 原文

    an old rusted robot wearing pants and a jacket riding skis in a supermarket.

    中文译文
    一个生锈的老机器人,穿着裤子和夹克,在超市里滑雪。
  9. ENGLISH 原文

    smiling cartoon dog sits at a table, coffee mug on hand, as a room goes up in flames. “This is fine,” the dog assures himself.

    中文译文
    一只微笑的卡通狗坐在桌旁,手边放着咖啡杯,房间正燃起大火。“This is fine”,小狗这样安慰自己。
  10. ENGLISH 原文

    A and creative image depicting a hybrid creature that is a mix of a waffle and a hippopotamus. This imaginative creature features the distinctive, bulky body of a hippo, but with a texture and appearance resembling a golden-brown, crispy waffle. The creature might have elements like waffle squares across its skin and a syrup-like sheen. It’s set in a environment that playfully combines a natural water habitat of a hippo with elements of a breakfast table setting, possibly including oversized utensils or plates in the background. The image should evoke a sense of playful absurdity and culinary fantasy.

    中文译文
    一幅奇趣而富有创意的图像,描绘了一种华夫饼与河马的混合生物。这种想象中的生物具有河马独特而庞大的身体,但其纹理和外观像金棕色、酥脆的华夫饼。它的皮肤上可能布满华夫饼方格,并带有糖浆般的光泽。它置身于一个超现实环境,趣味性地将河马的天然水域栖息地与早餐餐桌布置相结合,背景中可能出现超大的餐具或盘子。这幅图像应唤起一种俏皮的荒诞感和美食幻想。

5.3. Training at Scale5.3. 大规模训练

ENGLISH 原文

Before up, we filter and preencode our data to ensure safe and efficient pretraining. Then, all previous considerations of diffusion , , and data culminate in the last section, where we scale our models up to 8B parameters.

中文译文

在扩大规模之前,我们对数据进行过滤和预编码,以确保安全、高效的预训练。随后,前面对扩散形式、架构和数据的所有考量,都汇集于本节最后部分:我们将模型扩展至 80 亿参数。

5.3.1. Data Preprocessing5.3.1. 数据预处理

ENGLISH 原文

Pre-Training Training data significantly impacts a generative model’s abilities. Consequently, data filtering is effective at constraining undesirable capabilities (Nichol, 2022). Before training at sale, we filter our data for the following categories: (i) Sexual content: We use NSFW-detection models to filter for content. (ii) : We remove images for which our rating systems predict a low score. (iii) : We use a -based method to remove and semantic duplicates from the training data; see Section E.2.

中文译文

预训练缓解措施。 训练数据会显著影响生成模型的能力。因此,数据过滤是约束不期望能力的有效方式(Nichol, 2022)。在开展大规模训练之前,我们针对以下类别过滤数据:(i)性内容:我们使用 NSFW 检测模型过滤露骨内容。(ii)美学:我们移除评分系统预测为低分的图像。(iii)原样复现:我们使用基于聚类的去重方法,从训练数据中移除感知层面和语义层面的重复项;见附录 E.2。

ENGLISH 原文

Precomputing Image and Text Our model uses the output of multiple , networks as inputs ( and text encoder ). Since these outputs are constant during training, we precompute them once for the entire dataset. We provide a detailed discussion of our approach in Section E.1.

中文译文

预计算图像与文本嵌入。 我们的模型以多个预训练且冻结的网络输出作为输入,包括自编码器潜变量和文本编码器表示。由于这些输出在训练期间保持不变,我们针对整个数据集只预计算一次。附录 E.1 对这一方法进行了详细讨论。

5.3.2. Finetuning on High Resolutions5.3.2. 在高分辨率上微调

ENGLISH 原文

QK- In general, we pretrain all of our models on low- images of size 2562 pixels. Next, we our models on higher resolutions with mixed (see next paragraph for details). We find that, when moving to high resolutions, training can become unstable and the loss . This can be by switching to training — but comes with a ∼2× performance drop compared to mixed-precision training. A more efficient alternative is reported in the (discriminative) ViT literature: Dehghani et al. (2023) observe that the training of large vision transformer models diverges because the grows uncontrollably. To avoid this, Dehghani et al. (2023) propose to normalize Q and K before the operation. We follow this approach and use RMSNorm (Zhang & Sennrich, 2019) with learnable scale in both streams of our MMDiT for our models, see Figure 2. As demonstrated in Figure 5, the additional normalization prevents the attention growth instability, confirming findings by Dehghani et al. (2023) and Wortsman et al. (2023) and enables efficient training at bf16-mixed (Chen et al., 2019) precision when combined with ϵ=10−15 in the AdamW (Loshchilov & Hutter, 2017) optimizer. This technique can also be applied on pretrained models that have not used qk-normalization during pretraining: The model quickly adapts to the additional normalization layers and trains more stably. Finally, we would like to point out that although this method can generally help to stabilize the training of large models, it is not a universal recipe and may need to be adapted depending on the exact training setup.

中文译文

QK 归一化。 一般而言,我们首先在分辨率为 2562256^2 像素的低分辨率图像上预训练所有模型。接下来,我们在具有混合宽高比的更高分辨率图像上微调模型,细节见下一段。我们发现,转向高分辨率时,混合精度训练可能变得不稳定,损失会发散。切换到全精度训练可以解决这一问题,但相较混合精度训练,性能会下降约 2 倍。关于判别式视觉 Transformer(ViT)的文献报道了一种更高效的替代方案:Dehghani et al.(2023)观察到,大型视觉 Transformer 模型的训练会因注意力熵不受控制地增长而发散。为避免这一情况,Dehghani et al.(2023)提出,在注意力操作之前对 Q 和 K 进行归一化。我们遵循这一做法,在模型的 MM-DiT 架构的两个流中,都使用具有可学习缩放参数的 RMSNorm(Zhang & Sennrich, 2019),见图 2。如图 5 所示,额外的归一化防止了注意力 logit 增长引起的不稳定性,验证了 Dehghani et al.(2023)和 Wortsman et al.(2023)的发现;当它与 AdamW 优化器(Loshchilov & Hutter, 2017)中的 ϵ=10−15\epsilon=10^{-15} 结合时,能够在 bf16 混合精度下高效训练(Chen et al., 2019)。这项技术也可用于预训练阶段未使用 QK 归一化的模型:模型会迅速适应额外的归一化层,并更稳定地训练。最后,我们希望指出,尽管这种方法通常有助于稳定大型模型的训练,但它并非通用配方,可能需要根据具体训练设置进行调整。

译注 5: 原文正文写的是“注意力熵不受控制地增长”,而图 5 图注写的是“注意力 logit 增长导致注意力熵塌缩”。二者存在不一致。此处分别按原文翻译,以免把译者修正误当作作者原文。

原文第 9 页图示
ENGLISH 原文

Figure 5: Effects of QK-. Normalizing the Q- and K- before calculating the matrix prevents the attention- growth (left), which causes the to collapse (right) and has been previously reported in the discriminative ViT literature (Dehghani et al., 2023; Wortsman et al., 2023). with these previous works, we observe this instability in the last transformer blocks of our networks. Maximum attention logits and attention entropies are shown averaged over the last 5 blocks of a 2B (d=24) model.

中文译文
图 5。QK 归一化的效果。 在计算注意力矩阵之前,对 Q 与 K 嵌入进行归一化,能够防止注意力 logit 增长带来的不稳定性(左图);这种不稳定性会导致注意力熵塌缩(右图),且此前已在判别式 ViT 文献中报道(Dehghani et al., 2023; Wortsman et al., 2023)。与这些先前工作不同,我们在网络最后几个 Transformer 块中观察到这一不稳定性。图中显示的是一个 20 亿参数模型(d=24)最后 5 个块的最大注意力 logit 和注意力熵的平均值。
原文第 9 页
ENGLISH 原文

for Varying After training on a fixed 256×256 we aim to (i) increase the resolution and resolution and (ii) enable with flexible aspect ratios. Since we use 2d positional frequency we have to adapt them based on the resolution. In the multi-aspect ratio setting, a direct of the embeddings as in (Dosovitskiy et al., 2020) would not reflect the side lengths correctly. Instead we use a combination of extended and interpolated position grids which are subsequently frequency embedded.

中文译文

适用于不同宽高比的位置编码。 在固定的 256×256256\times256 分辨率上训练之后,我们希望:(i)提高分辨率和分辨率;(ii)使推理能够使用灵活的宽高比。由于我们使用二维位置频率嵌入,必须根据分辨率对其进行调整。在多宽高比设置中,像 Dosovitskiy et al.(2020)那样直接对嵌入进行插值,无法正确反映边长。因此,我们结合扩展与插值的位置网格,再对其进行频率嵌入。

译注 6: “提高分辨率和分辨率”中的重复来自原文 “increase the resolution and resolution”,为明显的文字重复。

ENGLISH 原文

For a target of S2 pixels, we use (NovelAI, 2022; Podell et al., 2023) such that that each batch consists of images of a homogeneous size H×W, where H⋅W≈S2. For the maximum and minimum training , this results in the maximum values for width, Wmax, and height, Hmax, that will be encountered. Let hmax=Hmax/16,wmax=Wmax/16 and s=S/16 be the corresponding sizes in (a factor 8) after (a factor 2). Based on these values, we construct a vertical position grid with the values ((p−hmax−s2)⋅256S)p=0hmax−1 and correspondingly for the horizontal positions. We then from the resulting positional 2d grid before it.

中文译文

对于目标分辨率 S2S^2 像素,我们使用分桶采样(NovelAI, 2022; Podell et al., 2023),使每个批次都由尺寸相同的 H×WH\times W 图像组成,且 H⋅W≈S2H\cdot W\approx S^2。对于训练中的最大和最小宽高比,这就确定了会遇到的最大宽度 WmaxW_{max} 和最大高度 HmaxH_{max}。令 hmax=Hmax/16h_{max}=H_{max}/16、wmax=Wmax/16w_{max}=W_{max}/16 和 s=S/16s=S/16 为经过潜在空间下采样(因子为 8)和图块化(因子为 2)后的相应尺寸。基于这些值,我们构造垂直位置网格,其取值为

((p−hmax−s2)256S)p=0hmax−1,\left(\left(p-\frac{h_{max}-s}{2}\right)\frac{256}{S}\right)_{p=0}^{h_{max}-1},

水平方向的位置也以相同方式构造。随后,我们对所得二维位置网格进行中心裁剪,再对其嵌入。

ENGLISH 原文

-dependent shifting of , since higher resolutions have more pixels, we need more noise to destroy their signal. Assume we are working in a resolution with n=H⋅W pixels. Now, consider a ”constant” image, i.e. one where every pixel has the value c. The forward process produces zt=(1−t)​c​𝟙+t​ϵ, where both 𝟙 and ϵ∈ℝn. , zt provides n observations of the random variable Y=(1−t)​c+t​η with c and η in ℝ, and η follows a . Thus, 𝔼⁡(Y)=(1−t)​c and σ⁡(Y)=t. We can therefore recover c via c=11−t​𝔼​(Y), and the error between c and its sample estimate c^=11−t​∑i=1nzt,i has a of σ⁡(t,n)=t1−t​1n (because the of the mean for Y has deviation tn). So if one already knows that the image z0 was constant across its pixels, σ⁡(t,n) represents the degree of uncertainty about z0. For example, we immediately see that doubling the width and height leads to half the uncertainty at any given time 0<t<1. But, we can now map a timestep tn at resolution n to a timestep tm at resolution m that results in the same degree of uncertainty via the ansatz σ⁡(tn,n)=σ⁡(tm,m). Solving for tm gives

中文译文

随分辨率变化的时间步调度偏移。 直观而言,由于更高分辨率具有更多像素,我们需要更多噪声才能破坏其信号。假设我们所处理的分辨率具有 n=H⋅Wn=H\cdot W 个像素。现在考虑一幅“常量”图像,也就是每个像素值都为 cc 的图像。前向过程产生 zt=(1−t)c1+tϵz_t=(1-t)c\mathbf1+t\epsilon,其中 1\mathbf1 与 ϵ\epsilon 都属于 Rn\mathbb R^n。因此,ztz_t 提供了随机变量 Y=(1−t)c+tηY=(1-t)c+t\eta 的 nn 个观测,其中 cc 和 η\eta 都属于 R\mathbb R,且 η\eta 服从标准正态分布。因此,E(Y)=(1−t)c\mathbb E(Y)=(1-t)c,σ(Y)=t\sigma(Y)=t。所以,我们可以通过 c=11−tE(Y)c=\frac{1}{1-t}\mathbb E(Y) 恢复 cc,而 cc 与其样本估计 c^=11−t∑i=1nzt,i\hat c=\frac{1}{1-t}\sum_{i=1}^n z_{t,i} 之间误差的标准差为 σ(t,n)=t1−t1n\sigma(t,n)=\frac{t}{1-t}\sqrt{\frac1n},因为 YY 的均值标准误差为 t/nt/\sqrt n。因此,如果预先知道图像 z0z_0 的所有像素取值相同,那么 σ(t,n)\sigma(t,n) 就代表对 z0z_0 的不确定程度。例如,我们立即可以看出,将宽度和高度都加倍,会使任意给定时刻 0<t<10<t<1 的不确定性减半。不过,我们现在可以借助设定 σ(tn,n)=σ(tm,m)\sigma(t_n,n)=\sigma(t_m,m),将分辨率 nn 下的时间步 tnt_n 映射到分辨率 mm 下具有相同不确定程度的时间步 tmt_m。解出 tmt_m 得到

tm=m/n tn1+(m/n−1)tn.(23)t_m=\frac{\sqrt{m/n}\,t_n}{1+(\sqrt{m/n}-1)t_n}.\tag{23}

译注 7: 原文的样本估计式遗漏了均值中的 1/n1/n 因子。与后续标准误差推导一致的形式应为 c^=11−t1n∑i=1nzt,i\hat c=\frac{1}{1-t}\frac1n\sum_{i=1}^n z_{t,i}。正文保留原式,并在此指出。

ENGLISH 原文

We visualize this shifting function in Figure 6. Note that the assumption of constant images is not realistic. To find good values for the shift value α≔mn during , we apply them to the steps of a model trained at 1024×1024 and run a human study. The results in Figure 6 show a strong preference for samples with shifts greater than 1.5 but less drastic differences among the higher shift values. In our subsequent experiments, we use a shift value of α=3.0 both during training and sampling at resolution 1024×1024. A comparison between samples after 8k training steps with and without such a shift can be found in Figure 6. Finally, note that Equation 23 implies a shift of log⁡nm similar to (Hoogeboom et al., 2023):

中文译文

我们在图 6 中将这一偏移函数可视化。注意,常量图像假设并不现实。为在推理期间找到合适的偏移值 α:=m/n\alpha:=\sqrt{m/n},我们将这些偏移应用于一个在 1024×10241024\times1024 分辨率上训练的模型的采样步,并开展人类偏好研究。图 6 的结果表明,人类明显偏好偏移大于 1.5 的样本,但在更大的偏移值之间,差异并不那么显著。因此,在后续实验中,我们在 1024×10241024\times1024 分辨率的训练与采样阶段都使用 α=3.0\alpha=3.0 的偏移值。图 6 给出了经过 8000 个训练步后,使用与不使用此偏移时样本的定性比较。最后,注意式(23)意味着一个 log⁡(n/m)\log(n/m) 的 log-SNR 偏移,与 Hoogeboom et al.(2023)类似:

λtm=2log⁡1−tnm/n tn,(24)\lambda_{t_m}=2\log\frac{1-t_n}{\sqrt{m/n}\,t_n},\tag{24}
=λtn−2log⁡α=λtn−log⁡mn.(25)=\lambda_{t_n}-2\log\alpha=\lambda_{t_n}-\log\frac mn.\tag{25}
ENGLISH 原文

After the shifted training at 1024×1024, we align the model using (DPO) as described in Appendix C.

中文译文

在 1024×10241024\times1024 分辨率下完成带偏移的训练之后,我们按照附录 C 的描述,使用直接偏好优化(DPO)对齐模型。

原文第 10 页图示
ENGLISH 原文

Figure 6: shifting at higher resolutions. Top right: Human quality rating when applying the shifting based on Equation 23. Bottom row: A 5122 model trained and sampled with m/n=1.0 (top) and m/n=3.0 (bottom). See Section 5.3.2.

中文译文
图 6。更高分辨率下的时间步偏移。 右上:应用基于式(23)的偏移时,人类对质量的偏好评分。下方样本行:以 √(m/n)=1.0(上排)和 √(m/n)=3.0(下排)训练并采样的 512² 模型。见第 5.3.2 节。图中 shift 表示偏移值。
原文第 10 页

5.3.3. Results5.3.3. 结果

ENGLISH 原文

In Figure 8, we examine the effect of training our MM-DiT at scale. For images, we conduct a large study and train models with different numbers of parameters for 500k steps on 2562 pixels using preencoded data, c.f. Section E.1, with a of 4096. We train on 2×2  (Peebles & Xie, 2023), and report on the CoCo dataset (Lin et al., 2014) every 50k steps. , to reduce noise in the validation loss signal, we sample loss levels equidistant in t∈(0,1) and compute validation loss for each level separately. We then average the loss across all but the last (t=1) levels.

中文译文

在图 8 中,我们考察了大规模训练 MM-DiT 的效果。对于图像,我们开展一项大规模扩展研究,使用预编码数据(参见附录 E.1),以 4096 的批大小,在 2562256^2 像素分辨率下,对不同参数数量的模型训练 50 万步。我们使用 2×22\times2 图块进行训练(Peebles & Xie, 2023),并每隔 5 万步报告一次 COCO 数据集(Lin et al., 2014)上的验证损失。具体而言,为减少验证损失信号中的噪声,我们在 t∈(0,1)t\in(0,1) 中等间距采样损失评估层级,并分别计算各层级的验证损失。随后,我们对除最后一个(t=1t=1)以外的所有层级损失求平均。

译注 8: 原文同时写了开区间 t∈(0,1)t\in(0,1) 与“最后一个 t=1t=1 层级”,存在端点表述不一致;译文保留这两处说法。

ENGLISH 原文

Similarly, we conduct a study of our MM-DiT on videos. To this end we start from the image weights and additionally use a 2x temporal . We follow Blattmann et al. (2023b) and feed data to the pretrained model by collapsing the temporal into the batch axis. In each layer we rearrange the in the visual stream and add a full attention over all tokens after the spatial attention operation before the final feedforward layer. Our video models are trained for 140k steps with a of 512 on videos comprising 16 frames with 2562 pixels. We report on the Kinetics dataset (Carreira & Zisserman, 2018) every 5k steps. Note that our reported for video training in Figure 8 are only FLOPs from video training and do not include the FLOPs from image pretraining.

中文译文

类似地,我们对 MM-DiT 在视频上的规模扩展开展了初步研究。为此,我们从预训练的图像权重开始,并额外使用 2 倍时间图块化。我们遵循 Blattmann et al.(2023b),将时间轴折叠到批次轴中,以将数据输入预训练模型。在每个注意力层中,我们重新排列视觉流中的表示,并在空间注意力操作之后、最终前馈层之前,加入覆盖全部时空 token 的全注意力。我们的视频模型以 512 的批大小,在包含 16 帧、每帧 2562256^2 像素的视频上训练 14 万步。我们每隔 5000 步报告一次 Kinetics 数据集(Carreira & Zisserman, 2018)上的验证损失。注意,图 8 中报告的视频训练 FLOPs 只包含视频训练的浮点运算量,不包含图像预训练的浮点运算量。

ENGLISH 原文

For both the image and video domains, we observe a smooth decrease in the when increasing model size and training steps. We find the validation loss to be highly to (CompBench (Huang et al., 2023), GenEval (Ghosh et al., 2023)) and to human . These results support the validation loss as a simple and general measure of model performance. Our results do not show neither for image not for video models.

中文译文

对于图像与视频两个领域,我们都观察到,随着模型大小和训练步数增加,验证损失平滑下降。我们发现,验证损失与综合评估指标(CompBench,Huang et al., 2023;GenEval,Ghosh et al., 2023)及人类偏好高度相关。这些结果支持将验证损失用作一种简单、通用的模型性能衡量标准。无论对图像模型还是视频模型,我们的结果都没有显示出饱和。

ENGLISH 原文

Figure 12 illustrates how training a larger model for longer impacts sample quality. Tab. 5 shows the results of GenEval in full. When applying the methods presented in Section 5.3.2 and increasing training image , our biggest model excels in most categories and DALLE 3 (Betker et al., 2023), the current state of the art in prompt comprehension, in overall score.

中文译文

图 12 展示了以更长时间训练更大模型如何影响样本质量。表 5 完整展示了 GenEval 的结果。当应用第 5.3.2 节介绍的方法并提高训练图像分辨率后,我们最大的模型在多数类别中表现优异,而且在总体得分上超过了当时提示词理解方面最先进的 DALL-E 3(Betker et al., 2023)。

ENGLISH 原文

Table 5: GenEval comparisons. Our largest model (depth=38) all current open models and DALLE-3 (Betker et al., 2023) on GenEval (Ghosh et al., 2023). We highlight the best, second best, and third best entries. For DPO, see Appendix C.

中文译文

表 5。GenEval 比较。 我们最大的模型(depth=38)在 GenEval(Ghosh et al., 2023)上超过所有当时的开放模型和 DALL-E 3(Betker et al., 2023)。原表高亮显示第一、第二和第三名。DPO 见附录 C。

Model模型 Overall总体 Single object单个物体 Two objects两个物体 Counting计数 Colors颜色 Position位置 Color attribution颜色属性归属
minDALL-E 0.23 0.73 0.11 0.12 0.37 0.02 0.01
SD v1.5 0.43 0.97 0.38 0.35 0.76 0.04 0.06
PixArt-alpha 0.48 0.98 0.50 0.44 0.80 0.08 0.07
SD v2.1 0.50 0.98 0.51 0.44 0.85 0.07 0.17
DALL-E 2 0.52 0.94 0.66 0.49 0.77 0.10 0.19
SDXL 0.55 0.98 0.74 0.39 0.85 0.15 0.23
SDXL Turbo 0.55 1.00 0.72 0.49 0.80 0.10 0.18
IF-XL 0.61 0.97 0.74 0.66 0.81 0.13 0.35
DALL-E 3 0.67 0.96 0.87 0.47 0.83 0.43 0.45
本文(深度 18),512² 0.58 0.97 0.72 0.52 0.78 0.16 0.34
本文(深度 24),512² 0.62 0.98 0.74 0.63 0.67 0.34 0.36
本文(深度 30),512² 0.64 0.96 0.80 0.65 0.73 0.33 0.37
本文(深度 38),512² 0.68 0.98 0.84 0.66 0.74 0.40 0.43
本文(深度 38),512²,使用 DPO 0.71 0.98 0.89 0.73 0.83 0.34 0.47
本文(深度 38),1024²,使用 DPO 0.74 0.99 0.94 0.72 0.89 0.33 0.60
ENGLISH 原文

Our d=38 model current  (Betker et al., 2023; ide, 2024) and open (Sauer et al., 2023; pla, 2024; Chen et al., 2023; Pernias et al., 2023) SOTA generative image models in human on the Parti-prompts  (Yu et al., 2022) in the categories visual , and generation, c.f. Figure 7. For evaluating human preference in these categories, raters were shown pairwise outputs from two models, and asked to answer the following questions:
Prompt following: Which image looks more representative to the text shown above and faithfully follows it?
Visual aesthetics: Given the prompt, which image is of higher-quality and aesthetically more pleasing?
Typography: Which image more accurately shows/displays the text specified in the above description? More accurate spelling is preferred! Ignore other aspects.

中文译文

我们的 d=38d=38 模型,在 Parti-prompts 基准(Yu et al., 2022)上的人类偏好评估中,于视觉美学、提示词遵循和文字排印生成三个类别,超过当前最先进的专有生成图像模型(Betker et al., 2023; ide, 2024)和开放模型(Sauer et al., 2023; pla, 2024; Chen et al., 2023; Pernias et al., 2023),参见图 7。为评估这些类别中的人类偏好,我们向评分者展示两个模型的成对输出,并请他们回答以下问题:

提示词遵循: 哪幅图像看起来更能代表上方显示的文本,并忠实地遵循它?

视觉美学: 给定提示词,哪幅图像质量更高,在美学上更令人愉悦?

文字排印: 哪幅图像更准确地展示了上方描述所指定的文字?优先选择拼写更准确的图像!忽略其他方面。

原文第 10 页图示
ENGLISH 原文

Figure 7: Human against currrent closed and open SOTA generative image models. Our 8B model compares favorable against current text-to-image models when evaluated on the parti-prompts (Yu et al., 2022) across the categories visual quality, and generation.

中文译文
图 7。与当前闭源及开放的最先进生成图像模型进行人类偏好比较。 在 Parti-prompts(Yu et al., 2022)上,从视觉质量、提示词遵循和文字排印生成三个类别评估时,我们的 80 亿参数模型与当前最先进的文本生成图像模型相比表现良好。Visual aesthetics 为视觉美学;Prompt following 为提示词遵循;Typography 为文字排印;Ours w/o T5 为本文模型不使用 T5。
原文第 10 页
ENGLISH 原文

Lastly, Table 6 highlights an intriguing result: not only do bigger models perform better, they also require fewer steps to reach their peak performance.

中文译文

最后,表 6 突出展示了一个有趣的结果:更大的模型不仅表现更好,而且达到峰值性能所需的步数也更少。

ENGLISH 原文

Table 6: Impact of model size on efficiency. The table shows the relative performance decrease relative to CLIP scores using 50 sampling steps at a fixed seed. Larger models can be sampled using fewer steps, which we attribute to increased and better fitting the straight-path of models, resulting in shorter path lengths. Path length is calculated by summing up ‖vθ⋅d​t‖ over 50 steps.

中文译文

表 6。模型大小对采样效率的影响。 本表展示在固定随机种子下,相对于使用 50 个采样步评估的 CLIP 分数的性能相对下降。较大的模型可以使用较少的步数采样,我们将其归因于更高的稳健性以及对整流流模型直线路径目标的更好拟合,后者会带来更短的路径长度。路径长度通过在 50 个步上累加 ∥vθ dt∥\|v_\theta\,dt\| 计算。

Model模型 5/50 steps: CLIP drop (%)5/50 步 CLIP 相对下降(%) 10/50 steps (%)10/50 步(%) 20/50 steps (%)20/50 步(%) Path length路径长度
depth=15 4.30 0.86 0.21 191.13
depth=30 3.59 0.70 0.24 187.96
depth=38 2.71 0.14 0.08 185.96
原文第 12 页图示
ENGLISH 原文

Figure 8: effects of . We analyze the impact of model size on performance, maintaining training throughout. An exception is depth=38, where adjustments at 3×105 steps were necessary to prevent . (Top) smoothly decreases as a function of both model size and training steps for both image (columns 1 and 2) and video models (columns 3 and 4). (Bottom) Validation loss is a strong predictor of overall model performance. There is a marked between validation loss and image , including GenEval (Ghosh et al., 2023), column 1, human , column 2, and T2I-CompBench (Huang et al., 2023), column 3. For video models we observe a similar correlation between validation loss and human preference, column 4. .

中文译文
图 8。规模扩展的定量影响。 我们在保持训练超参数一致的前提下,分析模型大小对性能的影响。depth=38 是一个例外:为防止发散,需要在 30 万步时调整学习率。(上排)对于图像模型(第 1、2 列)和视频模型(第 3、4 列),验证损失都随着模型大小和训练步数的增加而平滑下降。(下排)验证损失能够有力地预测模型的总体性能。验证损失与全面的图像评估指标之间存在明显相关性,这些指标包括 GenEval(Ghosh et al., 2023,第 1 列)、人类偏好(第 2 列)和 T2I-CompBench(Huang et al., 2023,第 3 列)。对于视频模型,我们也观察到验证损失与人类偏好之间存在类似相关性(第 4 列)。图中的 train steps 为训练步数,FLOPs 为浮点运算量,validation loss 为验证损失,human preference 为人类偏好。
原文第 12 页
ENGLISH 原文

Flexible Text Encoders While the main motivation for using multiple text-encoders is boosting the overall model performance (Balaji et al., 2022), we now show that this choice additionally increases the flexibility of our MM-DiT-based during . As described in Section B.3 we train our model with three text encoders, with an individual drop-out rate of 46.3%. , at inference time, we can use an arbitrary subset of all three text encoders. This offers means for model performance for improved memory efficiency, which is particularly relevant for the 4.7B parameters of T5-XXL (Raffel et al., 2019) that require significant amounts of VRAM. Interestingly, we observe limited performance drops when using only the two CLIP-based text-encoders for the text prompts and replacing the T5 by zeros. We provide a visualization in Figure 9. Only for complex prompts involving either highly detailed descriptions of a scene or larger amounts of written text do we find significant performance gains when using all three text-encoders. These observations are also verified in the human results in Figure 7 (Ours w/o T5). Removing T5 has no effect on quality ratings (50% win rate), and only a small impact on (46% win rate), its contribution to the capabilities of generating written text are more significant (38% win rate).

中文译文

灵活的文本编码器。 虽然使用多个文本编码器的主要动机是提高模型的总体性能(Balaji et al., 2022),但我们现在表明,这一选择还提高了基于 MM-DiT 的整流流在推理期间的灵活性。如附录 B.3 所述,我们使用三个文本编码器训练模型,各自的独立丢弃率为 46.3%。因此,在推理时,我们可以使用这三个文本编码器的任意子集。这提供了一种用模型性能换取更高内存效率的方式,对于具有 47 亿参数、需要大量显存的 T5-XXL(Raffel et al., 2019)尤其有意义。有趣的是,当我们仅使用两个基于 CLIP 的文本编码器来处理提示词,并将 T5 嵌入替换为零时,观察到的性能下降有限。图 9 提供了定性可视化。只有对于包含非常详细场景描述或大量书写文字的复杂提示词,我们才发现使用全部三个文本编码器会带来显著的性能提升。这些观察也得到了图 7 中人类偏好评估结果(Ours w/o T5)的验证。移除 T5 不影响美学质量评分(胜率 50%),对提示词遵循的影响也很小(胜率 46%),但它对生成书写文字能力的贡献更加显著(胜率 38%)。

译注 9: 本节原文写 46.3%,附录 B.3 写 46.4%;译文分别保留。

原文第 12 页图示
ENGLISH 原文

Figure 9: Impact of T5. We observe T5 to be important for complex prompts e.g. such involving a high degree of detail or longer spelled text (rows 2 and 3). For most prompts, however, we find that removing T5 at time still achieves competitive performance.

中文译文
图 9。T5 的影响。 我们观察到,T5 对复杂提示词很重要,例如涉及大量细节或较长待拼写文本的提示词(第 2、3 行)。不过,对于大多数提示词,我们发现,在推理时移除 T5 仍可取得有竞争力的性能。左侧使用全部文本编码器,右侧不使用 T5(Raffel et al., 2019)。
原文第 12 页

图 9 提示词逐句译文:

  1. ENGLISH 原文

    A burger patty, with the bottom bun and lettuce and tomatoes. ”COFFEE” written on it in mustard

    中文译文
    一个汉堡肉饼,搭配底层面包、生菜和番茄。上面用芥末酱写着 “COFFEE”。
  2. ENGLISH 原文

    A monkey holding a sign reading ” transformer models is awesome!”

    中文译文
    一只猴子举着牌子,上面写着 “Scaling transformer models is awesome!”。
  3. ENGLISH 原文

    A with a playful grin squeezes itself into a large glass jar, surrounded by colorful candy. The jar sits on a wooden table in a cozy kitchen, and warm sunlight filters through a nearby window

    中文译文
    一只淘气的雪貂带着顽皮的笑容,挤进一个大玻璃罐,周围都是五颜六色的糖果。罐子放在温馨厨房中的一张木桌上,温暖的阳光从附近窗户透进来。

6. Conclusion6. 结论

ENGLISH 原文

In this work, we presented a analysis of models for text-to-image synthesis. We proposed a novel for rectified flow training that improves over previous diffusion training for and the favourable properties of rectified flows in the few-step sampling regime. We also demonstrated the advantages of our transformer-based MM-DiT that takes the nature of the text-to-image task into account. Finally, we performed a scaling study of this combination up to a model size of 8B parameters and 5×1022 training . We showed that improvements correlate with both existing text-to-image benchmarks as well as human preference evaluations. This, in combination with our improvements in generative modeling and scalable, multimodal architectures achieves performance that is competitive with state-of-the-art proprietary models. The scaling trend shows no signs of saturation, which makes us optimistic that we can continue to improve the performance of our models in the future.

中文译文

在这项工作中,我们对用于文本生成图像的整流流模型进行了规模扩展分析。我们提出了一种用于整流流训练的新时间步采样方法,它优于潜在扩散模型此前的扩散训练形式,并保留了整流流在少步采样情形下的良好性质。我们还展示了基于 Transformer 的 MM-DiT 架构的优势,该架构考虑了文本生成图像任务的多模态性质。最后,我们对这一组合开展了规模扩展研究,将模型规模扩展到 80 亿参数、训练计算量扩展到 5×10225\times10^{22} FLOPs。我们表明,验证损失的改善与现有文本生成图像基准、人类偏好评估结果均相关。这一点与我们在生成建模及可扩展多模态架构方面的改进相结合,实现了可与最先进专有模型竞争的性能。规模扩展趋势尚未出现饱和迹象,这使我们乐观地认为,未来可以继续提升模型性能。

Broader Impact更广泛的影响

ENGLISH 原文

This paper presents work whose goal is to advance the field of machine learning in general and image synthesis . There are many potential societal consequences of our work, none of which we feel must be specifically highlighted here. For an extensive discussion of the general ramifications of , we point interested readers towards (Po et al., 2023).

中文译文

本文所介绍的工作,旨在推动机器学习领域,尤其是图像合成领域的发展。我们的工作可能产生许多社会影响,但我们认为,其中没有哪一项必须在此特别强调。对于扩散模型一般影响的广泛讨论,我们建议感兴趣的读者参阅 Po et al.(2023)。

References参考文献

原文参考文献位于第 13 至 16 页。为方便核查,完整原文著录信息及各文献题名的中文翻译列于本译文末尾的“参考文献题名译文与原文著录”部分。

Supplementary补充材料

A. BackgroundA. 背景

ENGLISH 原文

(Sohl-Dickstein et al., 2015; Song et al., 2020; Ho et al., 2020) generate data by approximating the reverse ODE to a stochastic which transforms data to noise. They have become the standard approach for generative modeling of images (Dhariwal & Nichol, 2021; Ramesh et al., 2022; Saharia et al., 2022b; Rombach et al., 2022; Balaji et al., 2022) and videos (Singer et al., 2022; Ho et al., 2022; Esser et al., 2023; Blattmann et al., 2023b; Gupta et al., 2023). Since these models can be both via a on the negative likelihood (Sohl-Dickstein et al., 2015) and  (Hyvärinen, 2005; Vincent, 2011; Song & Ermon, 2020), various of forward- and reverse processes (Song et al., 2020; Dockhorn et al., 2021), model parameterizations (Ho et al., 2020; Ho & Salimans, 2022; Karras et al., 2022), loss weightings (Ho et al., 2020; Karras et al., 2022) and ODE solvers (Song et al., 2022; Lu et al., 2023; Dockhorn et al., 2022) have led to a large number of different training and procedures. More recently, the seminal works of Kingma & Gao (2023) and Karras et al. (2022) have proposed unified formulations and introduced new and practical insights for training (Karras et al., 2022; Kingma & Gao, 2023) and  (Karras et al., 2022). However, despite these improvements, the of common ODEs involve partly significant amounts of  (Karras et al., 2022; Liu et al., 2022), which requires increased amounts of solver steps and, thus, renders fast inference difficult. To overcome this, we adopt rectified flow models whose formulation allows for learning straight ODE trajectories.

中文译文

扩散模型。 扩散模型(Sohl-Dickstein et al., 2015; Song et al., 2020; Ho et al., 2020)通过近似一个将数据变成噪声的随机前向过程所对应的反向 ODE 来生成数据。它们已成为图像(Dhariwal & Nichol, 2021; Ramesh et al., 2022; Saharia et al., 2022b; Rombach et al., 2022; Balaji et al., 2022)和视频(Singer et al., 2022; Ho et al., 2022; Esser et al., 2023; Blattmann et al., 2023b; Gupta et al., 2023)生成建模的标准方法。由于这些模型既可通过负似然的变分下界(Sohl-Dickstein et al., 2015),也可通过分数匹配(Hyvärinen, 2005; Vincent, 2011; Song & Ermon, 2020)来推导,因此,不同的前向与反向过程形式(Song et al., 2020; Dockhorn et al., 2021)、模型参数化方式(Ho et al., 2020; Ho & Salimans, 2022; Karras et al., 2022)、损失加权方式(Ho et al., 2020; Karras et al., 2022)及 ODE 求解器(Song et al., 2022; Lu et al., 2023; Dockhorn et al., 2022),产生了大量不同的训练目标与采样过程。最近,Kingma & Gao(2023)和 Karras et al.(2022)的开创性工作提出了统一形式,并为训练(Karras et al., 2022; Kingma & Gao, 2023)和推理(Karras et al., 2022)带来了新的理论及实践见解。然而,尽管有这些改进,常见 ODE 的轨迹仍有部分区域具有相当大的曲率(Karras et al., 2022; Liu et al., 2022),因此需要更多求解器步数,使快速推理变得困难。为克服这一点,我们采用整流流模型,其形式允许学习直线 ODE 轨迹。

译注 10: 原文为 “a variational lower bound on the negative likelihood”,这里按原文翻译。常见的 ELBO 表述是对数似然的变分下界,或等价的负对数似然上界。

ENGLISH 原文

Models (Liu et al., 2022; Albergo & Vanden-Eijnden, 2022; Lipman et al., 2023) approach generative modeling by constructing a between two distributions through an ordinary differential equation (ODE). This approach has close connections to continuous normalizing flows (CNF) (Chen et al., 2018) as well as . Compared to CNFs, Rectified Flows and Stochastic Interpolants have the advantage that they do not require simulation of the ODE during training. Compared to diffusion models, they can result in ODEs that are faster to simulate than the probability flow ODE (Song et al., 2020) associated with diffusion models. , they do not result in solutions, and multiple works aim to minimize the further (Lee et al., 2023; Tong et al., 2023; Pooladian et al., 2023). (Dao et al., 2023; Ma et al., 2024) demonstrate the of rectified flow for class- image synthesis, (Fischer et al., 2023) for -space upsampling, and (Liu et al., 2023) apply the reflow procedure of (Liu et al., 2022) to distill a text-to-image model (Rombach et al., 2022). Here, we are interested in rectified flows as the foundation for text-to-image synthesis with fewer sampling steps. We perform an extensive comparison between different formulations and loss weightings and propose a new timestep schedule for training of rectified flows with improved performance.

中文译文

整流流模型。 整流流模型(Liu et al., 2022; Albergo & Vanden-Eijnden, 2022; Lipman et al., 2023)通过常微分方程(ODE)构造两个分布之间的输运映射,从而开展生成建模。这一方法与连续归一化流(CNF;Chen et al., 2018)及扩散模型有密切联系。与 CNF 相比,整流流和随机插值方法的优势在于,训练期间不需要模拟 ODE。与扩散模型相比,它们可以得到比扩散模型对应的概率流 ODE(Song et al., 2020)更易于快速模拟的 ODE。不过,它们不会产生最优输运解,因此多项工作致力于进一步最小化轨迹曲率(Lee et al., 2023; Tong et al., 2023; Pooladian et al., 2023)。Dao et al.(2023)和 Ma et al.(2024)展示了整流流形式用于类别条件图像合成的可行性,Fischer et al.(2023)展示了其用于潜在空间上采样的可行性,而 Liu et al.(2023)则应用 Liu et al.(2022)的 reflow 过程,蒸馏一个预训练文本生成图像模型(Rombach et al., 2022)。在这里,我们关注将整流流用作少采样步数文本生成图像的基础。我们对不同形式与损失加权进行了广泛比较,并提出一种用于整流流训练的新时间步调度,以改善性能。

ENGLISH 原文

The transformer   (Vaswani et al., 2017) is well known for its scaling properties in NLP (Kaplan et al., 2020) and computer vision tasks (Dosovitskiy et al., 2020; Zhai et al., 2022). For diffusion models, U-Net architectures (Ronneberger et al., 2015) have been the dominant choice (Ho et al., 2020; Rombach et al., 2022; Balaji et al., 2022). While some recent works explore diffusion transformer  (Peebles & Xie, 2023; Chen et al., 2023; Ma et al., 2024), scaling laws for text-to-image diffusion models remain unexplored.

中文译文

扩展扩散模型规模。 Transformer 架构(Vaswani et al., 2017)在自然语言处理(Kaplan et al., 2020)和计算机视觉任务(Dosovitskiy et al., 2020; Zhai et al., 2022)中的规模扩展性质已广为人知。对于扩散模型,U-Net 架构(Ronneberger et al., 2015)一直是主流选择(Ho et al., 2020; Rombach et al., 2022; Balaji et al., 2022)。虽然近期一些工作探索了扩散 Transformer 骨干网络(Peebles & Xie, 2023; Chen et al., 2023; Ma et al., 2024),但文本生成图像扩散模型的规模定律仍未得到探索。

Examples and Prompts · Source Page 18原文第 18 页:生成示例与提示词

原文第 18 页图示
原文第 18 页的生成样本。
原文第 18 页
  1. ENGLISH 原文

    Detailed pen and ink drawing of a happy pig butcher selling meat in its shop.

    中文译文
    一幅精细的钢笔墨水画:一头快乐的猪屠夫在自己的店里卖肉。
  2. ENGLISH 原文

    a massive alien space ship that is shaped like a pretzel.

    中文译文
    一艘巨大的外星飞船,形状像椒盐卷饼。
  3. ENGLISH 原文

    A kangaroo holding a beer, wearing ski goggles and passionately singing silly songs.

    中文译文
    一只袋鼠拿着啤酒、戴着滑雪镜,热情地唱着傻乎乎的歌。
  4. ENGLISH 原文

    An entire universe inside a bottle sitting on the shelf at walmart on sale.

    中文译文
    一个完整的宇宙装在瓶子里,瓶子摆在沃尔玛货架上打折出售。
  5. ENGLISH 原文

    A cheesburger surfing the vibe wave at night

    中文译文
    一个芝士汉堡在夜晚的氛围浪潮上冲浪。
  6. ENGLISH 原文

    A swamp ogre with a pearl earring by Johannes Vermeer

    中文译文
    约翰内斯·维米尔风格的戴珍珠耳环的沼泽食人魔。
  7. ENGLISH 原文

    A car made out of vegetables.

    中文译文
    一辆由蔬菜制成的汽车。
  8. ENGLISH 原文

    heat death of the universe, line art

    中文译文
    宇宙热寂,线条艺术。
  9. ENGLISH 原文

    A crab made of cheese on a plate

    中文译文
    盘子里有一只由奶酪制成的螃蟹。
  10. ENGLISH 原文

    Dystopia of thousand of workers picking cherries and feeding them into a machine that runs on steam and is as large as a skyscraper. Written on the side of the machine: ”SD3 Paper”

    中文译文
    一个反乌托邦场景:成千上万的工人采摘樱桃,将它们喂入一台由蒸汽驱动、像摩天大楼一样巨大的机器。机器侧面写着:“SD3 Paper”。
  11. ENGLISH 原文

    pig, inside is a smaller pig.

    中文译文
    一头半透明的猪,里面有一头更小的猪。
  12. ENGLISH 原文

    Film still of a long-legged cute big-eye cheeseburger wearing sneakers relaxing on the couch in a sparsely decorated living room.

    中文译文
    电影剧照:一个长腿、大眼睛、可爱的拟人化芝士汉堡,穿着运动鞋,在装饰简单的客厅沙发上放松休息。

Examples and Prompts · Source Page 19原文第 19 页:生成示例与提示词

原文第 19 页图示
原文第 19 页的生成样本。
原文第 19 页
  1. ENGLISH 原文

    detailed pen and ink drawing of a massive complex alien space ship above a farm in the middle of nowhere.

    中文译文
    一幅精细的钢笔墨水画:一艘庞大而复杂的外星飞船,悬浮在偏远地区的一座农场上空。
  2. ENGLISH 原文

    photo of a bear wearing a suit and tophat in a river in the middle of a forest holding a sign that says ”I cant bear it”.

    中文译文
    一张照片:一只熊穿着西装、戴着高顶礼帽,站在森林中央的河流里,举着一块写有 “I cant bear it” 的牌子。
  3. ENGLISH 原文

    tilt shift aerial photo of a cute city made of sushi on a wooden table in the evening.

    中文译文
    傍晚,一张移轴航拍照片:木桌上有一座由寿司构成的可爱城市。
  4. ENGLISH 原文

    dark high contrast render of a psychedelic tree of life illuminating dust in a mystical cave.

    中文译文
    一幅黑暗、高对比度的渲染图:一棵迷幻的生命之树照亮神秘洞穴中的尘埃。
  5. ENGLISH 原文

    an person behind the counter at a fractal themed restaurant.

    中文译文
    一个拟人化的分形人,站在分形主题餐厅的柜台后面。
  6. ENGLISH 原文

    beautiful oil painting of a steamboat in a river in the afternoon. On the side of the river is a large brick building with a sign on top that says S̈D3.̈

    中文译文
    一幅优美的油画:午后,一艘汽船行驶在河中。河边有一栋大型砖砌建筑,顶部的招牌写着 “SD3”。
  7. ENGLISH 原文

    an anthopomorphic pink donut with a mustache and cowboy hat standing by a log cabin in a forest with an old 1970s orange truck in the driveway

    中文译文
    一个拟人化的粉色甜甜圈,留着胡子、戴着牛仔帽,站在森林中的木屋旁;车道上停着一辆 20 世纪 70 年代的橙色旧卡车。
  8. ENGLISH 原文

    fox sitting in front of a computer in a messy room at night. On the screen is a 3d modeling program with a line render of a zebra.

    中文译文
    夜晚,一只狐狸坐在凌乱房间中的电脑前。屏幕上是一个三维建模程序,显示着斑马的线框渲染图。

B. On Flow MatchingB. 关于流匹配

B.1. Details on Simulation-Free Training of FlowsB.1. 流的免模拟训练细节

ENGLISH 原文

Following (Lipman et al., 2023), to see that ut​(z) generates pt, we note that the provides a condition (Villani, 2008):

中文译文

遵循 Lipman et al.(2023),为说明 ut(z)u_t(z) 生成 ptp_t,我们注意到,连续性方程提供了一个充分必要条件(Villani, 2008):

ddtpt(x)+∇⋅[pt(x)vt(x)]=0⟺vt 生成概率密度路径 pt.(26)\frac d{dt}p_t(x)+\nabla\cdot[p_t(x)v_t(x)]=0\quad\Longleftrightarrow\quad v_t\text{ 生成概率密度路径 }p_t.\tag{26}
ENGLISH 原文

it suffices to show that

中文译文

因此,只需证明

−∇⋅[ut(z)pt(z)]=−∇⋅[Eϵ∼N(0,I)ut(z∣ϵ)pt(z∣ϵ)pt(z)pt(z)],(27)-\nabla\cdot[u_t(z)p_t(z)]=-\nabla\cdot\left[\mathbb E_{\epsilon\sim\mathcal N(0,I)}u_t(z\mid\epsilon)\frac{p_t(z\mid\epsilon)}{p_t(z)}p_t(z)\right],\tag{27}
=Eϵ∼N(0,I)[−∇⋅[ut(z∣ϵ)pt(z∣ϵ)]],(28)=\mathbb E_{\epsilon\sim\mathcal N(0,I)}\left[-\nabla\cdot[u_t(z\mid\epsilon)p_t(z\mid\epsilon)]\right],\tag{28}
=Eϵ∼N(0,I)ddtpt(z∣ϵ)=ddtpt(z).(29)=\mathbb E_{\epsilon\sim\mathcal N(0,I)}\frac d{dt}p_t(z\mid\epsilon)=\frac d{dt}p_t(z).\tag{29}
ENGLISH 原文

where we used the Equation 26 for ut​(z|ϵ) in line Equation 28 to Equation 29 since ut​(z|ϵ) generates pt​(z|ϵ) and the definition of Equation 6 in line Equation 27

中文译文

其中,从式(28)到式(29)使用了关于 ut(z∣ϵ)u_t(z\mid\epsilon) 的连续性方程(26),因为 ut(z∣ϵ)u_t(z\mid\epsilon) 生成 pt(z∣ϵ)p_t(z\mid\epsilon);而式(27)使用了式(6)的定义。

ENGLISH 原文

The equivalence of ℒF​M⇋ℒC​F​M (Lipman et al., 2023) follows from

中文译文

目标 LFM⇌LCFM\mathcal L_{FM}\rightleftharpoons\mathcal L_{CFM} 的等价性(Lipman et al., 2023)来自

LFM(Θ)=Et,pt(z)∥vΘ(z,t)−ut(z)∥22,(30)\mathcal L_{FM}(\Theta)=\mathbb E_{t,p_t(z)}\|v_\Theta(z,t)-u_t(z)\|_2^2,\tag{30}
=Et,pt(z)∥vΘ(z,t)∥22−2Et,pt(z)⟨vΘ(z,t)∣ut(z)⟩+c,(31)=\mathbb E_{t,p_t(z)}\|v_\Theta(z,t)\|_2^2-2\mathbb E_{t,p_t(z)}\langle v_\Theta(z,t)\mid u_t(z)\rangle+c,\tag{31}
=Et,pt(z)∥vΘ(z,t)∥22−2Et,pt(z∣ϵ),p(ϵ)⟨vΘ(z,t)∣ut(z∣ϵ)⟩+c,(32)=\mathbb E_{t,p_t(z)}\|v_\Theta(z,t)\|_2^2-2\mathbb E_{t,p_t(z\mid\epsilon),p(\epsilon)}\langle v_\Theta(z,t)\mid u_t(z\mid\epsilon)\rangle+c,\tag{32}
=Et,pt(z∣ϵ),p(ϵ)∥vΘ(z,t)−ut(z∣ϵ)∥22+c′=LCFM(Θ)+c′.(33)=\mathbb E_{t,p_t(z\mid\epsilon),p(\epsilon)}\|v_\Theta(z,t)-u_t(z\mid\epsilon)\|_2^2+c'=\mathcal L_{CFM}(\Theta)+c'.\tag{33}
ENGLISH 原文

where c,c′ do not depend on Θ and line Equation 31 to line Equation 32 follows from:

中文译文

其中 c,c′c,c' 不依赖于 Θ\Theta,而从式(31)到式(32)来自:

Ept(z∣ϵ),p(ϵ)⟨vΘ(z,t)∣ut(z∣ϵ)⟩=∫dz∫dϵ pt(z∣ϵ)p(ϵ)⟨vΘ(z,t)∣ut(z∣ϵ)⟩,(34)\mathbb E_{p_t(z\mid\epsilon),p(\epsilon)}\langle v_\Theta(z,t)\mid u_t(z\mid\epsilon)\rangle=\int dz\int d\epsilon\,p_t(z\mid\epsilon)p(\epsilon)\langle v_\Theta(z,t)\mid u_t(z\mid\epsilon)\rangle,\tag{34}
=∫dz pt(z)⟨vΘ(z,t) | ∫dϵ pt(z∣ϵ)pt(z)p(ϵ)ut(z∣ϵ)⟩,(35)=\int dz\,p_t(z)\left\langle v_\Theta(z,t)\,\middle|\,\int d\epsilon\,\frac{p_t(z\mid\epsilon)}{p_t(z)}p(\epsilon)u_t(z\mid\epsilon)\right\rangle,\tag{35}
=∫dz pt(z)⟨vΘ(z,t)∣ut(z)⟩=Ept(z)⟨vΘ(z,t)∣ut(z)⟩.(36)=\int dz\,p_t(z)\langle v_\Theta(z,t)\mid u_t(z)\rangle=\mathbb E_{p_t(z)}\langle v_\Theta(z,t)\mid u_t(z)\rangle.\tag{36}
ENGLISH 原文

where we extended with pt​(z)pt​(z) in line Equation 35 and used the definition of Equation 6 in line Equation 35 to Equation 36.

中文译文

其中,在式(35)中,我们引入了因子 pt(z)/pt(z)p_t(z)/p_t(z);在从式(35)到式(36)的过程中,使用了式(6)的定义。

B.2. Details on Image and Text RepresentationsB.2. 图像与文本表示细节

ENGLISH 原文

Image We follow LDM (Rombach et al., 2022) and use a to represent RGB images X∈ℝH×W×3 in a smaller x=E⁡(X)∈ℝh×w×d. We use a spatial downsampling factor of 8, such that h=H8 and w=W8, and experiment with different values for d in Section 5.2.1. We always apply the from Equation 2 in the latent space, and when a representation x via Equation 1, we decode it back into pixel space X=D⁡(x) via the decoder D. We follow Rombach et al. (2022) and normalize the latents by their mean and , which are globally computed over a subset of the training data. Figure 10 shows how generative model training for different d evolves as a function of model , as discussed in Section 5.2.1.

中文译文

潜在图像表示。 我们遵循 LDM(Rombach et al., 2022),使用预训练自编码器,在更小的潜在空间 x=E(X)∈Rh×w×dx=E(X)\in\mathbb R^{h\times w\times d} 中表示 RGB 图像 X∈RH×W×3X\in\mathbb R^{H\times W\times3}。我们采用空间下采样因子 8,因此 h=H/8h=H/8、w=W/8w=W/8,并在第 5.2.1 节中对不同的 dd 值进行实验。我们始终在潜在空间中应用式(2)的前向过程;当通过式(1)采样得到表示 xx 后,再通过解码器 DD 将其解码回像素空间 X=D(x)X=D(x)。我们遵循 Rombach et al.(2022),通过均值和标准差对潜变量进行归一化,这些统计量在训练数据的一个子集上全局计算。图 10 展示了不同 dd 下,生成模型的训练如何随模型容量变化,这一点已在第 5.2.1 节中讨论。

原文第 21 页图示
ENGLISH 原文

Figure 10: FID scores after training flow models with different sizes ( via their depth) on the of different (4 channels, 8 channels and 16 channels) as discussed in Section 5.2.1. As expected, the flow model trained on the 16-channel autoencoder space needs more model to achieve similar performance. At depth d=22, the gap between 8-chn and 16-chn becomes . We opt for the 16-chn model as we ultimately aim to scale to much larger model sizes.

中文译文
图 10。 如第 5.2.1 节所讨论的,在不同自编码器的潜在空间(4、8 和 16 个潜在通道)中,训练不同大小的流模型(通过深度参数化)后得到的 FID 分数。正如预期,在 16 通道自编码器空间中训练的流模型,需要更大的模型容量才能达到相似性能。在深度 d=22 时,8 通道与 16 通道之间的差距变得可以忽略。我们选择 16 通道模型,因为最终目标是扩展到大得多的模型规模。横轴为深度,纵轴为 FID。
原文第 21 页
ENGLISH 原文

Text Similar to the encoding of images to representations, we also follow previous approaches (Saharia et al., 2022b; Balaji et al., 2022) and encode the text conditioning c using , text models. , for all experiments, we use a combination of CLIP (Radford et al., 2021) models and a encoder-decoder text model. Specifically, we encode c with the text encoders of both a CLIP L/14 model of Radford et al. (2021) as well as an OpenCLIP bigG/14 model of Cherti et al. (2023). We the outputs, of sizes 768 and 1280 , to obtain a vector conditioning cvec∈ℝ2048. We also concatenate the penultimate hidden representations channel-wise to a CLIP context conditioning cctxtCLIP∈ℝ77×2048. Next, we encode c also to the final hidden representation, cctxtT5∈ℝ77×4096, of the encoder of a T5-v1.1-XXL model (Raffel et al., 2019). Finally, we zero-pad cctxtCLIP along the channel axis to 4096 dimensions to match the T5 representation and concatenate it along the sequence axis with cctxtT5 to obtain the final context representation cctxt∈ℝ154×4096. These two representations, cvec and cctxt, are used in two different ways as described in Section 4.

中文译文

文本表示。 与将图像编码为潜在表示类似,我们也遵循先前的方法(Saharia et al., 2022b; Balaji et al., 2022),使用预训练且冻结的文本模型编码文本条件 cc。具体而言,在所有实验中,我们都结合使用 CLIP 模型(Radford et al., 2021)和一个编码器—解码器文本模型。具体来说,我们使用 Radford et al.(2021)的 CLIP L/14 模型以及 Cherti et al.(2023)的 OpenCLIP bigG/14 模型的文本编码器,对 cc 进行编码。我们拼接大小分别为 768 和 1280 的池化输出,得到向量条件 cvec∈R2048c_{vec}\in\mathbb R^{2048}。我们还沿通道方向拼接倒数第二层的隐藏表示,得到 CLIP 上下文条件 cctxtCLIP∈R77×2048c_{ctxt}^{CLIP}\in\mathbb R^{77\times2048}。接下来,我们还将 cc 编码为 T5-v1.1-XXL 模型(Raffel et al., 2019)编码器的最终隐藏表示 cctxtT5∈R77×4096c_{ctxt}^{T5}\in\mathbb R^{77\times4096}。最后,我们沿通道轴将 cctxtCLIPc_{ctxt}^{CLIP} 补零至 4096 维,以匹配 T5 表示,并沿序列轴将其与 cctxtT5c_{ctxt}^{T5} 拼接,得到最终上下文表示 cctxt∈R154×4096c_{ctxt}\in\mathbb R^{154\times4096}。如第 4 节所述,这两个描述表示 cvecc_{vec} 和 cctxtc_{ctxt} 以两种不同方式使用。

B.3. Preliminaries for the Experiments in Section 5.1.B.3. 第 5.1 节实验的预备设置

ENGLISH 原文

Datasets We use two datasets to account for the missing of a standard text-to-image . As a widely used dataset, we convert the ImageNet dataset (Russakovsky et al., 2014) into a dataset suitable for text-to-image models by adding of the form “a photo of a ⟨class name⟩” to images, where ⟨class name⟩ is randomly chosen from one of the provided names for the image’s class label. As a more realistic text-to-image dataset, we use the CC12M dataset (Changpinyo et al., 2021) for training.

中文译文

数据集。 为应对缺乏标准文本生成图像基准的问题,我们使用两个数据集。对于广泛使用的 ImageNet 数据集(Russakovsky et al., 2014),我们通过给图像添加形式为 “a photo of a ⟨class name⟩”(一张某类别对象的照片)的描述,将其转为适用于文本生成图像模型的数据集,其中 ⟨class name⟩ 从该图像类别标签提供的名称中随机选择。作为更符合实际的文本生成图像数据集,我们使用 CC12M(Changpinyo et al., 2021)进行训练。

ENGLISH 原文

In this experiment, we train all models using a global of 1024 using the AdamW optimizer (Loshchilov & Hutter, 2017) with a of 10−4 and 1000 linear steps. We use mixed-precision training and keep a copy of the model weights which gets updated every 100 training batches with an exponential moving average (EMA) using a decay factor of 0.99. For unconditional diffusion guidance (Ho & Salimans, 2022), we set the outputs of each of the three text encoders independently to zero with a probability of 46.4%, such that we roughly train an unconditional model in 10% of all steps.

中文译文

优化。 在该实验中,我们使用 AdamW 优化器(Loshchilov & Hutter, 2017),以 1024 的全局批大小、10−410^{-4} 的学习率和 1000 步线性预热训练所有模型。我们使用混合精度训练,并保存一份模型权重副本,每经过 100 个训练批次,以衰减系数 0.99 的指数移动平均(EMA)进行更新。对于无条件扩散引导(Ho & Salimans, 2022),我们以 46.4% 的概率独立地将三个文本编码器各自的输出置零,从而约有 10% 的训练步是在训练无条件模型。

ENGLISH 原文

As described in Section 5.1, we use CLIP scores, FID and to evaluate our models regularly during training on the COCO-2014 validation split (Lin et al., 2014).

中文译文

评估。 如第 5.1 节所述,我们在训练期间定期使用 COCO-2014 验证集划分(Lin et al., 2014)上的 CLIP 分数、FID 和验证损失评估模型。

ENGLISH 原文

As the loss values differ widely in magnitude and for different , we them in a stratified way on eight equally spaced values in the time interval [0,1].

中文译文

由于不同时间步的损失值在大小和方差上差异很大,我们采用分层方式,在时间区间 [0,1][0,1] 内 8 个等间距值上进行评估。

ENGLISH 原文

To analyze how different approaches behave under different settings, we produce 1000 samples for each of the samplers which differ in guidance scales as well as number of steps. We these samples with CLIP scores using CLIP L/14 (Radford et al., 2021) and also compute FID between CLIP L/14 image features of these samples and the images of the validation set. For sampling, we always use a Euler discretization (Euler, 1768) of Equation 1 and six different settings: 50 steps with classifier-free-guidance scales 1.0, 2.5, 5.0, and 5, 10, 25 steps with classifier-free-guidance scale 5.0.

中文译文

为分析不同方法在不同采样器设置下的表现,我们为每种采样器生成 1000 个样本;各采样器的引导强度和采样步数不同。我们使用 CLIP L/14(Radford et al., 2021)评估这些样本的 CLIP 分数,还计算这些样本与验证集图像的 CLIP L/14 图像特征之间的 FID。采样时,我们始终使用式(1)的欧拉离散化(Euler, 1768),并采用 6 种设置:50 步、无分类器引导强度分别为 1.0、2.5、5.0;以及 5、10、25 步、无分类器引导强度均为 5.0。

B.4. Improving SNR Samplers for Rectified Flow ModelsB.4. 改进整流流模型的 SNR 采样器

ENGLISH 原文

As described in Section 2, we introduce novel π⁡(t) for the that we use to train our models. Figure 11 visualizes the distributions of the and the mode sampler introduced in Section 3.1. , as we demonstrate in Section 5.1, the logit-normal sampler the classic uniform rectified flow  (Liu et al., 2022) and diffusion baselines such as EDM (Karras et al., 2022) and LDM-Linear (Rombach et al., 2022).

中文译文

如第 2 节所述,我们为训练整流流模型所用的时间步引入了新的密度 π(t)\pi(t)。图 11 将第 3.1 节介绍的 logit 正态采样器与众数采样器的分布进行了可视化。值得注意的是,正如第 5.1 节所展示的,logit 正态采样器优于经典的均匀整流流形式(Liu et al., 2022),也优于 EDM(Karras et al., 2022)和 LDM-Linear(Rombach et al., 2022)等成熟扩散基线。

原文第 22 页图示
ENGLISH 原文

Figure 11: The mode (left) and (right) distributions that we explore for the of training .

中文译文
图 11。 我们研究的众数分布(左)与 logit 正态分布(右),用于使训练时间步的采样产生偏向。
原文第 22 页
原文第 22 页图示
ENGLISH 原文

Figure 12: effects of . Displayed are examples demonstrating the impact of scaling training steps (left to right: 50k, 200k, 350k, 500k) and model sizes (top to bottom: depth=15, 30, 38) on PartiPrompts, highlighting the influence of training duration and model complexity.

中文译文
图 12。规模扩展的定性影响。 图中示例展示了在 PartiPrompts 上扩展训练步数(从左到右:5 万、20 万、35 万、50 万)与模型大小(从上到下:depth=15、30、38)的影响,突出体现了训练时长与模型复杂度的作用。
原文第 22 页

图 12 提示词逐句译文:

  1. ENGLISH 原文

    A raccoon wearing formal clothes, wearing a tophat and holding a cane. The raccoon is holding a garbage bag. Oil painting in the style of abstract cubism.

    中文译文
    一只浣熊穿着正装、戴着高顶礼帽、拿着手杖。浣熊手里提着垃圾袋。抽象立体主义风格的油画。
  2. ENGLISH 原文

    A bowl of soup that looks like a monster made out of plasticine

    中文译文
    一碗汤,看起来像一个橡皮泥做的怪物。
  3. ENGLISH 原文

    Two cups of coffee, one with latte art of a heart. The other has latte art of stars.

    中文译文
    两杯咖啡,一杯有心形拉花。另一杯有星星形状的拉花。
  4. ENGLISH 原文

    A smiling is wearing a leather jacket, a cowboy hat, a kilt and a bowtie. The sloth is holding a quarterstaff and a big book. The sloth is standing on grass a few feet in front of a shiny VW van with flowers painted on it. wide-angle lens from below.

    中文译文
    一只面带微笑的树懒,穿着皮夹克、戴着牛仔帽、围着苏格兰裙并系着领结。树懒拿着一根长棍和一本大书。树懒站在草地上,身后几英尺处是一辆闪亮的大众厢式货车,车身上画着花朵。低角度广角镜头。

C. Direct Preference OptimizationC. 直接偏好优化

原文第 23 页图示
ENGLISH 原文

Figure 13: Comparison between base models and DPO- models. DPO-finetuning generally results in more aesthetically pleasing samples with better spelling.

中文译文
图 13。基础模型与 DPO 微调模型的比较。 DPO 微调通常会产生在美学上更令人愉悦、拼写更好的样本。图中 2B base 和 8B base 分别为 20 亿与 80 亿参数基础模型,w/ DPO 表示经过 DPO 微调。
原文第 23 页
ENGLISH 原文

“a peaceful lakeside landscape with migrating herd of ”

“a book with the words ‘Don’t Panic¡, written on it”

中文译文

图 13 提示词:“一个宁静的湖畔景观,有一群正在迁徙的蜥脚类恐龙”;“一本写有 ‘Don’t Panic’ 字样的书”。原图第二条提示词在标点处含有异常字符,书面文字含义为“不要惊慌”。

ENGLISH 原文

 (DPO) (Rafailov et al., 2023) is a technique to LLMs with data. Recently, this method has been adapted to preference finetuning of text-to-image  (Wallace et al., 2023). In this section, we verify that our model is also amenable to preference . , we apply the method introduced in Wallace et al. (2023) to our 2B and 8B parameter base model. Rather than finetuning the entire model, we introduce learnable (LoRA) matrices (of rank 128) for all linear layers as is common practice. We finetune these new parameters for 4k and 2k iteration for the 2B and 8B base model, . We then the resulting model in a human preference study using a subset of 128 from the Partiprompts set (Yu et al., 2022) (roughly three voter per prompt and comparison). Figure 14 shows that our base models can be effectively tuned for human preference. Figure 13 shows samples of the respective base models and DPO-finetuned models.

中文译文

直接偏好优化(DPO;Rafailov et al., 2023)是一种利用偏好数据微调大型语言模型的技术。最近,该方法被调整用于文本生成图像扩散模型的偏好微调(Wallace et al., 2023)。在本节中,我们验证了我们的模型也适用于偏好优化。具体而言,我们将 Wallace et al.(2023)提出的方法应用于 20 亿和 80 亿参数的基础模型。我们没有微调整个模型,而是按照常见做法,为所有线性层引入可学习的低秩适配(LoRA)矩阵,秩为 128。对于 20 亿和 80 亿参数基础模型,我们分别对这些新增参数微调 4000 和 2000 次迭代。随后,我们使用 Parti-prompts 集合(Yu et al., 2022)中包含 128 条描述的子集,对所得模型开展人类偏好研究,每条提示词、每项比较大约由三名投票者评估。图 14 表明,我们的基础模型能够有效地针对人类偏好进行调整。图 13 展示了相应基础模型与 DPO 微调模型的样本。

原文第 24 页图示
ENGLISH 原文

Figure 14: Human between base models and DPO- models. Human evaluators prefer DPO-finetuned models for both and general quality.

中文译文
图 14。基础模型与 DPO 微调模型之间的人类偏好评估。 在提示词遵循和总体质量两方面,人类评估者均偏好 DPO 微调后的模型。Prompt 表示提示词遵循,Quality 表示质量,Human Preference [%] 表示人类偏好百分比。
原文第 24 页

D. Finetuning for instruction-based image editingD. 用于基于指令的图像编辑的微调

ENGLISH 原文

A common approach for training instruction based image editing and general image-to-image is to the of the input image to the noised latents of the diffusion target along the channel dimension before feeding the input into a U-Net  (Brooks et al., 2023; Sheynin et al., 2023; Saharia et al., 2022a; Saharia et al., 2022c). We follow the same approach, concatenating input and target along the channels before , and demonstrate that the same method is applicable to our proposed . We the 2B parameter base model on a dataset consisting of image-to-image editing tasks similar to the distribution of the InstructPix2Pix dataset (Brooks et al., 2023) as well as , , , and controlnet tasks similar to Emu Edit and Palette  (Sheynin et al., 2023; Saharia et al., 2022a). As shown in Fig 15 we observe that the resulting 2B Edit model has the capability to manipulate text in a given image, even though no text manipulation tasks were included in the training data. We were not able to reproduce similar results when training a SDXL-based  (Podell et al., 2023) editing model on the same data.

中文译文

训练基于指令的图像编辑模型和一般图像到图像扩散模型的一种常见方法,是在将输入送入 U-Net 之前,沿通道维度将输入图像的潜变量与扩散目标的加噪潜变量拼接(Brooks et al., 2023; Sheynin et al., 2023; Saharia et al., 2022a;c)。我们采用同样的方法,在图块化之前沿通道拼接输入与目标,并证明同一方法适用于我们提出的架构。我们在一个数据集上微调 20 亿参数基础模型,该数据集包含分布类似于 InstructPix2Pix 数据集(Brooks et al., 2023)的图像到图像编辑任务,以及类似 Emu Edit 和 Palette(Sheynin et al., 2023; Saharia et al., 2022a)的图像修补、分割、着色、去模糊和 ControlNet 任务。

如图 15 所示,我们观察到,得到的 2B Edit 模型具有修改给定图像中文字的能力,即使训练数据中并未包含文字修改任务。当在同一数据上训练基于 SDXL(Podell et al., 2023)的编辑模型时,我们未能复现类似结果。

原文第 25 页图示
ENGLISH 原文

Figure 15: Zero Shot Text manipulation and insertion with the 2B Edit model

中文译文
图 15。使用 2B Edit 模型进行零样本文字修改与插入。 Input 为输入,Output 1 和 Output 2 为输出 1 和输出 2。
原文第 25 页

图 15 编辑指令译文:

  1. ENGLISH 原文

    Write ”go small go home” instead

    中文译文
    改为写上 “go small go home”。
  2. ENGLISH 原文

    GO BIG OR GO UNET is written on the blackboard

    中文译文
    黑板上写着 “GO BIG OR GO UNET”。
  3. ENGLISH 原文

    change the word to UNOT

    中文译文
    将单词改成 “UNOT”。
  4. ENGLISH 原文

    make the sign say MMDIT rules

    中文译文
    让牌子上写着 “MMDIT rules”。

E. Data Preprocessing for Large-Scale Text-to-Image TrainingE. 大规模文本生成图像训练的数据预处理

E.1. Precomputing Image and Text EmbeddingsE.1. 预计算图像与文本嵌入

ENGLISH 原文

Our model uses the output of multiple , networks as inputs ( and text encoder ). Since these outputs are constant during training, we precompute them once for the entire dataset. This comes with two main advantages: (i) The encoders do not need to be available on the GPU during training, lowering the required memory. (ii) The forward encoding pass is skipped during training, saving time and total needed compute after the first epoch, see Tab. 7.

中文译文

我们的模型使用多个预训练且冻结的网络输出作为输入,包括自编码器潜变量和文本编码器表示。由于这些输出在训练期间保持不变,我们针对整个数据集只预计算一次。这有两个主要优点:(i)训练期间,编码器不必驻留在 GPU 上,从而降低所需内存。(ii)训练期间可以跳过前向编码过程,因此在第一个 epoch 之后,可以节约时间与总计算需求,见表 7。

ENGLISH 原文

This approach has two disadvantages: First, random augmentation for each sample every epoch is not possible and we use square- during precomputation of image . For our model at higher resolutions, we specify a number of buckets, and resize and crop to the closest bucket first and then precompute in that aspect ratio. Second, the dense output of the text encoders is particularly large, creating additional storage cost and longer loading times during training (c.f. Tab. 7). We save the of the language models in half precision, as we do not observe a deterioration in performance in practice.

中文译文

这种方法有两个缺点:首先,无法在每个 epoch 中对每个样本进行随机增强;因此,我们在预计算图像潜变量时采用正方形中心裁剪。为了在更高分辨率下微调模型,我们指定若干宽高比桶,先缩放并裁剪到最接近的桶,再按该宽高比预计算。其次,文本编码器的稠密输出特别大,会造成额外存储成本,以及更长的训练加载时间,参见表 7。我们以半精度保存语言模型嵌入,因为在实际中未观察到性能下降。

ENGLISH 原文

Table 7: Key figures for preencoding input networks. Mem is the memory required to load the model on the GPU. FP [ms] is the time per sample for the forward pass with per-device of 32. Storage is the size to save a single sample. Delta [%] is how much longer a training step takes, when adding this into the loop for the 2B MMDiT-Model (568ms/it).

中文译文

表 7。冻结输入网络预编码的关键数值。 Mem 为将模型加载到 GPU 上所需的内存。FP [ms] 为每设备批大小为 32 时,每个样本前向传播所需的时间。Storage 为保存单个样本所需的大小。Delta [%] 为将该网络加入 20 亿参数 MM-DiT 模型的训练循环后,单步训练时间增加的百分比;原本单次迭代为 568 毫秒。

Model模型 Mem (GB)内存(GB) FP (ms)前向传播(ms) Storage (kB)存储(kB) Delta (%)时间增加(%)
VAE(编码器) 0.14 2.45 65.5 13.8
CLIP-L 0.49 0.45 121.3 2.6
CLIP-G 2.78 2.77 202.2 15.6
T5 19.05 17.46 630.7 98.3

E.2. Preventing Image MemorizationE.2. 防止图像记忆

ENGLISH 原文

In the context of generative image models of training samples can lead to a number of issues (Somepalli et al., 2023a; Carlini et al., 2023; Somepalli et al., 2023b). To avoid copies of images by our trained models, we carefully scan our training dataset for duplicated examples and remove them.

中文译文

在生成图像模型的语境中,对训练样本的记忆可能带来许多问题(Somepalli et al., 2023a; Carlini et al., 2023; Somepalli et al., 2023b)。为避免训练后的模型原样复制图像,我们仔细扫描训练数据集中的重复样本,并将它们移除。

ENGLISH 原文

Details on In accordance with the methods outlined by  Carlini et al. (2023) and  Somepalli et al. (2023a), we opt for SSCD (Pizzi et al., 2022) as the for the deduplication process. The SSCD algorithm is a technique for detecting images at scale, and it generates high-quality image that can be used for and other downstream tasks. We also decided to follow Nichol (2022) to decide on a number of clusters N. For our experiments, we use N=16,000.

中文译文

去重细节。 按照 Carlini et al.(2023)和 Somepalli et al.(2023a)所述方法,我们选择 SSCD(Pizzi et al., 2022)作为去重过程的骨干。SSCD 算法是一项可大规模检测近重复图像的最先进技术,它会生成高质量图像嵌入,可用于聚类及其他下游任务。我们还决定遵循 Nichol(2022)的方法来确定聚类数量 NN。在我们的实验中,使用 N=16,000N=16{,}000。

ENGLISH 原文

We utilize autofaiss (2023) for .  autofaiss (2023) is a library that simplifies the process of using Faiss (Facebook AI Similarity Search) for large-scale clustering tasks. Specifically, leverage FAISS index factory11 1 https://github.com/facebookresearch/faiss/wiki/The-index-factory functionality to train a custom index with predefined number of . This approach allows for efficient and accurate clustering of high-dimensional data, such as image .

中文译文

我们使用 autofaiss(2023)进行聚类。autofaiss(2023)是一个库,它简化了使用 Faiss(Facebook AI Similarity Search)进行大规模聚类任务的过程。具体而言,我们使用 FAISS 的 index factory 功能¹,训练具有预先指定聚类中心数量的自定义索引。这种方法能够高效、准确地对图像嵌入等高维数据进行聚类。

ENGLISH 原文

Algorithm 1 details our approach. We ran an experiment to see how much data is removed by different SSCD as shown in Figure 16(b). Based on these results we selected four thresholds for the final run Figure 16(a).

中文译文

算法 1 详细描述了去重方法。我们进行了一项实验,考察不同 SSCD 阈值会移除多少数据,如图 16b 所示。基于这些结果,我们为图 16a 所示的最终运行选择了四个阈值。

¹ FAISS index factory 文档。

E.3. Assessing the Efficacy of our Deduplication EffortsE.3. 评估去重工作的有效性

ENGLISH 原文

Carlini et al. (2023) devise a two-stage data extraction attack that generates images using standard approaches, and flags those that exceed certain scoring criteria. Carlini et al. (2023) their search towards duplicated training examples because these are orders of magnitude more likely to be memorized than non-duplicated examples  (Somepalli et al., 2023a; Somepalli et al., 2023a; Lee et al., 2021).

中文译文

Carlini et al.(2023)设计了一种两阶段数据提取攻击:使用标准方法生成图像,并标记那些超过特定成员推断评分标准的图像。Carlini et al.(2023)将搜索偏向重复的训练样本,因为这些样本被记忆的可能性比非重复样本高出多个数量级(Somepalli et al., 2023a;a; Lee et al., 2021)。

ENGLISH 原文

To assess how well our SSCD-based works, we follow Carlini et al. (2023) to extract memorized samples from small, specifically for this purpose trained models and compare them before and after deduplication. Two main step of the mentioned procedure include: 1) Generate many examples using the in the standard manner and with the known prompts. 2) Perform to separate the model’s novel generations from those generations which are memorized training examples. Algorithm 2 shows the steps to find the memorized samples based on Carlini et al. (2023). Note that we run this techniques two times; one for SD-2.1 model with only exact dedup removal as baseline, and for a model with the SD2.1 but trained on removed exact duplication and using SSCD (Pizzi et al., 2022).

中文译文

为评估基于 SSCD 的去重效果,我们遵循 Carlini et al.(2023),从专门为此训练的小型模型中提取被记忆的样本,并比较去重前后的结果。上述过程包括两个主要步骤:(1)使用扩散模型,以标准采样方式和已知提示词生成大量样本。(2)进行成员推断,将模型的新颖生成结果与作为被记忆训练样本的生成结果区分开。算法 2 展示了基于 Carlini et al.(2023)寻找被记忆样本的步骤。注意,我们运行这一技术两次:一次用于仅去除精确重复项的 SD-2.1 模型,将其作为基线;另一次用于采用 SD2.1 架构、但训练数据经过精确重复去除和 SSCD 近重复去除的模型(Pizzi et al., 2022)。

ENGLISH 原文

We select the 350,000 most-duplicated examples from the training dataset based on SSCD (Pizzi et al., 2022) with of 0.5, and generate 500 candidate images for each text prompt to increase the likelihood of finding . The intuition is that for , with high probability Gen(p;r1)≈dGen(p;r2) for two different random initial seeds r1,r2. On the other hand, if Gen(p;r1)≈dGen(p;r2) under some distance measure d, it is likely that these generated samples are memorized examples. To compute the distance measure d between two images, we use a modified l2 distance. , we found that many generations were often similar according to l2 distance (e.g., they all had gray backgrounds). We instead divide each image into 16 non-overlapping 128 × 128 tiles and measure the maximum of the l2 distance between any pair of image tiles between the two images. Figure 17 shows the comparison between number of memorized samples, before and after using SSCD with the threshold of 0.5 to remove samples. Carlini et al. (2023) mark images within size of 10 as memorized samples. Here we also explore different sizes for cliques. For all clique thresholds, SSCD is able to significantly reduce the number of memorized samples. Specifically, when the clique size is 10, trained SD models on the deduplicated training samples cut off at SSCD=0.5 show a 5× reduction in potentially memorized examples.

中文译文

我们基于阈值为 0.5 的 SSCD(Pizzi et al., 2022),从训练数据集中选择重复最多的 350,000 个样本,并为每条文本提示词生成 500 幅候选图像,以提高发现记忆现象的可能性。其直觉是,对于扩散模型,以很高概率,对两个不同的随机初始种子 r1,r2r_1,r_2,有 Gen⁡(p;r1)≈dGen⁡(p;r2)\operatorname{Gen}(p;r_1)\approx_d\operatorname{Gen}(p;r_2)。另一方面,如果在某个距离度量 dd 下有 Gen⁡(p;r1)≈dGen⁡(p;r2)\operatorname{Gen}(p;r_1)\approx_d\operatorname{Gen}(p;r_2),那么这些生成样本很可能是被记忆的样本。为计算两幅图像之间的距离度量 dd,我们使用修改后的欧氏 ℓ2\ell_2 距离。具体而言,我们发现,按照 ℓ2\ell_2 距离,许多生成结果经常会呈现虚假的相似性,例如它们都有灰色背景。因此,我们改为将每幅图像划分成 16 个互不重叠的 128×128128\times128 图块,并测量两幅图像的图块对之间 ℓ2\ell_2 距离的最大值。图 17 比较了使用阈值为 0.5 的 SSCD 移除近重复样本之前和之后,被记忆样本的数量。Carlini et al.(2023)将团大小为 10 的图像标记为被记忆样本。在这里,我们也探索了不同的团大小。对于所有团阈值,SSCD 都能显著减少被记忆样本的数量。具体而言,当团大小为 10 时,在 SSCD=0.5 截断阈值下完成去重的训练样本上训练的 SD 模型,潜在被记忆样本的数量减少至原来的五分之一。

译注 11: 原文关于随机种子的第一句也使用“近似相等”符号,与紧接着的“另一方面”逻辑不一致,疑似遗漏了否定符号。此处保留原文符号;若用于理解检测逻辑,应注意:同一提示词在不同随机种子下反复生成高度相似图像,正是这里用来提示记忆的信号。

Algorithm 1: Finding Duplicate Items in a Cluster算法 1:查找一个簇中的重复项

ENGLISH 原文

Algorithm 1 Finding Duplicate Items in a

0:  𝚟𝚎𝚌𝚜 – List of vectors in a single cluster, 𝚒𝚝𝚎𝚖𝚜 – List of item IDs corresponding to vecs, 𝚒𝚗𝚍𝚎𝚡 – FAISS index for similarity search within the cluster, 𝚝𝚑𝚛𝚎𝚜𝚑 – for determining duplicates Output: 𝚍𝚞𝚙𝚜 – Set of duplicate item IDs
1:  𝚍𝚞𝚙𝚜←new set​()
2:  for i←0 to length⁡(𝚟𝚎𝚌𝚜)−1 do
3:   𝚚𝚜←𝚟𝚎𝚌𝚜⁡[i] {Current vector}
4:   𝚚𝚒𝚍←𝚒𝚝𝚎𝚖𝚜⁡[i] {Current item ID}
5:   𝚕𝚒𝚖𝚜,D,I←𝚒𝚗𝚍𝚎𝚡.range​_​search​(𝚚𝚜,𝚝𝚑𝚛𝚎𝚜𝚑)
6:   if 𝚚𝚒𝚍∈𝚍𝚞𝚙𝚜 then
7:    continue
8:   end if
9:   𝚜𝚝𝚊𝚛𝚝←𝚕𝚒𝚖𝚜⁡[0]
10:   𝚎𝚗𝚍←𝚕𝚒𝚖𝚜⁡[1]
11:   𝚍𝚞𝚙𝚕𝚒𝚌𝚊𝚝𝚎_𝚒𝚗𝚍𝚒𝚌𝚎𝚜←I[start:end]
12:   𝚍𝚞𝚙𝚕𝚒𝚌𝚊𝚝𝚎​_​𝚒𝚍𝚜←new​list​()
13:   for j in 𝚍𝚞𝚙𝚕𝚒𝚌𝚊𝚝𝚎​_​𝚒𝚗𝚍𝚒𝚌𝚎𝚜 do
14:    if 𝚒𝚝𝚎𝚖𝚜⁡[j]≠𝚚𝚒𝚍 then
15:     𝚍𝚞𝚙𝚕𝚒𝚌𝚊𝚝𝚎​_​𝚒𝚍𝚜.append⁡(𝚒𝚝𝚎𝚖𝚜⁡[j])
16:    end if
17:   end for
18:   𝚍𝚞𝚙𝚜.update⁡(𝚍𝚞𝚙𝚕𝚒𝚌𝚊𝚝𝚎​_​𝚒𝚍𝚜)
19:  end for
20:  Return 𝚍𝚞𝚙𝚜 {Final set of duplicate IDs}
中文译文

输入: vecs,单个簇中的向量列表;items,与 vecs 对应的条目 ID 列表;index,用于簇内相似性搜索的 FAISS 索引;thresh,判定重复项的阈值。

输出: dups,重复条目 ID 的集合。

 1: dups ← 新建集合()
 2: 对 i 从 0 到 length(vecs) − 1 循环:
 3:     qs ← vecs[i]                         // 当前向量
 4:     qid ← items[i]                       // 当前条目 ID
 5:     lims, D, I ← index.range_search(qs, thresh)
 6:     如果 qid ∈ dups:
 7:         跳过本次循环,继续下一次
 8:     结束条件判断
 9:     start ← lims[0]
10:     end ← lims[1]
11:     duplicate_indices ← I[start : end]
12:     duplicate_ids ← 新建列表()
13:     对 duplicate_indices 中的 j 循环:
14:         如果 items[j] ≠ qid:
15:             duplicate_ids.append(items[j])
16:         结束条件判断
17:     结束循环
18:     dups.update(duplicate_ids)
19: 结束循环
20: 返回 dups                               // 最终重复 ID 集合
原文第 27 页图示
ENGLISH 原文

Figure 16: Results of deduplicating our training datasets for various filtering .

(a) Final result of SSCD over the entire dataset

(b) Result of SSCD with various over 1000 random

中文译文
图 16。不同过滤阈值下,训练数据集的去重结果。(a)整个数据集的 SSCD 去重最终结果。(b)在随机选取的 1000 个簇上,使用不同阈值的 SSCD 去重结果。Threshold 为阈值,Removed 为移除比例。
原文第 27 页

Algorithm 2: Detecting Memorization in Generated Images算法 2:检测生成图像中的记忆

ENGLISH 原文

Algorithm 2 Detecting in Generated Images

0:  Set of prompts P, Number of generations per prompt N, Similarity ϵ=0.15, Memorization threshold T
0:  Detection of memorized images in generated samples
1:  Initialize D to the set of most-duplicated examples
2:  for each prompt p∈P do
3:   for i=1 to N do
4:    Generate image Gen⁡(p,ri) with random seed ri
5:   end for
6:  end for
7:  for each pair of generated images xi,xj do
8:   if distance d⁡(xi,xj)<ϵ then
9:    Connect xi and xj in graph G
10:   end if
11:  end for
12:  for each node in G do
13:   Find largest containing the node
14:   if size of clique ≥T then
15:    Mark images in the clique as memorized
16:   end if
17:  end for
中文译文

输入: 提示词集合 PP;每条提示词的生成次数 NN;相似性阈值 ϵ=0.15\epsilon=0.15;记忆阈值 TT。

目标: 检测生成样本中被记忆的图像。

 1: 将 D 初始化为重复最多的样本集合
 2: 对每个提示词 p ∈ P:
 3:     对 i = 1 到 N:
 4:         使用随机种子 r_i 生成图像 Gen(p; r_i)
 5:     结束循环
 6: 结束循环
 7: 对每一对生成图像 x_i、x_j:
 8:     如果距离 d(x_i, x_j) < ε:
 9:         在图 G 中连接 x_i 与 x_j
10:     结束条件判断
11: 结束循环
12: 对 G 中的每个节点:
13:     找到包含该节点的最大团
14:     如果团的大小 ≥ T:
15:         将团中的图像标记为被记忆
16:     结束条件判断
17: 结束循环
原文第 28 页图示
ENGLISH 原文

Figure 17: SSCD-based prevents . To assess how well our SSCD-based deduplication works, we extract memorized samples from small, specifically for this purpose trained models and compare them before and after deduplication. We plot a comparison between number of memorized samples, before and after using SSCD with the of 0.5 to remove samples. Carlini et al. (2023) mark images within size of 10 as memorized samples. Here we also explore different sizes for cliques. For all clique thresholds, SSCD is able to significantly reduce the number of memorized samples. Specifically, when the clique size is 10, models on the deduplicated training samples cut off at SSCD=0.5 show a 5× reduction in potentially memorized examples.

中文译文
图 17。基于 SSCD 的去重可以防止记忆。 为评估基于 SSCD 的去重效果,我们从专门为此训练的小型模型中提取被记忆样本,并比较去重前后的结果。图中比较了使用阈值为 0.5 的 SSCD 移除近重复样本之前和之后,被记忆样本的数量。Carlini et al.(2023)将团大小为 10 的图像标记为被记忆样本。这里也探索了不同团大小。对于所有团阈值,SSCD 都能显著减少被记忆样本的数量。具体而言,当团大小为 10 时,在以 SSCD=0.5 为截断阈值去重的训练样本上训练的模型,潜在被记忆样本数量减少至原来的五分之一。横轴 Clique size 为团大小,纵轴为被记忆图像数量,Baseline 为基线,SSCD50 表示 SSCD 阈值为 0.5。
原文第 28 页

References: English Titles and Chinese Translations参考文献题名译文与原文著录

以下按原文参考文献顺序翻译题名。作者姓名、期刊会议名称、年份、卷页、DOI、arXiv 编号和网址以随后附上的原始著录页为准,保留原文拼写以便检索。题名中文译法用于理解,不表示这些作品已有官方中文名称。

作者或条目与年份 题名中文翻译
Ideogram,2024
ENGLISH 原文

URL https://about.ideogram.ai/1.0.

中文译文
Ideogram v1.0 发布公告
Playground,2024
中文译文
Playground v2.5 发布公告
Albergo 与 Vanden-Eijnden,2022
ENGLISH 原文

Building normalizing flows with stochastic interpolants, 2022.

中文译文
利用随机插值构建归一化流
Atchison 与 Shen,1980
ENGLISH 原文

Logistic-normal distributions: Some properties and uses.

中文译文
Logistic 正态分布:若干性质与用途
autofaiss,2023
ENGLISH 原文

autofaiss, 2023.

中文译文
autofaiss(软件项目名称)
Balaji 等,2022
ENGLISH 原文

ediff-i: Text-to-image with an ensemble of expert denoisers, 2022.

中文译文
eDiff-I:使用专家去噪器集成的文本生成图像扩散模型
Betker 等,2023
ENGLISH 原文

Improving image generation with better .

中文译文
通过更好的图像描述改进图像生成
Blattmann 等,2023a
ENGLISH 原文

Stable video diffusion: video to large datasets.

中文译文
Stable Video Diffusion:将潜在视频扩散模型扩展到大型数据集
Blattmann 等,2023b
ENGLISH 原文

Align your : High- video synthesis with latent , 2023b.

中文译文
对齐你的潜变量:利用潜在扩散模型进行高分辨率视频合成
Brooks、Holynski 与 Efros,2023
ENGLISH 原文

Instructpix2pix: Learning to follow image editing instructions.

中文译文
InstructPix2Pix:学习遵循图像编辑指令
Carlini 等,2023
ENGLISH 原文

Extracting training data from .

中文译文
从扩散模型中提取训练数据
Carreira 与 Zisserman,2018
ENGLISH 原文

Quo vadis, action recognition? a new model and the kinetics dataset, 2018.

中文译文
动作识别将走向何方?一种新模型与 Kinetics 数据集
Changpinyo 等,2021
ENGLISH 原文

Conceptual 12m: Pushing web-scale image-text pre-training to recognize long-tail visual concepts.

中文译文
Conceptual 12M:推动网络规模的图像文本预训练识别长尾视觉概念
Chen、Chou、Xu 与 Hseu,2019
ENGLISH 原文

Bfloat16: The secret to high performance on cloud tpus, 2019.

中文译文
Bfloat16:云 TPU 高性能的秘诀
Chen、Yu 等,2023
ENGLISH 原文

Pixart-a: Fast training of diffusion transformer for photorealistic text-to-image synthesis, 2023.

中文译文
PixArt-α:用于照片级真实文本生成图像的扩散 Transformer 快速训练
Chen、Rubanova 等,2018
ENGLISH 原文

Neural .

中文译文
神经常微分方程
Cherti 等,2023
ENGLISH 原文

Reproducible laws for contrastive language-image learning.

中文译文
对比式语言图像学习的可复现规模定律
Dai 等,2023
ENGLISH 原文

Emu: Enhancing image generation models using photogenic needles in a haystack, 2023.

中文译文
Emu:利用大海捞针般筛选出的上镜图像增强图像生成模型
Dao 等,2023
ENGLISH 原文

in , 2023.

中文译文
潜在空间中的流匹配
Dehghani 等,2023
ENGLISH 原文

vision transformers to 22 billion parameters, 2023.

中文译文
将视觉 Transformer 扩展到 220 亿参数
Dhariwal 与 Nichol,2021
ENGLISH 原文

beat gans on image synthesis, 2021.

中文译文
扩散模型在图像合成上击败 GAN
Dockhorn、Vahdat 与 Kreis,2021
ENGLISH 原文

Score-based generative modeling with critically-damped langevin diffusion.

中文译文
使用临界阻尼朗之万扩散的基于分数的生成建模
Dockhorn、Vahdat 与 Kreis,2022
ENGLISH 原文

Genie: Higher-order denoising diffusion solvers, 2022.

中文译文
GENIE:高阶去噪扩散求解器
Dosovitskiy 等,2020
ENGLISH 原文

An image is worth 16x16 words: Transformers for image recognition at scale.

中文译文
一幅图像胜过 16×16 个词:用于大规模图像识别的 Transformer
Esser 等,2023
ENGLISH 原文

Structure and content-guided video synthesis with , 2023.

中文译文
使用扩散模型进行结构与内容引导的视频合成
Euler,1768
ENGLISH 原文

Institutionum calculi integralis.

中文译文
积分学教程,第一卷
Fischer 等,2023
ENGLISH 原文

Boosting diffusion with .

中文译文
利用流匹配增强潜在扩散
Ghosh、Hajishirzi 与 Schmidt,2023
ENGLISH 原文

Geneval: An object-focused framework for evaluating text-to-image alignment.

中文译文
GenEval:以物体为中心的文本图像对齐评估框架
Gupta 等,2023
ENGLISH 原文

Photorealistic video generation with , 2023.

中文译文
利用扩散模型生成照片级真实的视频
Hessel 等,2021
ENGLISH 原文

Clipscore: A reference-free for image captioning.

中文译文
CLIPScore:一种无需参考文本的图像描述评估指标
Heusel 等,2017
ENGLISH 原文

Gans trained by a two time-scale update rule converge to a local nash equilibrium, 2017.

中文译文
使用双时间尺度更新规则训练的 GAN 收敛到局部纳什均衡
Ho 与 Salimans,2022
ENGLISH 原文

Classifier-free diffusion guidance, 2022.

中文译文
无分类器扩散引导
Ho、Jain 与 Abbeel,2020
ENGLISH 原文

Denoising diffusion probabilistic models, 2020.

中文译文
去噪扩散概率模型
Ho 等,2022
ENGLISH 原文

Imagen video: High definition video generation with , 2022.

中文译文
Imagen Video:利用扩散模型生成高清视频
Hoogeboom、Heek 与 Salimans,2023
ENGLISH 原文

Simple diffusion: End-to-end diffusion for high images, 2023.

中文译文
Simple Diffusion:用于高分辨率图像的端到端扩散
Huang 等,2023
ENGLISH 原文

T2i-compbench: A for open-world compositional text-to-image generation.

中文译文
T2I-CompBench:面向开放世界组合式文本生成图像的综合基准
Hyvärinen,2005
ENGLISH 原文

Estimation of non-normalized statistical models by .

中文译文
通过分数匹配估计未归一化的统计模型
Kaplan 等,2020
ENGLISH 原文

laws for neural language models, 2020.

中文译文
神经语言模型的规模定律
Karras 等,2022
ENGLISH 原文

Elucidating the design space of diffusion-based generative models.

中文译文
阐明基于扩散的生成模型的设计空间
Karras 等,2023
ENGLISH 原文

Analyzing and improving the training dynamics of .

中文译文
分析并改进扩散模型的训练动态
Kingma 与 Gao,2023
ENGLISH 原文

Understanding diffusion as the elbo with simple data augmentation.

中文译文
将扩散目标理解为具有简单数据增强的证据下界
Lee、Ippolito 等,2021
ENGLISH 原文

Deduplicating training data makes language models better.

中文译文
对训练数据去重能够改善语言模型
Lee、Kim 与 Ye,2023
ENGLISH 原文

Minimizing of ode-based generative models, 2023.

中文译文
最小化基于 ODE 的生成模型的轨迹曲率
Lin、Liu、Li 与 Yang,2024
ENGLISH 原文

Common diffusion noise and sample steps are flawed.

中文译文
常见的扩散噪声调度与采样步存在缺陷
Lin、Maire 等,2014
ENGLISH 原文

Microsoft COCO: Common Objects in Context, pp. 740–755.

中文译文
Microsoft COCO:上下文中的常见物体
Lipman 等,2023
ENGLISH 原文

for generative modeling.

中文译文
用于生成建模的流匹配
Liu、Gong 与 Liu,2022
ENGLISH 原文

Flow straight and fast: Learning to generate and transfer data with , 2022.

中文译文
让流直且快:利用整流流学习生成与迁移数据
Liu、Zhang 等,2023
ENGLISH 原文

Instaflow: One step is enough for high-quality diffusion-based text-to-image generation, 2023.

中文译文
InstaFlow:基于扩散的高质量文本生成图像,一步就够了
Loshchilov 与 Hutter,2017
ENGLISH 原文

Fixing weight decay regularization in adam.

中文译文
修正 Adam 中的权重衰减正则化
Lu 等,2023
ENGLISH 原文

Dpm-solver++: Fast solver for guided of diffusion probabilistic models, 2023.

中文译文
DPM-Solver++:用于扩散概率模型引导采样的快速求解器
Ma 等,2024
ENGLISH 原文

Sit: Exploring flow and diffusion-based generative models with scalable interpolant transformers, 2024.

中文译文
SiT:利用可扩展插值 Transformer 探索基于流与扩散的生成模型
Nichol,2022
ENGLISH 原文

Dall-e 2 pre-training .

中文译文
DALL-E 2 预训练缓解措施
Nichol 与 Dhariwal,2021
ENGLISH 原文

Improved denoising diffusion probabilistic models, 2021.

中文译文
改进的去噪扩散概率模型
NovelAI,2022
ENGLISH 原文

Novelai improvements on stable diffusion, 2022.

中文译文
NovelAI 对 Stable Diffusion 的改进
Peebles 与 Xie,2023
ENGLISH 原文

Scalable with transformers.

中文译文
使用 Transformer 构建可扩展扩散模型
Pernias 等,2023
ENGLISH 原文

Wuerstchen: An efficient for large-scale text-to-image , 2023.

中文译文
Würstchen:一种用于大规模文本生成图像扩散模型的高效架构
Pizzi 等,2022
ENGLISH 原文

A self-supervised descriptor for image copy detection.

中文译文
一种用于图像复制检测的自监督描述符
Po 等,2023
ENGLISH 原文

State of the art on for visual computing.

中文译文
视觉计算扩散模型的最新研究进展
Podell 等,2023
ENGLISH 原文

Sdxl: Improving for high- image synthesis, 2023.

中文译文
SDXL:改进用于高分辨率图像合成的潜在扩散模型
Pooladian 等,2023
ENGLISH 原文

Multisample : Straightening flows with minibatch couplings, 2023.

中文译文
多样本流匹配:利用小批量耦合使流变直
Radford 等,2021
ENGLISH 原文

Learning transferable visual models from natural language supervision, 2021.

中文译文
从自然语言监督中学习可迁移的视觉模型
Rafailov 等,2023
ENGLISH 原文

: Your Language Model is Secretly a Reward Model.

中文译文
直接偏好优化:你的语言模型其实是一个奖励模型
Raffel 等,2019
ENGLISH 原文

Exploring the limits of transfer learning with a unified text-to-text transformer, 2019.

中文译文
利用统一的文本到文本 Transformer 探索迁移学习的极限
Ramesh 等,2022
ENGLISH 原文

Hierarchical text- image generation with clip , 2022.

中文译文
利用 CLIP 潜变量进行分层文本条件图像生成
Rombach 等,2022
ENGLISH 原文

High- image synthesis with .

中文译文
利用潜在扩散模型进行高分辨率图像合成
Ronneberger、Fischer 与 Brox,2015
ENGLISH 原文

U-Net: Convolutional Networks for Biomedical Image , pp. 234–241.

中文译文
U-Net:用于生物医学图像分割的卷积网络
Russakovsky 等,2014
ENGLISH 原文

Imagenet large scale visual recognition challenge.

中文译文
ImageNet 大规模视觉识别挑战
Saharia 等,2022a
ENGLISH 原文

Palette: Image-to-image .

中文译文
Palette:图像到图像扩散模型
Saharia 等,2022b
ENGLISH 原文

Photorealistic text-to-image with deep language understanding, 2022b.

中文译文
具有深度语言理解能力的照片级真实文本生成图像扩散模型
Saharia 等,2022c
ENGLISH 原文

Image super- via iterative refinement.

中文译文
通过迭代细化实现图像超分辨率
Sauer 等,2021
ENGLISH 原文

Projected gans converge faster.

中文译文
投影 GAN 收敛得更快
Sauer 等,2023
ENGLISH 原文

Adversarial diffusion distillation.

中文译文
对抗式扩散蒸馏
Sheynin 等,2023
ENGLISH 原文

Emu edit: Precise image editing via recognition and generation tasks.

中文译文
Emu Edit:通过识别与生成任务实现精确图像编辑
Singer 等,2022
ENGLISH 原文

Make-a-video: Text-to-video generation without text-video data, 2022.

中文译文
Make-A-Video:无需文本视频数据的文本生成视频
Sohl-Dickstein 等,2015
ENGLISH 原文

Deep unsupervised learning using nonequilibrium thermodynamics.

中文译文
利用非平衡热力学进行深度无监督学习
Somepalli 等,2023a
ENGLISH 原文

Diffusion art or digital forgery? investigating data replication in .

中文译文
扩散艺术还是数字伪造?研究扩散模型中的数据复制
Somepalli 等,2023b
ENGLISH 原文

Understanding and copying in .

中文译文
理解并缓解扩散模型中的复制行为
Song、Meng 与 Ermon,2022
ENGLISH 原文

Denoising diffusion implicit models, 2022.

中文译文
去噪扩散隐式模型
Song 与 Ermon,2020
ENGLISH 原文

Generative modeling by estimating gradients of the data distribution, 2020.

中文译文
通过估计数据分布梯度进行生成建模
Song 等,2020
ENGLISH 原文

Score-based generative modeling through stochastic differential equations.

中文译文
通过随机微分方程进行基于分数的生成建模
Tong 等,2023
ENGLISH 原文

Improving and generalizing flow-based generative models with minibatch , 2023.

中文译文
利用小批量最优输运改进并推广基于流的生成模型
Vaswani 等,2017
ENGLISH 原文

is all you need, 2017.

中文译文
注意力就是你所需要的一切
Villani,2008
ENGLISH 原文

: Old and new.

中文译文
最优输运:旧知与新知
Vincent,2011
ENGLISH 原文

A connection between and denoising .

中文译文
分数匹配与去噪自编码器之间的联系
Wallace 等,2023
ENGLISH 原文

Alignment Using .

中文译文
利用直接偏好优化实现扩散模型对齐
Wang 等,2023
ENGLISH 原文

Cogvlm: Visual expert for language models.

中文译文
CogVLM:预训练语言模型的视觉专家
Wortsman 等,2023
ENGLISH 原文

Small-scale proxies for large-scale transformer training instabilities, 2023.

中文译文
大型 Transformer 训练不稳定性的小规模代理研究
Yu 等,2022
ENGLISH 原文

Autoregressive Models for Content-Rich Text-to-Image Generation.

中文译文
扩展自回归模型以实现内容丰富的文本生成图像
Zhai 等,2022
ENGLISH 原文

vision transformers.

中文译文
扩展视觉 Transformer 的规模
Zhang 与 Sennrich,2019
ENGLISH 原文

Root mean square layer , 2019.

中文译文
均方根层归一化

Original Bibliographic Pages原始参考文献著录页

以下保留原文第 13 至 16 页,以保全全部作者、出版信息、链接与原始引用形式。第 13 页顶部的“更广泛的影响”已在前文译出。

原文第 13 页图示
原文第 13 页:参考文献著录,第一页。
原文第 13 页
原文第 14 页图示
原文第 14 页:参考文献著录,第二页。
原文第 14 页
原文第 15 页图示
原文第 15 页:参考文献著录,第三页。
原文第 15 页
原文第 16 页图示
原文第 16 页:参考文献著录,第四页。
原文第 16 页

译文范围核对: 摘要;正文第 1 至 6 节;更广泛的影响;附录 A 至 E.3;公式(1)至(36);表 1 至表 7;图 1 至图 17 的图注;算法 1 与算法 2;原文第 8、18、19 页以及图 9、12、13、15 中的提示词或编辑指令;参考文献题名与原始著录页。

术语约定: Rectified Flow 译为“整流流”;Flow Matching 译为“流匹配”;simulation-free 译为“免模拟”;latent 译为“潜变量”或“潜在”;caption 依上下文译为“图像描述”或“描述”;prompt 译为“提示词”;guidance 译为“引导”;typography 译为“文字排印”;scaling 依上下文译为“规模扩展”或“扩展规模”;token 保留英文;clique 译为“团”。

论文词汇表