Denoising diffusion (score-based) generative models have recently achieved significant accomplishments in generating realistic and diverse data. These approaches define a forward diffusion process for transforming data into noise and a backward denoising process for sampling data from noise. Unfortunately, the generation process of current denoising diffusion models is notoriously slow due to the lengthy iterative noise estimations, which rely on cumbersome neural networks. It prevents the diffusion models from being widely deployed, especially on edge devices. Previous works accelerate the generation process of diffusion model (DM) via finding shorter yet effective sampling trajectories. However, they overlook the cost of noise estimation with a heavy network in every iteration. In this work, we accelerate generation from the perspective of compressing the noise estimation network. Due to the difficulty of retraining DMs, we exclude mainstream training-aware compression paradigms and introduce post-training quantization (PTQ) into DM acceleration. However, the output distributions of noise estimation networks change with time-step, making previous PTQ methods fail in DMs since they are designed for single-time step scenarios. To devise a DM-specific PTQ method, we explore PTQ on DM in three aspects: quantized operations, calibration dataset, and calibration metric. We summarize and use several observations derived from all-inclusive investigations to formulate our method, which especially targets the unique multi-time-step structure of DMs. Experimentally, our method can directly quantize full-precision DMs into 8-bit models while maintaining or even improving their performance in a training-free manner. Importantly, our method can serve as a plug-and-play module on other fast-sampling methods, e.g., DDIM.
translated by 谷歌翻译
Diffusion models, which learn to reverse a signal destruction process to generate new data, typically require the signal at each step to have the same dimension. We argue that, considering the spatial redundancy in image signals, there is no need to maintain a high dimensionality in the evolution process, especially in the early generation phase. To this end, we make a theoretical generalization of the forward diffusion process via signal decomposition. Concretely, we manage to decompose an image into multiple orthogonal components and control the attenuation of each component when perturbing the image. That way, along with the noise strength increasing, we are able to diminish those inconsequential components and thus use a lower-dimensional signal to represent the source, barely losing information. Such a reformulation allows to vary dimensions in both training and inference of diffusion models. Extensive experiments on a range of datasets suggest that our approach substantially reduces the computational cost and achieves on-par or even better synthesis performance compared to baseline methods. We also show that our strategy facilitates high-resolution image synthesis and improves FID of diffusion model trained on FFHQ at $1024\times1024$ resolution from 52.40 to 10.46. Code and models will be made publicly available.
translated by 谷歌翻译
DeNoising扩散模型代表了计算机视觉中最新的主题,在生成建模领域表现出了显着的结果。扩散模型是一个基于两个阶段的深层生成模型,一个正向扩散阶段和反向扩散阶段。在正向扩散阶段,通过添加高斯噪声,输入数据在几个步骤中逐渐受到干扰。在反向阶段,模型的任务是通过学习逐步逆转扩散过程来恢复原始输入数据。尽管已知的计算负担,即由于采样过程中涉及的步骤数量,扩散模型对生成样品的质量和多样性得到了广泛赞赏。在这项调查中,我们对视觉中应用的denoising扩散模型的文章进行了全面综述,包括该领域的理论和实际贡献。首先,我们识别并介绍了三个通用扩散建模框架,这些框架基于扩散概率模型,噪声调节得分网络和随机微分方程。我们进一步讨论了扩散模型与其他深层生成模型之间的关系,包括变异自动编码器,生成对抗网络,基于能量的模型,自回归模型和正常流量。然后,我们介绍了计算机视觉中应用的扩散模型的多角度分类。最后,我们说明了扩散模型的当前局限性,并设想了一些有趣的未来研究方向。
translated by 谷歌翻译
扩散概率模型采用前向马尔可夫扩散链逐渐将数据映射到噪声分布,学习如何通过推断一个反向马尔可夫扩散链来生成数据以颠倒正向扩散过程。为了实现竞争性数据生成性能,他们需要一条长长的扩散链,这使它们在培训中不仅在培训中而且发电。为了显着提高计算效率,我们建议通过废除将数据扩散到随机噪声的要求来截断正向扩散链。因此,我们从隐式生成分布而不是随机噪声启动逆扩散链,并通过将其与截断的正向扩散链损坏的数据的分布相匹配来学习其参数。实验结果表明,就发电性能和所需的逆扩散步骤的数量而言,我们的截短扩散概率模型对未截断的概率模型提供了一致的改进。
translated by 谷歌翻译
扩散模型是一类深入生成模型,在具有密集理论建立的各种任务上显示出令人印象深刻的结果。尽管与其他最先进的模型相比,扩散模型的样本合成质量和多样性令人印象深刻,但它们仍然遭受了昂贵的抽样程序和次优可能的估计。最近的研究表明,对提高扩散模型的性能的热情非常热情。在本文中,我们对扩散模型的现有变体进行了首次全面综述。具体而言,我们提供了扩散模型的第一个分类法,并将它们分类为三种类型,即采样加速增强,可能性最大化的增强和数据将来增强。我们还详细介绍了其他五个生成模型(即变异自动编码器,生成对抗网络,正常流量,自动回归模型和基于能量的模型),并阐明扩散模型与这些生成模型之间的连接。然后,我们对扩散模型的应用进行彻底研究,包括计算机视觉,自然语言处理,波形信号处理,多模式建模,分子图生成,时间序列建模和对抗性纯化。此外,我们提出了与这种生成模型的发展有关的新观点。
translated by 谷歌翻译
深度学习表现出巨大的生成任务潜力。生成模型是可以根据某些隐含参数随机生成观测值的模型类。最近,扩散模型由于其发电能力而成为一类生成模型。如今,已经取得了巨大的成就。除了计算机视觉,语音产生,生物信息学和自然语言处理外,还需要在该领域探索更多应用。但是,扩散模型具有缓慢生成过程的自然缺点,从而导致许多增强的作品。该调查总结了扩散模型的领域。我们首先说明了两项具有里程碑意义的作品的主要问题-DDPM和DSM。然后,我们提供各种高级技术,以加快扩散模型 - 训练时间表,无训练采样,混合模型以及得分和扩散统一。关于现有模型,我们还根据特定的NFE提供了FID得分的基准和NLL。此外,引入了带有扩散模型的应用程序,包括计算机视觉,序列建模,音频和科学AI。最后,该领域以及局限性和进一步的方向都进行了摘要。
translated by 谷歌翻译
We show that diffusion models can achieve image sample quality superior to the current state-of-the-art generative models. We achieve this on unconditional image synthesis by finding a better architecture through a series of ablations. For conditional image synthesis, we further improve sample quality with classifier guidance: a simple, compute-efficient method for trading off diversity for fidelity using gradients from a classifier. We achieve an FID of 2.97 on ImageNet 128×128, 4.59 on ImageNet 256×256, and 7.72 on ImageNet 512×512, and we match BigGAN-deep even with as few as 25 forward passes per sample, all while maintaining better coverage of the distribution. Finally, we find that classifier guidance combines well with upsampling diffusion models, further improving FID to 3.94 on ImageNet 256×256 and 3.85 on ImageNet 512×512. We release our code at https://github.com/openai/guided-diffusion.
translated by 谷歌翻译
最近,Rissanen等人(2022年)提出了一种基于热量耗散或模糊的生成建模的新型扩散过程,作为各向同性高斯扩散的替代方法。在这里,我们表明,可以通过与非各向异性噪声的高斯扩散过程来等效地定义模糊。在建立这一联系时,我们弥合了反热量耗散和降解扩散之间的缝隙,并阐明了由于这种建模选择而导致的感应偏置。最后,我们提出了一类普遍的扩散模型,该模型既可以提供标准的高斯denoisis扩散和逆热散热,我们称之为模糊的扩散模型。
translated by 谷歌翻译
denoisis扩散概率模型(DDPM)能够通过引入独立的噪声吸引分类器来在每次deosoing过程的时间步骤中提供条件梯度指导,从而使有条件的图像从先前的噪声到真实数据。但是,由于分类器能够轻松地区分不完全生成的图像仅具有高级结构的能力,因此梯度是一种类信息指导,倾向于尽早消失,导致从条件生成过程中崩溃到无条件过程。为了解决这个问题,我们从两个角度提出了两种简单但有效的方法。对于抽样程序,我们将预测分布的熵作为指导消失水平的度量,并提出一种熵感知的缩放方法,以适应性地恢复条件语义指导。每个生成样品的%。对于训练阶段,我们提出了熵吸引的优化目标,以减轻噪音数据的过度自信预测。在Imagenet1000 256x256中,我们提出的采样方案和训练有素的分类器(预训练的条件和无条件的DDPM模型可以实现10.89%(4.59至4.59至4.09))和43.5%(12至6.78)FID改善。
translated by 谷歌翻译
Conditional diffusion probabilistic models can model the distribution of natural images and can generate diverse and realistic samples based on given conditions. However, oftentimes their results can be unrealistic with observable color shifts and textures. We believe that this issue results from the divergence between the probabilistic distribution learned by the model and the distribution of natural images. The delicate conditions gradually enlarge the divergence during each sampling timestep. To address this issue, we introduce a new method that brings the predicted samples to the training data manifold using a pretrained unconditional diffusion model. The unconditional model acts as a regularizer and reduces the divergence introduced by the conditional model at each sampling step. We perform comprehensive experiments to demonstrate the effectiveness of our approach on super-resolution, colorization, turbulence removal, and image-deraining tasks. The improvements obtained by our method suggest that the priors can be incorporated as a general plugin for improving conditional diffusion models.
translated by 谷歌翻译
过去十年已经开发了各种各样的深度生成模型。然而,这些模型通常同时努力解决三个关键要求,包括:高样本质量,模式覆盖和快速采样。我们称之为这些要求所征收的挑战是生成的学习Trielemma,因为现有模型经常为他人交易其中一些。特别是,去噪扩散模型表明了令人印象深刻的样本质量和多样性,但它们昂贵的采样尚未允许它们在许多现实世界应用中应用。在本文中,我们认为这些模型中的缓慢采样基本上归因于去噪步骤中的高斯假设,这些假设仅针对小型尺寸的尺寸。为了使得具有大步骤的去噪,从而减少去噪步骤的总数,我们建议使用复杂的多模态分布来模拟去噪分布。我们引入了去噪扩散生成的对抗网络(去噪扩散GANS),其使用多模式条件GaN模拟每个去噪步骤。通过广泛的评估,我们表明去噪扩散GAN获得原始扩散模型的样本质量和多样性,而在CIFAR-10数据集中是2000 $ \时代。与传统的GAN相比,我们的模型表现出更好的模式覆盖和样本多样性。据我们所知,去噪扩散GaN是第一模型,可在扩散模型中降低采样成本,以便允许它们廉价地应用于现实世界应用。项目页面和代码:https://nvlabs.github.io/denoising-diffusion-gan
translated by 谷歌翻译
作为生成部件作为自回归模型的向量量化变形式自动化器(VQ-VAE)的集成在图像生成上产生了高质量的结果。但是,自回归模型将严格遵循采样阶段的逐步扫描顺序。这导致现有的VQ系列模型几乎不会逃避缺乏全球信息的陷阱。连续域中的去噪扩散概率模型(DDPM)显示了捕获全局背景的能力,同时产生高质量图像。在离散状态空间中,一些作品已经证明了执行文本生成和低分辨率图像生成的可能性。我们认为,在VQ-VAE的富含内容的离散视觉码本的帮助下,离散扩散模型还可以利用全局上下文产生高保真图像,这补偿了沿像素空间的经典自回归模型的缺陷。同时,离散VAE与扩散模型的集成解决了传统的自回归模型的缺点是超大的,以及在生成图像时需要在采样过程中的过度时间的扩散模型。结果发现所生成的图像的质量严重依赖于离散的视觉码本。广泛的实验表明,所提出的矢量量化离散扩散模型(VQ-DDM)能够实现与低复杂性的顶层方法的相当性能。它还展示了在没有额外培训的图像修复任务方面与自回归模型量化的其他矢量突出的优势。
translated by 谷歌翻译
虽然扩散概率模型可以产生高质量的图像内容,但仍然存在高分辨率图像的关键限制及其相关的高计算要求。最近的矢量量化图像模型已经克服了图像分辨率的这种限制,而是通过从之前的元素 - 明智的自回归采样生成令牌时,这是对图像分辨率的速度和单向的。相比之下,在本文中,我们提出了一种新的离散扩散概率模型,其通过使用无约束的变压器架构作为骨干来支持矢量量化令牌的并行预测。在培训期间,令牌以订单不可知的方式随机掩盖,变压器学会预测原始令牌。这种矢量量化令牌预测的并行性反过来促进了在计算费用的一小部分下的全球一致的高分辨率和多样性图像的无条件生成。以这种方式,我们可以产生超过原始训练集样本的图像分辨率,而另外提供每个图像似然估计(从生成的对抗方法的差点)。我们的方法在密度方面实现了最先进的结果(Lsun卧室:1.51; Lsun Churches:1.12; FFHQ:1.20)和覆盖范围(Lsun卧室:0.83; Lsun Churches:0.73; FFHQ:0.80),并执行竞争对手(LSUN卧室:3.64; LSUN教堂:4.07; FFHQ:6.11)在计算和减少训练套件要求方面提供优势。
translated by 谷歌翻译
扩散模型是强大的生成模型,可使用得分函数模拟扩散过程的反面,以合成噪声数据。扩散模型的采样过程可以解释为求解反向随机微分方程(SDE)或扩散过程的普通微分方程(ODE),通常需要多达数千个离散步骤来生成单个图像。这引发了人们对开发反向S/ODE的有效整合技术的极大兴趣。在这里,我们提出了一种基于得分的采样的正交方法:Denoising MCMC(DMCMC)。 DMCMC首先使用MCMC在数据和方差(或扩散时间)的产品空间中生产样品。然后,使用反向S/ODE积分器来定义MCMC样品。由于MCMC越过数据歧管接近数据,因此为DMCMC生产干净样品的计算成本远小于从噪声中产生干净样品的计算成本。为了验证拟议的概念,我们表明denoing langevin Gibbs(DLG)是DMCMC实例,成功地加速了有关CIFAR10和Celeba-HQ-HQ-256图像生成的这项工作中考虑的所有六个反向S/ODE集成器。值得注意的是,结合了Karras等人的集成商。 (2022)和Song等人的预训练分数模型。 (2021b),DLG达到SOTA结果。在CIFAR10上有限数量的分数功能评估(NFE)设置中,我们有$ 3.86 $ fid,$ \ \ \ \ \ $ \ $ \ $ 2.63 $ fid,$ \ \ \ \ \ \ 20 $ nfe。在Celeba-HQ-256上,我们有$ 6.99 $ fid,$ \ $ \ 160 $ nfe,击败了Kim等人的当前最佳记录。 (2022)在基于分数的型号中,$ 7.16 $ FID,$ 4000 $ NFE。代码:https://github.com/1202KBS/DMCMC
translated by 谷歌翻译
扩散模型(DMS)显示出高质量图像合成的巨大潜力。但是,当涉及到具有复杂场景的图像时,如何正确描述图像全局结构和对象细节仍然是一项具有挑战性的任务。在本文中,我们提出了弗里多(Frido),这是一种特征金字塔扩散模型,该模型执行了图像合成的多尺度粗到1个降解过程。我们的模型将输入图像分解为依赖比例的矢量量化特征,然后是用于产生图像输出的粗到细门。在上述多尺度表示阶段,可以进一步利用文本,场景图或图像布局等其他输入条件。因此,还可以将弗里多应用于条件或跨模式图像合成。我们对各种无条件和有条件的图像生成任务进行了广泛的实验,从文本到图像综合,布局到图像,场景环形图像到标签形象。更具体地说,我们在五个基准测试中获得了最先进的FID分数,即可可和开阔图像的布局到图像,可可和视觉基因组的场景环形图像以及可可的标签对图像图像。 。代码可在https://github.com/davidhalladay/frido上找到。
translated by 谷歌翻译
As a neural network compression technique, post-training quantization (PTQ) transforms a pre-trained model into a quantized model using a lower-precision data type. However, the prediction accuracy will decrease because of the quantization noise, especially in extremely low-bit settings. How to determine the appropriate quantization parameters (e.g., scaling factors and rounding of weights) is the main problem facing now. Many existing methods determine the quantization parameters by minimizing the distance between features before and after quantization. Using this distance as the metric to optimize the quantization parameters only considers local information. We analyze the problem of minimizing local metrics and indicate that it would not result in optimal quantization parameters. Furthermore, the quantized model suffers from overfitting due to the small number of calibration samples in PTQ. In this paper, we propose PD-Quant to solve the problems. PD-Quant uses the information of differences between network prediction before and after quantization to determine the quantization parameters. To mitigate the overfitting problem, PD-Quant adjusts the distribution of activations in PTQ. Experiments show that PD-Quant leads to better quantization parameters and improves the prediction accuracy of quantized models, especially in low-bit settings. For example, PD-Quant pushes the accuracy of ResNet-18 up to 53.08% and RegNetX-600MF up to 40.92% in weight 2-bit activation 2-bit. The code will be released at https://github.com/hustvl/PD-Quant.
translated by 谷歌翻译
基于扩散的生成模型已经证明了感知上令人印象深刻的合成能力,但是它们也可以是基于可能性的模型吗?我们以肯定的方式回答了这一点,并介绍了一个基于扩散的生成模型家族,该模型可以在标准图像密度估计基准上获得最先进的可能性。与其他基于扩散的模型不同,我们的方法允许与其他模型的其余部分共同对噪声时间表进行有效优化。我们表明,根据扩散数据的信噪比,变异下限(VLB)简化为非常短的表达,从而改善了我们对该模型类别的理论理解。使用这种见解,我们证明了文献中提出的几个模型之间的等效性。此外,我们表明连续时间VLB在噪声方面不变,除了其端点处的信噪比。这使我们能够学习一个噪声时间表,以最大程度地减少所得VLB估计器的差异,从而更快地优化。将这些进步与建筑改进相结合,我们获得了图像密度估计基准的最先进的可能性,超过了多年来主导这些基准测试的自回旋模型,通常优化了很多年。此外,我们展示了如何将模型用作BITS背包压缩方案的一部分,并展示了接近理论最佳的无损压缩率。代码可在https://github.com/google-research/vdm上找到。
translated by 谷歌翻译
扩散模型已显示出令人印象深刻的图像产生性能,并已用于各种计算机视觉任务。不幸的是,使用扩散模型的图像生成非常耗时,因为它需要数千个采样步骤。为了解决这个问题,我们在这里提出了一种新型的金字塔扩散模型,以使用训练有位置嵌入的单个分数函数从更粗的分辨率图像开始生成高分辨率图像。这使图像生成的时间效率抽样可以解决,并在资源有限的训练时也可以解决低批量的大小问题。此外,我们表明,使用单个分数函数可以有效地用于多尺度的超分辨率问题。
translated by 谷歌翻译
While deep learning-based methods for blind face restoration have achieved unprecedented success, they still suffer from two major limitations. First, most of them deteriorate when facing complex degradations out of their training data. Second, these methods require multiple constraints, e.g., fidelity, perceptual, and adversarial losses, which require laborious hyper-parameter tuning to stabilize and balance their influences. In this work, we propose a novel method named DifFace that is capable of coping with unseen and complex degradations more gracefully without complicated loss designs. The key of our method is to establish a posterior distribution from the observed low-quality (LQ) image to its high-quality (HQ) counterpart. In particular, we design a transition distribution from the LQ image to the intermediate state of a pre-trained diffusion model and then gradually transmit from this intermediate state to the HQ target by recursively applying a pre-trained diffusion model. The transition distribution only relies on a restoration backbone that is trained with $L_2$ loss on some synthetic data, which favorably avoids the cumbersome training process in existing methods. Moreover, the transition distribution can contract the error of the restoration backbone and thus makes our method more robust to unknown degradations. Comprehensive experiments show that DifFace is superior to current state-of-the-art methods, especially in cases with severe degradations. Our code and model are available at https://github.com/zsyOAOA/DifFace.
translated by 谷歌翻译
Denoising diffusion probabilistic models (DDPM) are a class of generative models which have recently been shown to produce excellent samples. We show that with a few simple modifications, DDPMs can also achieve competitive loglikelihoods while maintaining high sample quality. Additionally, we find that learning variances of the reverse diffusion process allows sampling with an order of magnitude fewer forward passes with a negligible difference in sample quality, which is important for the practical deployment of these models. We additionally use precision and recall to compare how well DDPMs and GANs cover the target distribution. Finally, we show that the sample quality and likelihood of these models scale smoothly with model capacity and training compute, making them easily scalable. We release our code at https://github.com/ openai/improved-diffusion.
translated by 谷歌翻译