图像生成:Consistency Models(一致性模型)


第一次写博客,如果有什么地方说的不对,请指出,一起交流进步!!!

介绍

扩散模型在图像、音频和视频生成方面取得了重大突破,但它们依赖于迭代生成过程,导致采样速度较慢,限制了其实时应用的潜力。为了克服这一限制,我们提出了一致性模型,这是一种新的生成模型家族,可以在没有对抗性训练的情况下实现高样本质量。它们在设计上支持快速的一步生成,同时仍然允许少步采样以换取样本质量的计算。它们还支持零样本数据编辑,如图像修补、着色和超分辨率,而不需要对这些任务进行明确的训练。

在SD中,我们建立在连续时间扩散模型中的概率流(PF)常微分方程(ODE)之上(简单来说,就是图像前向传播的无参加噪过程),其轨迹平滑地将数据分布转换为可处理的噪声分布。而CM可将任何时间步骤的任何分布点映射到轨迹的起点。CM模型的一个显著特性是自一致性:同一轨迹上的点映射到相同的起始点。因此,我们把这样的模型称为一致性模型。
在这里插入图片描述

一、扩散模型

我们这里对扩散模型进行简单流程描述:
1)扩散模型首先使用随机微分方程(SDE)扩散。该SDE存在一个常微分方程(ODE)。请添加图片描述
请添加图片描述
2)pt(x)通过式1理论上逼近标准的高斯分布,为了进行采样,通过分数匹配训练一个分数模型来进行推理。
请添加图片描述

扩散模型的瓶颈在于采样速度慢。使用ODE求解器进行采样需要对评分模型进行多次评估。现有的快速采样方法包括更快的数值ODE求解器和蒸馏技术。ODE求解器仍然需要超过10个评估步骤来生成有竞争力的样本。大多数蒸馏方法,依赖于在蒸馏之前从扩散模型中收集大量的样本数据集,这本身就是计算成本很高的。据我们所知,唯一不受这一缺点影响的蒸馏方法是渐进蒸馏(PD)。

二、一致性模型

一致性模型并不依赖于预训练的扩散模型,是一种独立的新型生成模型一致性函数f的核心为这样一个性质:对于任意一个输入xt,经过f输出后,其输出是一致的。
请添加图片描述

参数化:一致性函数的设计必须保持一个边界条件请添加图片描述
实现边界条件的两种办法:
请添加图片描述

1.算法流程

请添加图片描述
很好理解,和普通扩散模型的流程很相似,先加噪然后再去噪的过程。但是,一致性模型在最开始进行一步迭代输出x,然后在不断迭代过程中对x加噪声然后再进行一步去噪。

2.零样本图像编辑

所谓零样本图像编辑就是模型没有经过相关任务的训练,却能完成这些图像编辑任务。 算法流程如下:请添加图片描述
通过设置合适的变换矩阵 A A A和mask矩阵就可以在迭代过程中不断插值,完成图像编辑任务
比如,完成超分辨率的图像编辑,可采用如下方式。
请添加图片描述
请添加图片描述

总结

一致性模型能够避免扩散模型多次迭代的缺陷,通过对任意时刻的分布xt直接一步输出x,大大降低了生图的时间。当然也可以采用多步迭代的方式来生成高质量图像。另外一致性模型能够在迭代过程中通过插值等操作完成零样本图像编辑任务。

  • 23
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Consistency models are used in distributed computing systems to define the level of consistency that is maintained across different copies of the same data. These models determine how updates to the data are propagated to other copies and how conflicts are resolved when multiple copies are updated simultaneously. There are several consistency models, including: 1. Strong consistency: In this model, all copies of the data are updated synchronously and all updates are visible to all nodes at the same time. This model guarantees that all nodes see the same version of the data at the same time. 2. Weak consistency: In this model, updates are not propagated synchronously and different nodes may have different views of the data at any given time. This model allows for faster updates but may result in temporary inconsistencies. 3. Eventual consistency: In this model, updates are propagated asynchronously and nodes eventually converge to a consistent view of the data. This model allows for high availability and scalability but may result in temporary inconsistencies. 4. Causal consistency: In this model, updates are propagated in a causally consistent manner, meaning that updates that are causally related are propagated in the same order to all nodes. This model provides a compromise between strong and eventual consistency. 5. Read-your-writes consistency: In this model, a node always reads its own writes. This model guarantees that a node will always see its own writes, but may not see the writes of other nodes immediately. Each consistency model has its own trade-offs between performance, availability, and consistency. The choice of consistency model depends on the specific requirements of the application and the underlying distributed system.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值