前往 WaytoAGI 飞书知识库 · 1 亿+ 次访问的开源 AI 知识库 →
通往 AGI 之路 WaytoAGI

知识库 · AI 绘画

SD.3

Stable Diffusion 3 Medium 正式开源,支持中文输入,艺术表现力和语义理解显著提升。提供多套 ComfyUI 工作流、Colab 一键部署、肖像大师适配及 DreamBooth 微调方案,实测细腻度与属性匹配优秀,已有多个百度网盘和 HuggingFace 下载地址。

Stable DiffusionComfyUIAI生成开源模型

SD.3

6月6日修改

可编辑文档,欢迎实测补充案例(不要照搬复制)

开源牛逼!!!艺术实现上更自由了

用海辛的话说:圣经到香蕉的帧距离缩短了

6月18日

万能君Stable DIffusion 3 生成75000+图片测试,sd3的细腻程度还是不错的

6月12日 模型开源可下载!

下载地址(huggingface比较慢,多放几个百度aea云盘):

链接:
官方下载地址:https://huggingface.cXXo/stabilityai/stable-diffusion-3-medium/tree/main

广告片

00:00/00:22
1x
  • 2x
  • 1.5x
  • 1x
  • 0.75x
  • 0.5x
请试试刷新
00:22
X2Twitter.com_1800866335028879360(720p).mp4
X2Twitter.com_1800866335028879360(720p)

官方三条comfyUI工作流

基础
多提示词
放大

更多工作流 By ZHO

Qwen2 接上 SD3 Medium 支持中文输入,会自动优化并输出英文提示词
文档图片

SD3 dreambooth脚本

放大效果实测

江主测试:艺术感更强了
放大前

放大前

【Zho】关于目前开源的 SD3 Medium 模型的简单说明:

文档图片

基础模型 1+3:(上图)
主模型:sd3_medium
文本编码器:clip_g、clip_l、t5xxl_fp16/t5xxl_fp8_e4m3fn
使用:在 ComfyUI 中使用时需分别通过模型加载器和CLIP加载器加载,t5xxl是非必要项
融合了文本编码器的模型 2 个:(下图)
无T5:sd3_medium_incl_clips = sd3_medium + clip_g + clip_l
有T5:sd3_medium_incl_clips_t5xxlfp8 = sd3_medium + clip_g + clip_l + t5xxl_fp16/t5xxl_fp8_e4m3fn
使用:在 ComfyUI 中使用时直接用模型加载器加载主模型即可,无需CLIP加载器(如同之前的SD1.5或SDXL的基础工作流)

ComfyUI Colab 云部署内置SD3

【Zho】来了朋友们,这版 ComfyUI Colab 云部署已经内置了刚刚开源的 SD3 Medium!!!!!!!!!!!!!!!!!!!!!!!!!
不用煎熬本地下载模型了!!!!直接开箱即用(需colab pro)!!!!
然后我也整理了一版基础工作流!!!!!
SD3 Medium Base工作流(已加入工作流合集):https://github.com/ZHO-ZHO-ZHO/ComfyUI-Workflows-ZHO
文档图片

肖像大师适配SD3(中文版)

【Zho】SD3 Medium 这么强的属性匹配和语义理解,还不赶紧接上 肖像大师(中文版)!!!
肖像大师终于等来了属于它的时代哈哈哈哈哈或,SD3 Medium 各类属性和质感是真的好!!!
文档图片

Feature: speedup[Optional]

硬件实测

只吃香蔡先生:单个整合clip fp8的模型和分开用clip fp16的模型,出图效果都差不多,显存占用后者多了5G
文档图片

文档图片

采样器实测

测试者:江主「 b站主页https://space.bilibili.com/7213238」
文档图片

采样器与调度器测试

测试者: CYCHENYUE
文档图片

【Zho】sd3_medium 分别使用不同文本编码器的对比:
1)+ t5xxl
2)+ clip_l + clip_g
3)+ clip_l + clip_g + t5xxl
在属性匹配和文字上,T5XXL 还是非常关键的,在语义理解上三种其实差不太多(当然加了t5xxl还是会好一些),这和论文的结论基本一致
日常使用建议:由于 t5xxl 比较大,所以对属性匹配和文字无要求的情况可以不使用 t5xxl,建议找到一个算力和效果的平衡点
文档图片

效果实测

测试者:只吃香蔡先生

文档图片

测试者:DREX_

可以点击放大查看对比效果
latentupscale+tilediffusion
文档图片

文档图片

文档图片

mjͼ
文档图片

文档图片

文档图片

ultimateupscale+tilediffusion
文档图片

测试者:宙宙

文档图片

做了不少安全对齐,雕塑都是SFW
文档图片

文档图片

测试者:时辰

文档图片

文档图片

文档图片

文档图片

文档图片

测试者:雨屋景無人 魔杰作 | AiGC | 罗磊

风景细节很棒
文档图片

文档图片

文档图片

室内景观
文档图片

文档图片

文档图片

文档图片

文档图片

文档图片

文档图片

文档图片

文档图片

文档图片

文档图片

测试者:西乔 Catmus

文档图片

文档图片

文档图片

文档图片

文档图片

测试者:鱼白蓝Ava

文档图片

文档图片

测试者:小田

文字效果很稳
文档图片

测试者:AIGC-迪迦奥特曼

文档图片

文档图片

文档图片

文档图片

测试者:牙白

stable diffusion1.5

stable diffusion1.5
文档图片

stable diffusion3

测试者:元峰

文档图片

文档图片

文档图片

文档图片

文档图片

文档图片

文档图片

文档图片

测试者:张余

文档图片

文档图片


6月3日-预告开源

文档图片

文档图片

lykon:别再问我啥时候开源了

lykon:别再问我啥时候开源了
cubiq回复调侃

cubiq回复调侃
收到邮件通知
文档图片

2月23日-模型发布

3月5日-论文发布真开源,写的很细

论文解读:
1⽂⽣图之SD改进的RFFlow MatchingRectified Flow改进的采样⽅法对⽐实验多模态DiT改进的autoencoder⽂本编码器MM-DiTQK-Normalization变尺度位置编码timestep schedule的shift模型scaling实现细节预训练数据处理图像caption预计算图像和⽂本特征Classifier-Free GuidanceDPO性能评测定量评测⼈⼯评测⼩结参考原⽂链接:https://zhuanlan.zhihu.com/p/686273242
2在发布Stable Diffusion 3之后,StabilityAI最近终于放出了SD3的技术报告,相⽐SD之前的版本,SD3有⽐较⼤的改进。⾸先,SD3是⼀个基于Rectified Flow的⽣成模型;其次,SD3引⼊了T5-XXL来作为text encoder来提升模型的⽂本理解能⼒;最后,SD3采⽤了⼀个多模态的DiT架构,并且将模型参数量扩展为8B。从⽬前给出的例⼦和评测上,SD3在⽂字渲染和对⽂本提示词的遵循上,已经达到甚⾄超过⽬前STOA的⽂⽣图模型如DALL·E 3、Midjourney v6和Ideogram v1。这篇⽂章将根据SD3的论⽂分析SD3的具体实现细节。SD3相⽐之前的SD⼀个最⼤的变化是采⽤Rectified Flow来作为⽣成模型,Rectified Flow在FlowStraight and Fast: Learning to Generate and Transfer Data with Rectified Flow被⾸先提出,但其实也有同期的⼯作⽐如Flow Matching for Generative Modeling提出了类似的想法。这⾥和SD3的论⽂⼀样,⾸先将基于Flow Matching来介绍RF,然后再介绍SD3在RF上的具体改进。Flow Matching(FM)是建⽴在continuous normalizing flows的基础上,这⾥将⽣成模型定义为⼀个常微分⽅程(ODE):改进的RFFlow Matchingdz=tv(z,t)dtt
文档图片

论文 pdf

Scaling Rectified Flow Transformers for High-Resolution Image SynthesisPatrick Esser*Sumith KulalAndreas BlattmannRahim EntezariJonas M ¨ullerHarry SainiYam LeviDominik LorenzAxel SauerFrederic BoeselDustin PodellTim DockhornZion EnglishKyle LaceyAlex GoodwinYannik MarekRobin Rombach*Stability AIFigure 1.High-resolution samples from our 8B rectified flow model, showcasing its capabilities in typography, precise prompt followingand spatial reasoning, attention to fine details, and high image quality across a wide variety of styles.AbstractDiffusion models create data from noise by invert-ing the forward paths of data towards noise andhave emerged as a powerful generative modelingtechnique for high-dimensional, perceptual datasuch as images and videos. Rectified flow is a re-cent generative model formulation that connectsdata and noise in a straight line. Despite its bettertheoretical properties and conceptual simplicity, itis not yet decisively established as standard prac-tice. In this work, we improve existing noise sam-pling techniques for training rectified flow mod-els by biasing them towards perceptually relevantscales. Through a large-scale study, we demon-*Equal contribution .<first.last>@stability.ai.strate the superior performance of this approachcompared to established diffusion formulationsfor high-resolution text-to-image synthesis. Ad-ditionally, we present a novel transformer-basedarchitecture for text-to-image generation that usesseparate weights for the two modalities and en-ables a bidirectional flow of information betweenimage and text tokens, improving text comprehen-sion, typography, and human preference ratings.We demonstrate that this architecture follows pre-dictable scaling trends and correlates lower vali-dation loss to improved text-to-image synthesis asmeasured by various metrics and human evalua-tions. Our largest models outperform state-of-the-art models, and we will make our experimentaldata, code, and model weights publicly available.1
Scaling Rectified Flow Transformers for High-Resolution Image Synthesis1. IntroductionDiffusion models create data from noise (Song et al., 2020).They are trained to invert forward paths of data towardsrandom noise and, thus, in conjunction with approximationand generalization properties of neural networks, can beused to generate new data points that are not present inthe training data but follow the distribution of the trainingdata (Sohl-Dickstein et al., 2015; Song & Ermon, 2020).This generative modeling technique has proven to be veryeffective for modeling high-dimensional, perceptual datasuch as images (Ho et al., 2020). In recent years, diffusionmodels have become the de-facto approach for generatinghigh-resolution images and videos from natural languageinputs with impressive generalization capabilities (Sahariaet 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 natureand the associated computational costs, as well as the longsampling times during inference, research on formulationsfor more efficient training and/or faster sampling of thesemodels has increased (Karras et al., 2023; Liu et al., 2022).While specifying a forward path from data to noise leads toefficient training, it also raises the question of which pathto choose.This choice can have important implicationsfor sampling. For example, a forward process that fails toremove all noise from the data can lead to a discrepancyin training and test distribution and result in artifacts suchas gray image samples (Lin et al., 2024). Importantly, thechoice of the forward process also influences the learnedbackward process and, thus, the sampling efficiency. Whilecurved paths require many integration steps to simulate theprocess, a straight path could be simulated with a singlestep and is less prone to error accumulation. Since each stepcorresponds to an evaluation of the neural network, this hasa direct impact on the sampling speed.A particular choice for the forward path is a so-calledRec-tified Flow(Liu et al., 2022; Albergo & Vanden-Eijnden,2022; Lipman et al., 2023), which connects data and noiseon a straight line.Although this model class has bettertheoretical properties, it has not yet become decisively es-tablished in practice. So far, some advantages have beenempirically demonstrated in small and medium-sized ex-periments (Ma et al., 2024), but these are mostly limited toclass-conditional models. In this work, we change this by in-troducing a re-weighting of the noise scales in rectified flowmodels, similar to noise-predictive diffusion models (Hoet al., 2020).Through a large-scale study, we compareour new formulation to existing diffusion formulations anddemonstrate its benefits.We show that the widely used approach for text-to-imagesynthesis, where a fixed text representation is fed directlyinto the model (e.g., via cross-attention (Vaswani et al.,2017; Rombach et al., 2022)), is not ideal, and presenta new architecture that incorporates learnable streams forboth image and text tokens, which enables a two-way flowof information between them. We combine this with ourimproved rectified flow formulation and investigate its scala-bility. We demonstrate a predictable scaling trend in the val-idation loss and show that a lower validation loss correlatesstrongly with improved automatic and human evaluations.Our largest models outperform state-of-the art open modelssuch asSDXL(Podell et al., 2023),SDXL-Turbo(Saueret al., 2023),Pixart-α(Chen et al., 2023), and closed-sourcemodels such as DALL-E 3 (Betker et al., 2023) both inquantitative evaluation (Ghosh et al., 2023) of prompt un-derstanding and human preference ratings.The core contributions of our work are: (i) We conduct alarge-scale, systematic study on different diffusion modeland rectified flow formulations to identify the best setting.For this purpose, we introduce new noise samplers for recti-fied flow models that improve performance over previouslyknown samplers. (ii) We devise a novel, scalable architec-ture for text-to-image synthesis that allows bi-directionalmixing between text and image token streams within thenetwork. We show its benefits compared to established back-bones such as UViT (Hoogeboom et al., 2023) and DiT (Pee-bles & Xie, 2023). Finally, we (iii) perform a scaling studyof our model and demonstrate that it follows predictablescaling trends. We show that a lower validation loss cor-relates strongly with improved text-to-image performanceassessed via metrics such as T2I-CompBench (Huang et al.,2023), GenEval (Ghosh et al., 2023) and human ratings. Wemake results, code, and model weights publicly available.2. Simulation-Free Training of FlowsWe consider generative models that define a mapping be-tween samplesx1from a noise distributionp1to samplesx0from a data distributionp0in terms of an ordinary differ-ential equation (ODE),dyt=vΘ(yt, t)dt ,(1)where the velocityvis parameterized by the weightsΘofa neural network. Prior work by Chen et al. (2018) sug-gested to directly solve Equation (1) via differentiable ODEsolvers. However, this process is computationally expensive,especially for large network architectures that parameterizevΘ(yt, t). A more efficient alternative is to directly regressa vector fieldutthat generates a probability path betweenp0andp1.To construct such aut, we define a forwardprocess, corresponding to a probability pathptbetweenp0andp1=N(0,1), aszt=atx0+btwhere∼ N(0, I).(2)2
生成文本果然还是得靠T5,谷歌的文图匹配模型
文档图片

2月22日 -Emad 预告

文档图片

文档图片

文档图片

案例

Prompt: Resting on the kitchen table is an embroidered cloth with the text 'good night' and an embroidered baby tiger. Next to the cloth there is a lit candle. The lighting is dim and dramatic. #SD3 提示:厨房的桌子上放着一块绣着“晚安”字样的布和一只绣着小老虎的布。在那块布的旁边,有一根点燃的蜡烛。灯光昏暗而富有戏剧性。 #SD3
文档图片

Prompt: The fat cat looks to the side and sits on a green lawn. Portrait of a fluffy white cat with blue eyes in nature, close-up. #SD3 提示:肥猫看向一边,坐在一片绿色草. 坪上。画象一只毛茸茸的白色猫与蓝色眼睛在自然,特写镜头。 #SD3
文档图片

Prompt: Three transparent glass bottles on a wooden table. The one on the left has red liquid and the number 1. The one in the middle has blue liquid and the number 2. The one on the right has green liquid and the number 3. #SD3 提示:三个透明的玻璃瓶在一张木桌上.左边的是红色液体和数字1。中间的那个有蓝色液体和数字2。右边的是绿色液体和数字3。 #SD3
文档图片

Prompt: Night photo of a sports car with the text "SD3" on the side, the car is on a race track at high speed, a huge road sign with the text "faster". #SD3 提示语:一辆跑车的夜间照片,侧面有文字“SD3”,这辆车在高速行驶的赛道上,一个巨大的路标上有文字“更快”。 #SD3
文档图片

Prompt: Photo of an 90's desktop computer on a work desk, on the computer screen it says "welcome". On the wall in the background we see beautiful graffiti with the text "SD3" very large on the wall. #SD3 提示:一张90年代的台式电脑放在办公桌上的照片,电脑屏幕上写着“欢迎”。在背景的墙上, 美丽的涂鸦与文字“SD3”非常大的墙上。 #SD3
文档图片

Prompt: Anime style illustration of a newsstand on top of a small grassy hill, on top of the newsstand we see the text "it's here!". In the background we see a big rain approaching. #SD3 提示:动漫风格的说明,一个报摊上的一个小草山顶,在报摊的顶部,我们看到的文字“它在这里!“.在背景中,我们看到一场大雨正在逼近。 #SD3
文档图片

Prompt: A horse balancing on top of a colorful ball in a field with green grass and a mountain in the background. #SD3 提示:一匹马平衡在一个五颜六色的球在领域与绿色草和山的背景。 #SD3
文档图片

Prompt: A magazine on a glass table, the magazine has the text "incredible" on the cover. The table is in the center of a comfortable room with two very cozy purple sofas. #SD3 提示:玻璃桌上的一本杂志,这本杂志的封面上有“不可思议”的文字。桌子在一个舒适的房间的中心,有两个非常舒适的紫色沙发。 #SD3
文档图片

Prompt: Wide photo of a shipwreck on the beach, lots of rust and moss on the ship contrasting with the beautiful blue of the ocean water and the peace that the beauty of nature conveys. The big waves are magnificent and touch the ship. #SD3 提示语:沉船的宽照片在海滩,许多铁锈和苔藓在与海洋水的美丽的蓝色和自然的美丽传达的和平形成对比的船上大浪磅礴,触船。 #SD3
文档图片

Prompt: This is an original alcohol ink painting that showcases modern art through an abstract and colorful background, resembling marble texture. It's perfect for modern banners and offers an ethereal touch to graphic design. #SD3 提示:这是一幅原创的酒精水墨画,通过抽象和丰富多彩的背景展示现代艺术,类似大理石纹理。它非常适合现代横幅,并为平面设计提供了一种空灵的感觉。 #SD3
文档图片

Prompt: Photo of a rectangular orange neon sign with the text "even more stable", the sign is on the wall in a metro station, subway speeding by in the background, perspective photo. #SD3 提示语:一个长方形的橙子氖招牌的照片与文字“甚至更稳定”,招牌在墙壁上在地铁站,地铁加速通过在背景中,透视照片 #SD3
文档图片

Prompt: Trees photographed under the Milky Way, the moon and twilight shine on the Valley. The full moon appears high in the sky and the twilight glow can still be seen. #SD3 提示:在银河下拍摄的树木,月亮和黄昏照耀着山谷。满月高高地挂在天空中,黄昏的光芒仍然可以看到。 #SD3
文档图片

Prompt: Professional photo of a silhouette of a fighter throwing a punch, professional sport showing strength. The environment is dark with only a backlight that illuminates the fighter. There is smoke in the environment creating a dark sports hall atmosphere. #SD3 提示:专业照片的轮廓的一个战士扔一拳,专业体育显示实力.环境是黑暗的,只有背光照亮战斗机。有烟雾在环境中创造一个黑暗的体育馆的气氛。 #SD3
文档图片

Prompt: Fisheye lens photo where waves hit a lighthouse in Scotland, black waves. #SD3 提示:鱼眼透镜照片海浪击中灯塔在苏格兰,黑色的海浪。 #SD3
文档图片

Prompt: Moody still life of assorted pumpkins. #SD3 提示:穆迪静物什锦南瓜。 #SD3
文档图片

“Photo of a red sphere on top of a blue cube. Behind them is a green triangle, on the right is a dog, on the left is a cat”#SD3 “蓝色立方体上的红色球体的照片。他们身后是一个绿色三角形,右边是一只狗,左边是一只猫。“ #SD3
文档图片

Prompt: cinematic photo of a red apple on a table in a classroom, on the blackboard are the words "go big or go home" written in chalk
提示:电影照片的一个红苹果在一个教室的桌子上,用粉笔在黑板上写“go big or go home”
文档图片

Prompt: a painting of an astronaut riding a pig wearing a tutu holding a pink umbrella, on the ground next to the pig is a robin bird wearing a top hat, in the corner are the words "stable diffusion"
提示语:一幅宇航员骑着猪穿着芭蕾舞裙撑着粉红色雨伞的画,猪旁边的地上是一只戴着礼帽的知更鸟,角落里是“稳定扩散”的字样
文档图片

Prompt: studio photograph closeup of a chameleon over a black background
提示:工作室照片特写镜头的变色龙在黑色背景
文档图片

文档图片

申请的内测名额很快就发了邮件
文档图片

论文解读

作者:林夕 AIGC
来源:知乎
SD3论文重磅最新发布 | Stable Diffusion 3 论文详细细节发布【2024-0305】
📌 元数据概览:标题:Scaling Rectified Flow Transformers for High-Resolution Image Synthesis作者:Patrick Esser, Sumith Kulal, Andreas Blattmann, Rahim Entezari, Jonas M€uller, Harry Saini Yam Levi, Dominik Lorenz, Axel Sauer, Dustin Podell, Tim Dockhorn, Zion English, Kyle Lacey, Alex Goodwin, Yannik Marek, Robin Rombach链接:Stable Diffusion 3 Paper标签:AI, Diffusion Models, Generative Modeling, Image Synthesis, Transformers
✨ 核心观点与亮点:主张:本文提出了一种改进的Rectified Flow模型,用于高分辨率图像合成,并通过大规模研究展示了其优越性能。亮点:提出了一种新的基于Transformer的架构,用于文本到图像的生成,该架构在图像和文本标记之间实现了双向信息流,提高了文本理解、排版和人类偏好评分。核心贡献:通过改进的噪声采样技术,提高了Rectified Flow模型的训练效率,并展示了其在高分辨率文本到图像合成中的性能优势。Motivation:为了解决现有扩散模型在训练和采样效率上的局限性,以及在高分辨率图像合成中的应用潜力,本文提出了新的模型和训练方法。
📚 论文的核心内容,模型结构,关键术语/概念:核心内容:本文介绍了一种新的Rectified Flow模型,该模型通过直连数据和噪声,简化了生成模型的形式,并提出了一种新的Transformer架构,用于处理文本和图像的双向信息流。模型结构详述:模型采用了Rectified Flow的形式,通过改进的噪声采样技术,使得模型在训练过程中更加倾向于感知上相关的尺度。同时,提出了一种多模态扩散骨干网络(MM-DiT),该网络在网络内部分别处理文本和图像信息,并通过注意力机制实现两者之间的信息交流。
🌟 实验结果:核心实验结果:通过大规模研究,展示了新提出的Rectified Flow模型在高分辨率文本到图像合成任务中的优越性能,尤其是在验证损失和人类偏好评分方面与现有模型相比有显著提升。消融实验:本文进行了一系列的消融实验,包括不同的噪声采样策略、模型架构变体以及训练过程中的正则化方法,以验证所提出方法的有效性。
🔄 总结归纳:本文提出了一种新的Rectified Flow模型和基于Transformer的架构,用于高分辨率图像合成。通过改进的噪声采样技术和多模态信息处理,模型在文本到图像的合成任务中取得了显著的性能提升。这些改进不仅提高了模型的生成质量,也为未来的研究和应用提供了新的方向。
6.❓引发思考的问题:
Rectified Flow模型在处理高分辨率图像时的效率和质量如何与现有的扩散模型相比?新提出的Transformer架构在处理多模态数据时有哪些优势?如何进一步优化模型以适应更多样化的图像合成任务?在实际应用中,如何平衡模型的复杂度和生成图像的质量?模型在处理不同风格和复杂度的图像时的鲁棒性如何?

活动预告

文档图片