<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ComfyUI-SD &#8211; 0260</title>
	<atom:link href="https://0to60.top/category/learn-by-doing/comfyui-stablediffusion/feed/" rel="self" type="application/rss+xml" />
	<link>https://0to60.top</link>
	<description>Zero To More</description>
	<lastBuildDate>Wed, 17 Sep 2025 07:56:32 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://0to60.top/wp-content/uploads/2025/05/cropped-ba4ded44ed2ce0995e556ab476fd11d2-1-150x150.jpg</url>
	<title>ComfyUI-SD &#8211; 0260</title>
	<link>https://0to60.top</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>ComfyUI，一致性角色实战篇</title>
		<link>https://0to60.top/comfyui%ef%bc%8c%e4%b8%80%e8%87%b4%e6%80%a7%e8%a7%92%e8%89%b2%e5%ae%9e%e6%88%98%e7%af%87/</link>
					<comments>https://0to60.top/comfyui%ef%bc%8c%e4%b8%80%e8%87%b4%e6%80%a7%e8%a7%92%e8%89%b2%e5%ae%9e%e6%88%98%e7%af%87/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Mon, 15 Sep 2025 09:25:00 +0000</pubDate>
				<category><![CDATA[ComfyUI-SD]]></category>
		<category><![CDATA[ComfyUI]]></category>
		<category><![CDATA[Comfyui实践篇]]></category>
		<guid isPermaLink="false">https://0to60.top/?p=1015</guid>

					<description><![CDATA[<p>引言 为避免陷入学习陷阱，以阶段性目&#46;&#46;&#46;</p>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8c%e4%b8%80%e8%87%b4%e6%80%a7%e8%a7%92%e8%89%b2%e5%ae%9e%e6%88%98%e7%af%87/">ComfyUI，一致性角色实战篇</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">引言</h2>



<p>为避免陷入学习陷阱，以阶段性目标为导引，约束学习路径。</p>



<p>本期学习目标为实现一致性角色，最终表现为训练一个Flux LoRa模型，整体思路为：</p>



<ul class="wp-block-list">
<li>人物角色初始化：得到一张满意的T-POSE正面全身照和高清的头部图像。</li>



<li>角色多视角实现：基于初始化角色，得到不同视角的的图片。</li>



<li>丰富角色表情：给所有图片增加表情。</li>



<li>丰富背景：给增加表情后的图片增加背景。（至此，得到训练模型的图片素材）</li>



<li>素材处理：给素材批量修改大小及打标。</li>



<li>模型训练。</li>
</ul>



<h2 class="wp-block-heading">一、人物角色初始化</h2>



<p>此步骤较为简单，目标有两个。</p>



<ul class="wp-block-list">
<li>获得一张T-POSE正面全身照。</li>



<li>得到头部的高清放大图，作为之后脸部特征的依据。</li>
</ul>



<h3 class="wp-block-heading">1.1 T-Pose角色图生成</h3>



<p>此处采用的是FLUX模型。</p>



<p>一般来说，获取一个角色要么随机，要么是想这个角色带有某个目标人物的脸部特征。在Flux中，可加入一个PuLID模块，用于提取目标人物的脸部特征。</p>



<p>工作流图示如下：</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image.png" alt="" class="wp-image-1018" srcset="https://0to60.top/wp-content/uploads/2025/09/image.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-700x394.png 700w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<h3 class="wp-block-heading">1.2 头部高清放大</h3>



<p>基本思路：</p>



<ul class="wp-block-list">
<li>提取T-Pose角色的头部区域</li>



<li>SD放大+FaceDetail，SD放大过程中为防止和原图相差过大，通过图片反推提示词+ControlNet_Tile保留原图特征。</li>



<li>为保留原角色图片色彩风格，增加一个色彩匹配节点。</li>
</ul>



<p>工作流图示如下：</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-1.png" alt="" class="wp-image-1020" srcset="https://0to60.top/wp-content/uploads/2025/09/image-1.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-1-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-1-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-1-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-1-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-1-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-1-700x394.png 700w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<h2 class="wp-block-heading">二、角色多视角图</h2>



<p>此步骤主要目的是基于第一步得到的正面T-Pose图片得到多视角图，整体思路为：</p>



<ul class="wp-block-list">
<li>获取多视角参考图，为后续的图片生成提供Controlnet引导(Pose，depth，cany)。(如果已经有了多视角CN控制图，可以省略此步)</li>



<li>基于T-Pose图，在多视角参考图提供的CN控制下，生成多视角图片。</li>



<li>由于参考生图通常会使得面部特征相差较大，还需进行脸部处理，用换脸思路即可。</li>
</ul>



<h3 class="wp-block-heading">2.1 获取多视角参考图</h3>



<p>可以在网上搜寻多视角的参考图，关键词如：pose sheet，但通常很难得到能直接用的参考图。</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="486" src="https://0to60.top/wp-content/uploads/2025/09/image-3-1024x486.png" alt="" class="wp-image-1022" srcset="https://0to60.top/wp-content/uploads/2025/09/image-3-1024x486.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-3-300x142.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-3-768x364.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-3-1536x729.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-3.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>有些UP/博主也会直接分享通用的CN控制图，如下图，但抽卡表现上稳定性不高。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="297" height="300" src="https://0to60.top/wp-content/uploads/2025/09/image-2.png" alt="" class="wp-image-1021"/></figure>



<p>在多次实践后，为生成较为稳定的结果，本次采用的思路是：</p>



<ul class="wp-block-list">
<li>利用MV-Adapter，基于T-Pose图先生成<strong>六视角</strong>图，虽然细节特征会相差较大，但整体身型/色彩的一致性有较好表现，之后提取的CN控制图会较为契合目标。</li>
</ul>



<p>工作流图示如下：</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-4.png" alt="" class="wp-image-1023" srcset="https://0to60.top/wp-content/uploads/2025/09/image-4.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-4-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-4-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-4-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-4-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-4-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-4-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<h3 class="wp-block-heading">2.2 生成多视角角色图片</h3>



<p><strong>前置准备：</strong></p>



<p>T-Pose图提供整体身型、服饰、发型等元素信息，多视角参考图提供CN-控制信息(本次使用是Pose图)。</p>



<p><strong>整体思路：</strong></p>



<ul class="wp-block-list">
<li>利用Fill+Redux的组合，可以生成和T-Pose相似的图片(整体身型，内容，色彩等)，但缺点是姿势不能控制。（PS: Comfyui自带的Redux相当强大，极难更改姿势信息，建议使用Redux Adv）</li>



<li>在Fill+Redux的基础上，增加Controlnet模块，控制姿势。</li>
</ul>



<p>工作流核心图示如下：</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-5.png" alt="" class="wp-image-1024" srcset="https://0to60.top/wp-content/uploads/2025/09/image-5.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-5-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-5-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-5-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-5-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-5-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-5-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<p>Fill+Redux组合工作流采用后得到想要的多视角图片</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-6.png" alt="" class="wp-image-1025" srcset="https://0to60.top/wp-content/uploads/2025/09/image-6.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-6-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-6-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-6-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-6-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-6-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-6-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<h3 class="wp-block-heading"><strong>2.3 </strong>换脸</h3>



<p>2.2 生成的多视角图虽然整体内容非常相似，但在脸部特征上会有较大区别，所以会在此基础上，利用换脸工作流进行脸部特征处理，此时1.2步骤中得到的头部图就起到了比较好的作用。</p>



<p>换脸工作流较多，SD1,5/XL或Flux都有较为成熟的处理方法，本次采用的是Flux，整体思路为：</p>



<ul class="wp-block-list">
<li>将目标图片(需要换脸的图片)的头部区域截取下来。</li>



<li>将其Resize到100W像素左右(+-30%)，Flux在此大小上生成效果较好。</li>



<li>通过Fill重绘，对截取后图片的脸部区域进行重绘，此处同时采用了PuLID+Redux+Ace(Potrait)进行脸部特征提取。</li>



<li>将重绘后的图片还原到目标图片上。</li>
</ul>



<p>工作流核心图示如下：</p>



<p>重绘前的准备</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-7.png" alt="" class="wp-image-1026" srcset="https://0to60.top/wp-content/uploads/2025/09/image-7.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-7-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-7-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-7-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-7-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-7-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-7-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<p>Fill+Redux+Ace(Portrait)+PuLID应用：</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-9-1024x576.png" alt="" class="wp-image-1028" srcset="https://0to60.top/wp-content/uploads/2025/09/image-9-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-9-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-9-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-9-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-9-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-9-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-9.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>将重绘后的脸部区域还原到目标图片中</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-10.png" alt="" class="wp-image-1029" srcset="https://0to60.top/wp-content/uploads/2025/09/image-10.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-10-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-10-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-10-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-10-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-10-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-10-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<h2 class="wp-block-heading">三、丰富角色表情</h2>



<p>此步骤的目标为生成的多视角图进行表情处理，整体思路为：</p>



<ul class="wp-block-list">
<li>图片剪裁，只保留肩部以上区域。这样大多的素材会集中在头部。</li>



<li>表情移植</li>
</ul>



<h3 class="wp-block-heading">3.1 图片剪裁</h3>



<p>略，随便搭个工作流即能批量处理即可</p>



<h3 class="wp-block-heading">3.2 表情移植</h3>



<p>表情移植的一个准备工作是找到表情参考图片，方法有很多，这里列举一些：</p>



<ul class="wp-block-list">
<li>可以自己生成一些表情图，但是通过基本模型生成的人物表情不够丰富，可以寻找一些表情LoRa.</li>



<li>寻找一些现成的表情参考图，如搜索关键词：Expression Sheet.</li>
</ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="911" src="https://0to60.top/wp-content/uploads/2025/09/image-12.png" alt="" class="wp-image-1032" srcset="https://0to60.top/wp-content/uploads/2025/09/image-12.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-12-300x142.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-12-1024x486.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-12-768x364.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-12-1536x729.png 1536w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<p>有了表情参考图后，就可以利用livePortrait进行表情移植，值得一提的是，LP在不同风格（写实、3D、2D）的表情移植上不如人意，特别是眼睛的表达上，在此，经过大量实践，得到以下工作流。</p>



<p>工作流图示如下：</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-11.png" alt="" class="wp-image-1031" srcset="https://0to60.top/wp-content/uploads/2025/09/image-11.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-11-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-11-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-11-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-11-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-11-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-11-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<h2 class="wp-block-heading">四、丰富背景</h2>



<p>丰富背景的方式有很多，Flux也可以利用Fill+Redux重绘的方式进行背景更换，本次采用的是IC-Light，截止写作为止，IC-Light本地部署只支持了SD15，效果上，会兼顾背景和光影效果。</p>



<p>工作流图示如下：</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-13.png" alt="" class="wp-image-1033" srcset="https://0to60.top/wp-content/uploads/2025/09/image-13.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-13-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-13-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-13-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-13-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-13-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-13-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<p>至此训练素材就生成完毕(生成过程中，其实也可以用InstantID保持脸部特征)</p>



<figure class="wp-block-video"><video height="906" style="aspect-ratio: 680 / 906;" width="680" controls src="https://0to60.top/wp-content/uploads/2025/09/20250915164626_rec_.mp4"></video></figure>



<h2 class="wp-block-heading">五、素材处理</h2>



<h3 class="wp-block-heading">5.1 图片大小的预处理</h3>



<p>由于本次生成图片都是768*768，比较符合训练需要，所以实践中赞未涉及。</p>



<p>略</p>



<h3 class="wp-block-heading"><strong>5.2 图片批量打标</strong></h3>



<p>很多模型训练工具都提供了打标功能，如Fluxgym、秋叶模型训练器等，但是都有其缺点，目前采用的是joy caption，注意：触发提示词尽量要用一个不常见的词，实践中用的Utwin其实并不可取。</p>



<p>工作流图示如下：</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-14.png" alt="" class="wp-image-1036" srcset="https://0to60.top/wp-content/uploads/2025/09/image-14.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-14-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-14-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-14-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-14-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-14-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-14-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<h2 class="wp-block-heading"><strong>六、模型训练</strong></h2>



<p>模型训练，可以随便选一个训练器，本次实践中采用的是秋叶模型训练器。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-15.png" alt="" class="wp-image-1037" srcset="https://0to60.top/wp-content/uploads/2025/09/image-15.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-15-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-15-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-15-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-15-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-15-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-15-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<p>主要参数：</p>



<ul class="wp-block-list">
<li>每张图片训练次数/epoch，没地方设置，但是实际是5次/img，当你开始训练时，会将图片路径下的所有图片打包到一个文件夹，以times_randomtext的形式进行命名，times即表示每张图片训练多少次。</li>



<li>epoch总数，实践设置为10</li>



<li>每2epoch保存一次模型</li>



<li>network_dims为32</li>



<li>学习率：1e-4</li>
</ul>



<p>这是第一次进行模型训练，有很多影响因素值得研究，仅这次而言。</p>



<ul class="wp-block-list">
<li>模型明显将发型及晚礼服肩带特征学习进去，这不在目标范围，明显和素材及打标方式强相关。</li>



<li>脸部特征其实并没有达到我想要的程度，不过在3D风格上有意想不到的效果</li>
</ul>



<p>实际生图效果如下：</p>



<figure class="wp-block-image size-full lightbox"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://0to60.top/wp-content/uploads/2025/09/image-16.png" alt="" class="wp-image-1038" srcset="https://0to60.top/wp-content/uploads/2025/09/image-16.png 1920w, https://0to60.top/wp-content/uploads/2025/09/image-16-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-16-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-16-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-16-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-16-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-16-700x394.png 700w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></figure>



<p>至此，人物角色一致性的实战就到此告一段落，每个步骤都有多种方式实现，之后会尝试以视频的方式进行分享讲解，敬请期待。</p>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8c%e4%b8%80%e8%87%b4%e6%80%a7%e8%a7%92%e8%89%b2%e5%ae%9e%e6%88%98%e7%af%87/">ComfyUI，一致性角色实战篇</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/comfyui%ef%bc%8c%e4%b8%80%e8%87%b4%e6%80%a7%e8%a7%92%e8%89%b2%e5%ae%9e%e6%88%98%e7%af%87/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		<enclosure url="https://0to60.top/wp-content/uploads/2025/09/20250915164626_rec_.mp4" length="4916764" type="video/mp4" />

			</item>
		<item>
		<title>ComfyUI，Flux入门总结篇</title>
		<link>https://0to60.top/comfyui%ef%bc%8cflux%e5%85%a5%e9%97%a8%e6%80%bb%e7%bb%93%e7%af%87/</link>
					<comments>https://0to60.top/comfyui%ef%bc%8cflux%e5%85%a5%e9%97%a8%e6%80%bb%e7%bb%93%e7%af%87/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Sun, 14 Sep 2025 03:46:59 +0000</pubDate>
				<category><![CDATA[ComfyUI-SD]]></category>
		<category><![CDATA[ComfyUI]]></category>
		<category><![CDATA[FLUX]]></category>
		<guid isPermaLink="false">https://0to60.top/?p=940</guid>

					<description><![CDATA[<p>引言 本篇文章的阅读前置条件(必须)&#46;&#46;&#46;</p>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8cflux%e5%85%a5%e9%97%a8%e6%80%bb%e7%bb%93%e7%af%87/">ComfyUI，Flux入门总结篇</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">引言</h2>



<p>本篇文章的阅读前置条件(必须)：</p>



<ul class="wp-block-list">
<li>需阅读<a href="https://0to60.top/2025/07/09/comfyui%ef%bc%8csd1-5-xl%e5%9f%ba%e7%a1%80%e6%80%bb%e7%bb%93%e7%af%87/" data-type="post" data-id="931">《ComfyUI，SD基础总结篇》</a></li>
</ul>



<p>介绍内容包含：</p>



<ul class="wp-block-list">
<li>核心概念的理解</li>



<li>基本工作流及主要控制模块总结</li>
</ul>



<p>在<a href="https://0to60.top/2025/07/09/comfyui%ef%bc%8csd1-5-xl%e5%9f%ba%e7%a1%80%e6%80%bb%e7%bb%93%e7%af%87/" data-type="post" data-id="931">《ComfyUI，SD基础总结篇》</a>中，我们已经了解了 Stable Diffusion 1.5 和 SDXL。它们就像拥有精湛技艺的<strong>“雕塑家”</strong>，从“混沌石料”中一步步雕刻出令人惊叹的作品，代表着当前主流的 AI 图像生成技术。</p>



<p></p>



<p>现在，是时候揭开 AI 绘画领域另一条前沿技术路径的面纱了——介绍 Flux。Flux 不再是 SDXL 的简单升级，它代表了图像生成方式上的一种架构创新，为 AI 绘画带来了新的可能性。它并非要取代 SDXL，而是提供了一个不同的、有潜力的技术方向。</p>



<h2 class="wp-block-heading">一、Flux核心理解</h2>



<p>虽然在底层技术原理上，会有较大的区别。但在应用层的理解上，我们仍然可以使用SD15/XL的理解<a href="https://0to60.top/2025/07/09/comfyui%ef%bc%8csd1-5-xl%e5%9f%ba%e7%a1%80%e6%80%bb%e7%bb%93%e7%af%87/" data-type="post" data-id="931" target="_blank" rel="noreferrer noopener nofollow">《ComfyUI，SD基础总结篇》</a>，一句话：</p>



<p><strong><strong><strong>独具特色的雕塑家拿着原始石料在设计需求说明书的指引下按某种雕塑策略进行雕塑创作</strong></strong></strong>，同样的，也有以下核心概念。</p>



<ul class="wp-block-list">
<li><strong>雕塑家：</strong>Diffusion Model，每个雕塑家都有自己的特色，如：Flux1-dev，Flux1-fill-dev，Flux1-cany/depth-dev，Flux1-kontext等。</li>



<li><strong>原始石料：</strong>latent image，潜空间图像，SD1.5&amp;SDXL&amp;FLUX都是在潜空间进行图像生成的，至于为什么需要在潜空间中进行，最大原因是能极大的压缩空间，使得寻常硬件得以计算。总之，可以将其理解为创作所需的原始石料，以下如何获取原始石料的方式：
<ul class="wp-block-list">
<li>直接提供latent image，设定长宽。</li>



<li>将原始空间图像(寻常人眼感知的图片)通过VAE Encode的方式转换成潜空间图像。</li>
</ul>
</li>



<li><strong>作品去色/上色器</strong>：VAE Encode/Decode，将原始空间图像(人眼寻常感知的图片)转变成潜空间图像，这个过程也称为编码Encode，好比对雕塑成品进行去色，从而得到石料本体；同时也支持从潜空间图像转换成原始空间图像，这个过程称为Decode，好比对雕塑完毕的石料本体进行上色。这个去色和上色规则记录在VAE model中，即需要加载这个模型。</li>



<li><strong>设计需求说明书</strong>：Text Embedding(pos + neg)，用于指导雕塑家进行雕刻，雕塑家每次雕刻都需参照设计需求说明书。如何获得需求设计说明书：
<ul class="wp-block-list">
<li>通过一个转换器Text Embedding Encode将自然语言(人类语言，通常是英文)转换成雕塑家能理解的设计需求说明书，转换规则被记录在CLIP model中，即需要加载这个模型。</li>
</ul>
</li>



<li><strong>雕塑策略</strong>：调度器(scheduler)、去噪步数(steps)，采样器(sampler)。其好比雕刻策略，先制定整个雕刻计划(“路线图”)，决定了在整个生成过程需要去除的石料应该如何逐渐减少；再定义执行步骤数量，越多，耗费时间越长，就越细致；最后，基于路线图，在每一步中具体执行雕刻动作，计算并将多余的石料进行雕刻去除。</li>
</ul>



<h2 class="wp-block-heading">二、核心组件/概念理解</h2>



<p>主要介绍与SD15/XL有区别的一些组件和概念</p>



<ul class="wp-block-list">
<li><strong>DualCLIPLoader：</strong>和在SD15及XL中一样，Flux依然需要一个CLIP模型将自然语言转换成设计需求说明书，只是这里需要指定两个模型：CLIP_I和CLIP_T5。其设计思路与SDXL基本一致。</li>



<li><strong>LoadVae：</strong>与SD15和XL不一样的是，Flux在使用上会单独指定配套的VAE模型，一般名称叫ae.sft或者ae.safetensors.</li>



<li><strong>FluxGuidance：</strong>此处与SD15和XL有较大区别，对标其CFG。
<ul class="wp-block-list">
<li>Flux将引导条件融合到一起，不再区分positive和negative。（若使用ksampler，negative可接空条件）</li>



<li>在flux的实际使用中，不再使用cfg参数，取代而代之的是guidance参数，表示条件引导的程度。（若依然使用ksampler，将其设置为1，否则会产生糊图。）</li>



<li>guidance的参数值，在Flux1-dev中，一般设置为3.5，在Fill+redux组合使用中，一般在[30-50]中选择。</li>
</ul>
</li>



<li><strong>Redux：</strong>Flux提供的配套风格模型，就实际使用效果来说，其实就是通过Clip vision encode提取参考图的细节信息，再通过apply style model(redux模型作为规则转换器)并将其补充到<strong>设计需求说明书</strong>中，值得注意的是，redux的引导强度相当强烈，若使用原生自带的节点，基本上很难和CN及其他控制模块共同作用与图像生成，建议使用redux adv节点(实测有效)。</li>
</ul>



<h2 class="wp-block-heading"><strong>三、Flux工作流</strong>总结</h2>



<p>在实践探索过程中，FLUX在思路上和SD15/XL并没有什么大的差别。先学习了基本文生图/图生图/重绘之后，再加入一些其他控制模块，主要包括：</p>



<ul class="wp-block-list">
<li>LoRa：有一些比较有意思的LoRa，包括消除LoRa，图像编辑LoRa</li>



<li>IP-Adapter：对雕塑家进行增强训练(风格内容参考）</li>



<li>PuLID：对嗲苏佳进行增加训练(脸部参考)</li>



<li>Controlnet：对需求设计说明书进行补充说明</li>



<li>Redux：对需求设计说明书进行补充说明</li>
</ul>



<p>这样就能得到FlUX工作流的各种变体。</p>



<p>本部分主要介绍内容：</p>



<ul class="wp-block-list">
<li>FLUX.1-DEV基本工作流</li>



<li>FLUX.1-FILL-DEV基本工作流</li>



<li>Redux模块&amp;其余控制模块，和SD15/XL其实并为太大区别</li>
</ul>



<p>FLUX.1-cany/depth模型并无太多应用场景，此处主要对FLUX特有的模块进行进行介绍，另外对FLUX.1-DEV和FLUX.1-FILL-DEV模型进行工基本作流总结。</p>



<h3 class="wp-block-heading">3.2 FLUX.1-DEV 工作流</h3>



<h4 class="wp-block-heading">3.2.1 基本文生图</h4>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-17-1024x576.png" alt="" class="wp-image-1058" srcset="https://0to60.top/wp-content/uploads/2025/09/image-17-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-17-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-17-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-17-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-17-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-17-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-17.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>和SD15/XL差别不大，主要区别在于：</p>



<ul class="wp-block-list">
<li>model/clip/vae的加载方式不一样：
<ul class="wp-block-list">
<li>model的加载节点是Load Diffusion Model</li>



<li>clip是dualcliploader，需要指定一个Clip_I和T5模型</li>



<li>vae也要单独指定与Flux配套的模型，ae.sft</li>
</ul>
</li>



<li>ksampler使用变化
<ul class="wp-block-list">
<li>中的cfg参数固定为1(该参数已经没啥用了)，设计需求说明书的遵循程度变为了另一个flux参数：guidance，越高，约束能力越强，反之越能发挥自由度。</li>



<li>由于Flux不再区分正负prompt，使用ksampler时，neg-prompt为空即可。</li>
</ul>
</li>
</ul>



<h4 class="wp-block-heading">3.2.2 基本图生图</h4>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-18-1024x576.png" alt="" class="wp-image-1060" srcset="https://0to60.top/wp-content/uploads/2025/09/image-18-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-18-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-18-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-18-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-18-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-18-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-18.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>没什么好说的，一般来说很少用到直接图生图的情况，目前就两种：</p>



<ul class="wp-block-list">
<li>放大图生图重绘增加细节</li>



<li>粗略的风格转绘</li>
</ul>



<h3 class="wp-block-heading">3.2 FLUX.1-FILL-DEV工作流</h3>



<h4 class="wp-block-heading">3.2.1 局部重绘（inpaint）</h4>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-23-1024x576.png" alt="" class="wp-image-1075" srcset="https://0to60.top/wp-content/uploads/2025/09/image-23-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-23-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-23-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-23-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-23-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-23-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-23.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>大方向和SD15/XL类型，在使用上有以下差异：</p>



<ul class="wp-block-list">
<li>重绘时，是用FILL模型</li>



<li>基本工作流中，FluxXGuidance参数一般设置为30，也可以尝试其他的。</li>



<li>FILL模型的所有工作流中，都建议加入一个节点Differential Diffusion，它的核心作用正是<strong>参照一个已有的图像，从而让新生成的内容在风格、色彩或氛围上与之保持协调一致</strong>。</li>
</ul>



<h4 class="wp-block-heading">3.2.2 扩展绘制（outpaint）</h4>



<p>所谓的扩展绘制其实和重绘区别不大，只是不图片原有区域进行绘制，增加新的区域进行内容补充。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-24-1024x576.png" alt="" class="wp-image-1076" srcset="https://0to60.top/wp-content/uploads/2025/09/image-24-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-24-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-24-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-24-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-24-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-24-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-24.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">3.3 FLUX其他控制模块</h3>



<h4 class="wp-block-heading"><strong>3.3.1 一些好玩的LoRa</strong></h4>



<ul class="wp-block-list">
<li>消除LoRa，结合FILL模型，可以很好的消除不需要的元素，也能起到修复效果。</li>



<li>加速LoRa，能让出图步数控制在8步甚至4步内。</li>



<li>编辑LoRa，结合FILL模型，能实现图像编辑效果。具体在此不再细说</li>
</ul>



<h4 class="wp-block-heading">3.3.2 FLUX.1-Redux-DEV 模块</h4>



<p>Redux是Flux中特有的一个模块，使用工作流图示如下：</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-19-1024x576.png" alt="" class="wp-image-1061" srcset="https://0to60.top/wp-content/uploads/2025/09/image-19-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-19-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-19-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-19-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-19-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-19-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-19.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>基于输入输出来看这个模块，其实就两个步骤：</p>



<ul class="wp-block-list">
<li>其实就是将图片信息抽取出来(CLIP Vision Encode)，CLIP Vision模型提供抽取规则。</li>



<li>再将抽取的信息通过一个转化器（Apply Style Model）增加到需求设计说明书中(Embedding)，Redux模型提供转换规则。</li>
</ul>



<p>就实践而言，Redux对整体的色彩风格、内容、结构都提取得比较到位，但是在一些细节特征上表现不太好(如脸部特征)。</p>



<h4 class="wp-block-heading">3.3.3 Flux IPAdapter模块</h4>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-20-1024x576.png" alt="" class="wp-image-1072" srcset="https://0to60.top/wp-content/uploads/2025/09/image-20-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-20-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-20-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-20-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-20-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-20-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-20.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>使用上，和SD15/XL区别不大，需使用xlabs团队提供的x-flux-comfyui插件</p>



<p>基于输入输出来看这个模块，</p>



<ul class="wp-block-list">
<li>其实就是先基于CLIP Vision模型的规则将图片信息抽取出，在通过FLUX Adapter模型对雕塑家(diffusion model)进行训练。</li>
</ul>



<h4 class="wp-block-heading">3.3.4 PuLID模块</h4>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-21-1024x576.png" alt="" class="wp-image-1073" srcset="https://0to60.top/wp-content/uploads/2025/09/image-21-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-21-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-21-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-21-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-21-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-21-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-21.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>对标FaceID，SDXL中也可使用。<br>使用FLUX版本需要结合PuLID-Flux-Enhanced插件使用。</p>



<p>用于提取脸部信息，并让雕塑家(diffusion model)增强训练学习.</p>



<h4 class="wp-block-heading">3.3.5 Controlnet</h4>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://0to60.top/wp-content/uploads/2025/09/image-25-1024x576.png" alt="" class="wp-image-1077" srcset="https://0to60.top/wp-content/uploads/2025/09/image-25-1024x576.png 1024w, https://0to60.top/wp-content/uploads/2025/09/image-25-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/09/image-25-768x432.png 768w, https://0to60.top/wp-content/uploads/2025/09/image-25-1536x864.png 1536w, https://0to60.top/wp-content/uploads/2025/09/image-25-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/09/image-25-700x394.png 700w, https://0to60.top/wp-content/uploads/2025/09/image-25.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>没什么好说的，为设计需求说明书增加额外条件信息。</p>



<h2 class="wp-block-heading">三、最后</h2>



<p>Flux的的变体工作流基本上就是基本工作流+控制模块的灵性组合，后续有机会可能出视频或者直播进行细致讲解，敬请期待。</p>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8cflux%e5%85%a5%e9%97%a8%e6%80%bb%e7%bb%93%e7%af%87/">ComfyUI，Flux入门总结篇</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/comfyui%ef%bc%8cflux%e5%85%a5%e9%97%a8%e6%80%bb%e7%bb%93%e7%af%87/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ComfyUI，SD基础总结篇</title>
		<link>https://0to60.top/comfyui%ef%bc%8csd1-5-xl%e5%9f%ba%e7%a1%80%e6%80%bb%e7%bb%93%e7%af%87/</link>
					<comments>https://0to60.top/comfyui%ef%bc%8csd1-5-xl%e5%9f%ba%e7%a1%80%e6%80%bb%e7%bb%93%e7%af%87/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Wed, 09 Jul 2025 04:36:59 +0000</pubDate>
				<category><![CDATA[ComfyUI-SD]]></category>
		<category><![CDATA[ComfyUI]]></category>
		<guid isPermaLink="false">https://0to60.top/?p=931</guid>

					<description><![CDATA[<p>引言 本文对SD基础知识进行一个总结&#46;&#46;&#46;</p>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8csd1-5-xl%e5%9f%ba%e7%a1%80%e6%80%bb%e7%bb%93%e7%af%87/">ComfyUI，SD基础总结篇</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading"><strong>引言</strong></h2>



<p>本文对SD基础知识进行一个总结。</p>



<h2 class="wp-block-heading">一、核心概念理解</h2>



<p>在掌握了 Stable Diffusion 1.5 和 SDXL 的基础知识后，我们通过&#8221;雕塑&#8221;概念以一句话来总结一下：</p>



<p><strong>独具特色的雕塑家拿着原始石料在设计需求说明书的指引下按某种雕塑策略进行雕塑创作。</strong></p>



<ul class="wp-block-list">
<li><strong>雕塑家：</strong>Unet Model，每个雕塑家都有自己的特色，即每个Unet模型都有自己的特点。</li>



<li><strong>原始石料：</strong>latent image，潜空间图像，SD1.5&amp;SDXL都是在潜空间进行图像生成的，至于为什么需要在潜空间中进行，最大原因是能极大的压缩空间，使得寻常硬件得以计算。总之，可以将其理解为创作所需的原始石料，以下如何获取原始石料的方式：
<ul class="wp-block-list">
<li>直接提供latent image，设定长宽。</li>



<li>将原始空间图像(寻常人眼感知的图片)通过VAE Encode的方式转换成潜空间图像。</li>
</ul>
</li>



<li><strong>作品去色/上色器</strong>：VAE Encode/Decode，将原始空间图像(人眼寻常感知的图片)转变成潜空间图像，这个过程也称为编码Encode，好比对雕塑成品进行去色，从而得到石料本体；同时也支持从潜空间图像转换成原始空间图像，这个过程称为Decode，好比对雕塑完毕的石料本体进行上色。这个去色和上色规则记录在VAE model中，即需要加载这个模型。</li>



<li><strong>设计需求说明书</strong>：Text Embedding(pos + neg)，用于指导雕塑家进行雕刻，雕塑家每次雕刻都需参照设计需求说明书。如何获得需求设计说明书：
<ul class="wp-block-list">
<li>通过一个转换器Text Embedding Encode将自然语言(人类语言，通常是英文)转换成雕塑家能理解的设计需求说明书，转换规则被记录在CLIP model中，即需要加载这个模型。</li>
</ul>
</li>



<li><strong>雕塑策略</strong>：调度器(scheduler)、去噪步数(steps)，采样器(sampler)。其好比雕刻策略，先制定整个雕刻计划(“路线图”)，决定了在整个生成过程需要去除的石料应该如何逐渐减少；再定义执行步骤数量，越多，耗费时间越长，就越细致；最后，基于路线图，在每一步中具体执行雕刻动作，计算并将多余的石料进行雕刻去除。</li>
</ul>



<h2 class="wp-block-heading"><strong>二、其他组件的理解</strong></h2>



<p>理解了核心概念，其余所有组件都可以围绕这些核心概念进行优化或补充，如：</p>



<ul class="wp-block-list">
<li><strong>LoRA：</strong>强化雕塑家的能力，同时对设计需求说明书中的某些概念进行补充说明。</li>



<li><strong>TI：</strong>在设计需求说明书中增加概念并描述概念详细信息。</li>



<li><strong>IPAdapter：</strong>让雕塑家适配能力(由参考图和IPAdapter 模型)来确定。IPAdapter首先用一个CLIP-VISION转换器，将参考图中的视觉信息提取出来，这个转换器的规则记录在CLIP-Vision 模型中。视觉信息提取出来后，再由一个适配器将视觉信息进行筛选并融入unet model中，好比对训练家进行定向训练。</li>



<li><strong>ControlNet：</strong>对设计需求说明书进行约束补充(结构、姿态、构图、空间关系和物理形态等)。CN拿着控制图通过一个转换器(depth,cany类型等)将约束补充融入设计需求说明书中，转换规则记录在CN model中，一般来说，控制图的类型需要和CN model匹配。这个控制图可以通过一个预处理器(preporcessor)从原始空间图像(寻常人眼中的图像中)提取出来，提取规则记录在preprocessor model中。</li>



<li><strong>InstantID：</strong>适配雕塑家的能力，并对设计需求说明书进行补充约束。会将其通过一个人脸识别模块提取人脸信息(face embedding)，通过一个转换器将face embedding融入到unet model中，这个转换规则记录在instantID model中，好比让雕塑家学习该脸部的雕刻方式。不仅如此，提取的脸部信息还会被另一个转换器融入到设计需求说明书中，转换规则记录在一个CN model中，相当于在设计需求说明书中告诉雕塑家这次要画哪张脸。另外：其实也可以看出，其实InstantID分为了3部分，一是人脸信息提取(可以有多种方式，常见如insight face)，二是让雕塑家掌握人脸的雕刻方式(类似IPAdapter)，三是在设计需求说明书中补充该人脸信息(类似Contronet)</li>



<li><strong>SDXL</strong>其实也是在这些核心概念上进行了优化。
<ul class="wp-block-list">
<li>雕塑家 &amp; 原始石料：SD1.5在512 x 512更为擅长，而SDXL在1024 * 1024上能够大展身手，更大的空间意味着更多的细节。</li>



<li>设计需求说明书：SD1.5是通过一个CLIP模型将自然语言转换成设计需求说明书，而SDXL通过两个CLIP模型将其转换成设计需求说明书，能更好的理解语义及空间关系。</li>



<li>雕塑策略：将执行步骤整体分为两段，前段让一个雕塑家（base model）进行雕刻，后段让另一个雕塑家(Refiner model)进行细节打磨。两个雕塑家的擅长偏向不同。</li>



<li>作品去色/上色器：毕竟石料尺寸不通，对VAE也进行的了提升，有更宽广色域和更高精度“笔刷”，它能识别并还原更微妙的色彩层次，让作品的表面光泽和纹理更加逼真，减少“塑料感”。</li>
</ul>
</li>
</ul>



<p>另外，相关参数也可围绕核心概念进行辅助理解</p>



<ul class="wp-block-list">
<li><strong>sampler node > </strong><strong>seed：</strong>原始石料各种各样，而seed好比是石料的存放地址，结合长宽值，便确定具体石料。</li>



<li><strong><strong>sampler node</strong></strong> > <strong>cfg：</strong>雕塑家对设计需求说明书的遵循程度。</li>



<li><strong><strong>sampler node</strong></strong> > <strong>denoise strength：</strong>重绘幅度，文生图中默认为1，图生图中好比在雕刻前先往上面涂泥巴，这样才有创作空间，涂得越多，创作空间越大，和原始图像偏离程度就越高。</li>



<li><strong>other node > start at/end：</strong>具体在哪一步生效，描述组件效果在雕塑策略的具体哪一步执行。</li>



<li>其他都可以套用这种思想去辅助咱们理解。</li>
</ul>



<p></p>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8csd1-5-xl%e5%9f%ba%e7%a1%80%e6%80%bb%e7%bb%93%e7%af%87/">ComfyUI，SD基础总结篇</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/comfyui%ef%bc%8csd1-5-xl%e5%9f%ba%e7%a1%80%e6%80%bb%e7%bb%93%e7%af%87/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ComfyUI，SD控图入门篇，Controlnet&#038;InstantID</title>
		<link>https://0to60.top/comfyui%ef%bc%8c%e6%8e%a7%e5%9b%be%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%8ccontrolnetinstantid/</link>
					<comments>https://0to60.top/comfyui%ef%bc%8c%e6%8e%a7%e5%9b%be%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%8ccontrolnetinstantid/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Wed, 02 Jul 2025 09:43:14 +0000</pubDate>
				<category><![CDATA[ComfyUI-SD]]></category>
		<category><![CDATA[ComfyUI]]></category>
		<guid isPermaLink="false">https://0to60.top/?p=900</guid>

					<description><![CDATA[<p>引言 Stable Difussio&#46;&#46;&#46;</p>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8c%e6%8e%a7%e5%9b%be%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%8ccontrolnetinstantid/">ComfyUI，SD控图入门篇，Controlnet&amp;InstantID</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">引言</h2>



<p>Stable Difussion的作用主要是生图，而图片之所以能产生价值，一定是符合应用落地的某些需求，这就要求咱们从”随机生成”逐步迈向”精准控制”。</p>



<p>目前在comfyUI中，大致有这么几个主要方式可以进行控图。</p>



<ul class="wp-block-list">
<li>模型本身，提示词，LoRA，TIIPAdapter</li>



<li>IPAdapter</li>



<li>ControlNet &amp; InstantID</li>
</ul>



<p>本文主要就ControlNet和InstantID进行总结</p>



<h2 class="wp-block-heading">一、ControlNet</h2>



<h3 class="wp-block-heading">1.1 初步认识ControlNet</h3>



<figure class="wp-block-riovizual-tablebuilder is-style-stripes rv_tb-ae9b4e97-0115-44b9-8b42-fea7eda3dbdd is-scroll-on-mobile" rv-tb-responsive-breakpoint="768px"><table class=""><thead><tr><th class="rv_tb-cell rv_tb-row-0-cell-0 rv_tb-rs-row-0-cell-0 rv_tb-cs-row-0-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">维度</div></div></div></th><th class="rv_tb-cell rv_tb-row-0-cell-1 rv_tb-rs-row-0-cell-1 rv_tb-cs-row-0-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">描述</div></div></div></th></tr></thead><tbody><tr><td class="rv_tb-cell rv_tb-row-1-cell-0 rv_tb-rs-row-1-cell-0 rv_tb-cs-row-1-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">定位</div></div></div></td><td class="rv_tb-cell rv_tb-row-1-cell-1 rv_tb-rs-row-1-cell-1 rv_tb-cs-row-1-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">如果IP-Adapter是将图片中的风格、身份特征的视觉信息进行迁移，那么ControNet就是能从参考图中，用各种专业的分析工具(预处理器)提取更多不同维度、不同层级的视觉信息，然后增强设计需求说明文档(promt embedding)，从而并引导雕塑家（Unet model）雕塑创作。</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-2-cell-0 rv_tb-rs-row-2-cell-0 rv_tb-cs-row-2-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">输入/输出</div></div></div></td><td class="rv_tb-cell rv_tb-row-2-cell-1 rv_tb-rs-row-2-cell-1 rv_tb-cs-row-2-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">输入</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li>Prompt Embedding(NEG+POS)：CLIP FOR TEXT PROMPT的输出</li><li>Control Image：引导控制图，用于约束引导雕塑过程。</li><li>ControlNet Model：将引导控制图转换成赛博雕塑世界能识别的引导手册，并给到雕塑家在雕塑过程中用于参考。</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-2"><div class="rv_tb-text">输出</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-3"><ul class="rv_tb-list"><li>Prompt Embedding：被增强过的设计需求说明文档(CLIP FOR TEXT PROMPT的输出)，用于引导雕塑家(Unet Model)进行雕刻。</li></ul></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-3-cell-0 rv_tb-rs-row-3-cell-0 rv_tb-cs-row-3-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">预处理器 (Preprocessor)</div></div></div></td><td class="rv_tb-cell rv_tb-row-3-cell-1 rv_tb-rs-row-3-cell-1 rv_tb-cs-row-3-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">ControlNet 并没有直接理解像素图像，它首先需要一个一些分析工具。这个分析工具会分析你的原始图像，并根据你选择的 ControlNet 类型，从中提取出非常具体的、结构化的“条件图像”。条件图像大致分为以下类型</div></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-1"><div class="rv_tb-text"><strong>结构与轮廓</strong></div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-2"><ul class="rv_tb-list"><li><strong>Canny</strong>(边缘)：提取图像中最清晰、最锐利的边缘线。它对图像的明暗交界、颜色突变非常敏感。<strong>适用场景：</strong>需要严格保持物体形状、建筑结构、人物轮廓的精确性。</li><li><strong>Lineart</strong>(线条艺术)：提取更具艺术感、更像手绘线稿的线条，它通常能处理主线和细节线。<strong>适用场景：</strong>将照片转绘成漫画、插画、日系动漫线条风格。</li><li><strong>Softedge / HED / PIDS</strong> (柔和边缘）：提取更柔和、更艺术化、更不那么锐利的边缘信息，有时也能捕捉到物体间的微妙边界和阴影过渡。<strong>适用场景：</strong>希望保持大致构图，但又想给 AI 更多自由度去填充细节和风格时；避免线条过硬而影响融合。</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-3"><div class="rv_tb-text"><strong>姿态与骨架</strong></div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-4"><ul class="rv_tb-list"><li><strong>OpenPose </strong>(人体骨架）：精确检测人物的骨骼关键点、身体姿态、肢体朝向，以及手部和面部（眼睛、鼻子、嘴巴等）的关键点。<strong>适用场景：</strong> 精准控制人物的动作、站姿、手势、身体朝向等，而完全不限制人物的外貌、服装和风格。</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-5"><div class="rv_tb-text"><strong>构图与空间关系</strong></div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-6"><ul class="rv_tb-list"><li><strong>Depth</strong> (深度图）：检测图像中物体到相机的距离信息。近的物体显示为白色/亮色，远的物体显示为黑色/暗色，形成一张灰度图。<strong>适用场景：</strong>保持原图的透视关系、场景景深、物体间的远近布局。（PS：我感觉用来控制人物姿态很合适）</li><li><strong>Normal Map</strong> (法线图）：检测图像中物体表面的朝向信息。它用 RGB 颜色编码了物体表面在三维空间中法线（垂直于表面的方向）的 X、Y、Z 分量。<strong>适用场景：</strong> 精确引导图像的光照效果、阴影分布、物体表面的立体感和材质细节。</li><li><strong>MLSD </strong>(直线检测）：专门检测图像中所有直线结构，例如建筑、房间、家具的边缘。<strong>适用场景：</strong> 保持建筑效果图、室内设计图、几何结构图像的规整性和精确性。</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-7"><div class="rv_tb-text"><strong>内容与语义</strong></div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-8"><ul class="rv_tb-list"><li><strong>Segmentation </strong>(语义分割）：将图像中的不同物体或区域进行语义上的划分（例如识别出“人”、“车”、“树”、“天空”、“道路”等），并用不同的颜色或标签进行标注。<strong>适用场景：</strong> 根据区域填充内容，例如将“蓝色区域”替换为天空，“红色区域”替换为建筑。</li><li><strong>Shuffle (像素混洗）</strong>：将参考图像的像素特征打乱重排，然后作为条件注入。它不提取具体的结构，而是将原图的整体视觉特征（如色彩、质感、部分抽象内容）以混洗的方式传递。<strong>适用场景：</strong> 粗略地借鉴参考图的整体构图、色彩和风格，同时给予 AI 很大的自由度进行内容重构。</li></ul></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-4-cell-0 rv_tb-rs-row-4-cell-0 rv_tb-cs-row-4-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">CN 模型<br>(ControNet Model)</div></div></div></td><td class="rv_tb-cell rv_tb-row-4-cell-1 rv_tb-rs-row-4-cell-1 rv_tb-cs-row-4-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">接收条件图像，并将其转换成赛博雕塑世界能理解的参考图，并以该参考图约束引导雕塑家的雕刻过程。</div></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-1"><div class="rv_tb-text">通常来说，不同的条件图像，需要用不同的CN模型来处理。</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-2"><ul class="rv_tb-list"><li>如cany则对应cany</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-3"><div class="rv_tb-text">一般的，CN模型需要对应相同版本的的Unet模型</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-4"><ul class="rv_tb-list"><li>sd15则对应sd15</li><li>SDXL则对应sdxl</li></ul></div></div></td></tr></tbody></table></figure>



<h3 class="wp-block-heading">1.2 CN基本工作流(depth)图示</h3>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1383" height="841" src="https://0to60.top/wp-content/uploads/2025/07/image-1.png" alt="" class="wp-image-906" srcset="https://0to60.top/wp-content/uploads/2025/07/image-1.png 1383w, https://0to60.top/wp-content/uploads/2025/07/image-1-300x182.png 300w, https://0to60.top/wp-content/uploads/2025/07/image-1-1024x623.png 1024w, https://0to60.top/wp-content/uploads/2025/07/image-1-768x467.png 768w" sizes="auto, (max-width: 1383px) 100vw, 1383px" /></figure>



<h3 class="wp-block-heading">1.3 基本节点介绍&amp;参数理解</h3>



<figure class="wp-block-riovizual-tablebuilder is-style-stripes rv_tb-d11cfbe5-c1bd-443c-babe-aa8da3871fee is-scroll-on-mobile" rv-tb-responsive-breakpoint="768px"><table class=""><tbody><tr><th class="rv_tb-cell rv_tb-row-0-cell-0 rv_tb-rs-row-0-cell-0 rv_tb-cs-row-0-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">节点名称</div></div></div></th><th class="rv_tb-cell rv_tb-row-0-cell-1 rv_tb-rs-row-0-cell-1 rv_tb-cs-row-0-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">描述</div></div></div></th></tr><tr><td class="rv_tb-cell rv_tb-row-1-cell-0 rv_tb-rs-row-1-cell-0 rv_tb-cs-row-1-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">Apply Controlnet</div></div></div></td><td class="rv_tb-cell rv_tb-row-1-cell-1 rv_tb-rs-row-1-cell-1 rv_tb-cs-row-1-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">CN的核心节点，整体作用是对prompt embeddng(pos+neg)进行增强，可以理解为将控制信息添加到prompt embedding(pos+neg)中，就好比在设计需求说明文档中添加各种维度的约束信息</div></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-1"><div class="rv_tb-text"><strong>核心输入</strong></div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-2"><ul class="rv_tb-list"><li>positive：即positive prompt embedding(condition+,condition positive)</li><li>negative：即negative prompt embedding(condition-,condition negative)，两者好比就是把设计需求说明书传入，进行增强补充。</li><li>image：即contronet image，如果要使用参考图(常规人眼看的图)中的控制信息(如结构，风格，光影，姿势)，通常需要一个转换工具preprocessor进行提前转换。如图中depth控制图。</li><li>Control_net：即Controlnet model，其作用就是将控制图中的信息解析并转到到prompt embedding中，好比就是从controlnet img提取出来的控制信息补充添加到设计需求说明书中。</li><li><em>vae：说是能提供对控制信息的编码和解码，从而提高控制信息的质量和准确性，暂无明显体感。</em></li><li><em>model：有些节点会要求传入unetmodel，仅用于判断CN model 和 model是否匹配。一般来说unet model 与 CN model 要求匹配。SD15匹配SD15,SDXL 匹配SDXL。</em></li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-3"><div class="rv_tb-text"><strong>额外控制参数</strong></div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-4"><ul class="rv_tb-list"><li>strength：对控制信息的遵循程度，默认为1.</li><li>start_percent：决定该控制信息什么时间点生效。</li><li>end_percent：决定该控制信息什么时间点结束。</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-5"><div class="rv_tb-text"><strong>核心输出</strong></div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-6"><ul class="rv_tb-list"><li>positive&amp;negative：即 prompt embedding(condition+,condition positive)，也可以看做是被增强补充控制信息的设计需求说明书。</li></ul></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-2-cell-0 rv_tb-rs-row-2-cell-0 rv_tb-cs-row-2-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">AIO AUX Preporcessor</div></div></div></td><td class="rv_tb-cell rv_tb-row-2-cell-1 rv_tb-rs-row-2-cell-1 rv_tb-cs-row-2-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">综合的control image处理器</div></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-1"><div class="rv_tb-text"><strong>核心输入</strong></div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-2"><ul class="rv_tb-list"><li>image：即正常的像素图片，需要将其转换成control img。</li><li>Preprcessor  model：选择preprocessor的类型，不同类型的model会生成不同的control img</li><li>resolusion：分辨率，默认512。个人喜欢直接设置为latent width。</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-3"><div class="rv_tb-text"><strong>核心输出</strong></div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-4"><ul class="rv_tb-list"><li>image：即control image，作为Apply Controlnet节点的核心输入之一。</li></ul></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-3-cell-0 rv_tb-rs-row-3-cell-0 rv_tb-cs-row-3-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">Load Controlnet Model</div></div></div></td><td class="rv_tb-cell rv_tb-row-3-cell-1 rv_tb-rs-row-3-cell-1 rv_tb-cs-row-3-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">CN MODEL加载器，有两个要求</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li>不同类型的控制图需要对应的CN model</li><li>不同类型的unet mdoel 需要对应的 CN model，如SD15的unet model则需要SD15的CN model，SDXL等类推</li></ul></div></div></td></tr></tbody></table></figure>



<h2 class="wp-block-heading">二、InstantID</h2>



<h3 class="wp-block-heading"><strong>2.1 初步了解InstantID</strong></h3>



<p>在视觉信息中，各种维度(结构，线条，笔触，颜色，光影等)都可以通过Controlnet进行控制，只要达到大致相当我们便能接受，但当咱们需要高度保持原图中的信息时，通常达不到我们的期望，如风景还原度，人物还原度，又或是其他。</p>



<p>而InstantID则通过还原脸部信息，从而提高人物还原度。</p>



<p>重要：截止更新时间为止，InstantID适用于SDXL版本</p>



<h3 class="wp-block-heading">2.2 工作流图示</h3>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1724" height="1019" src="https://0to60.top/wp-content/uploads/2025/07/image-4.png" alt="" class="wp-image-921" srcset="https://0to60.top/wp-content/uploads/2025/07/image-4.png 1724w, https://0to60.top/wp-content/uploads/2025/07/image-4-300x177.png 300w, https://0to60.top/wp-content/uploads/2025/07/image-4-1024x605.png 1024w, https://0to60.top/wp-content/uploads/2025/07/image-4-768x454.png 768w, https://0to60.top/wp-content/uploads/2025/07/image-4-1536x908.png 1536w" sizes="auto, (max-width: 1724px) 100vw, 1724px" /></figure>



<h3 class="wp-block-heading">2.3基本节点介绍&amp;参数理解</h3>



<figure class="wp-block-riovizual-tablebuilder is-style-stripes rv_tb-e7bbd035-3679-4a8a-84ba-8bcb410293d1 is-scroll-on-mobile" rv-tb-responsive-breakpoint="768px"><table class=""><thead><tr><th class="rv_tb-cell rv_tb-row-0-cell-0 rv_tb-rs-row-0-cell-0 rv_tb-cs-row-0-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">节点名称</div></div></div></th><th class="rv_tb-cell rv_tb-row-0-cell-1 rv_tb-rs-row-0-cell-1 rv_tb-cs-row-0-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">描述</div></div></div></th></tr></thead><tbody><tr><td class="rv_tb-cell rv_tb-row-1-cell-0 rv_tb-rs-row-1-cell-0 rv_tb-cs-row-1-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">InstantID Patch Attention</div></div></div></td><td class="rv_tb-cell rv_tb-row-1-cell-1 rv_tb-rs-row-1-cell-1 rv_tb-cs-row-1-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">用于提取脸部信息，并与UNET Model进行适配，好比提取了脸部特征信息后，让雕塑家进行学习，从而获得画这张脸的能力。<br><strong>核心输入</strong></div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li>image：脸部参考图，建议只用脸部区域的图。</li><li>insightface：识别人脸信息，提取face embeds</li><li>model：即unet model</li><li>instantid：即传入instantid model，该model的作用是将提取后的人脸信息注入到unet model中，好比让雕塑家学习这个人脸过程，具备画该脸的能力。注意：只是多了个能力，而不是只有画该脸的能力</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-2"><div class="rv_tb-text"><strong>额外控制参数</strong></div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-3"><ul class="rv_tb-list"><li>ip_weight：可以理解为unet model的学习力度。</li><li>start/end_at：开始调用该能力的时间段。</li><li>noise：官方指明不加noise可能会有毁图，可能类图生图重绘，加上点泥巴后，才能更好的应用该能力，更丝滑一点。建议0.35以下，作者一般用0.2。</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-4"><div class="rv_tb-text"><strong>输出</strong></div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-5"><ul class="rv_tb-list"><li>model：适配过脸部信息的unetmodel，好比已经学习过该脸部信息的雕塑家。</li><li>face embeds：脸部特征信息</li></ul></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-2-cell-0 rv_tb-rs-row-2-cell-0 rv_tb-cs-row-2-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">Load InstantID Model</div></div></div></td><td class="rv_tb-cell rv_tb-row-2-cell-1 rv_tb-rs-row-2-cell-1 rv_tb-cs-row-2-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">加载instantID model，官方指定了一个模型，名为ip_adpter.bin，至于为什么名为ip_adpter，说是基于IPAdapter。<br>作为InstantID Patch Attention节点的核心输入之一。</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-3-cell-0 rv_tb-rs-row-3-cell-0 rv_tb-cs-row-3-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">InstantID Face Analysis</div></div></div></td><td class="rv_tb-cell rv_tb-row-3-cell-1 rv_tb-rs-row-3-cell-1 rv_tb-cs-row-3-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">提取脸部特征的模型，专用于识别并提取脸部信息，需按照github中的指引进行下载并放置在指定路径。<br>作为作为InstantID Patch Attention节点的核心输入之一。</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-4-cell-0 rv_tb-rs-row-4-cell-0 rv_tb-cs-row-4-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">InstantID Apply ControlNet</div></div></div></td><td class="rv_tb-cell rv_tb-row-4-cell-1 rv_tb-rs-row-4-cell-1 rv_tb-cs-row-4-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">将face embeds(脸部信息)和脸部姿态(通过image_kps预处理后获得)增强补充到prompt embedding(设计需求说明书)中,告诉unet model我们要雕刻谁。实验过程中，我有这么一种理解，instantID是让雕塑家学习这张脸，但是雕塑家只是多了这么一张脸的信息，而真正雕刻时，雕刻什么样的脸是由设计需求说明书来确定。<br><strong>核心输入</strong></div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li>face embeds:脸部信息</li><li>prompt embedding（pos+neg）：即设计需求说明书。</li><li>image_kps：脸部姿态关键点（眼鼻嘴）参考图像。</li><li>Controlnet：cn model，她能在设计需求说明书中奖脸部特征和脸部姿态等信息增强补充。</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-2"><div class="rv_tb-text"><strong>输出</strong></div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-3"><ul class="rv_tb-list"><li>prompt embedding（pos+neg）：被补充增强的设计需求说明书，告诉unet model要画哪张脸，脸部姿态是怎么样的。</li></ul></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-5-cell-0 rv_tb-rs-row-5-cell-0 rv_tb-cs-row-5-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">Load ControlNet Model</div></div></div></td><td class="rv_tb-cell rv_tb-row-5-cell-1 rv_tb-rs-row-5-cell-1 rv_tb-cs-row-5-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">加载Controlnet模型。</div></div></div></td></tr></tbody></table></figure>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8c%e6%8e%a7%e5%9b%be%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%8ccontrolnetinstantid/">ComfyUI，SD控图入门篇，Controlnet&amp;InstantID</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/comfyui%ef%bc%8c%e6%8e%a7%e5%9b%be%e5%85%a5%e9%97%a8%e7%af%87%ef%bc%8ccontrolnetinstantid/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ComfyUI，SD控图入门篇，IPAdapter</title>
		<link>https://0to60.top/comfyui%ef%bc%8c%e6%8e%a7%e5%9b%be%e7%af%87-%e5%9b%be%e5%83%8f%e6%9d%a1%e4%bb%b6%e5%8f%af%e6%8e%a7-ipadapter/</link>
					<comments>https://0to60.top/comfyui%ef%bc%8c%e6%8e%a7%e5%9b%be%e7%af%87-%e5%9b%be%e5%83%8f%e6%9d%a1%e4%bb%b6%e5%8f%af%e6%8e%a7-ipadapter/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Tue, 24 Jun 2025 07:14:54 +0000</pubDate>
				<category><![CDATA[ComfyUI-SD]]></category>
		<category><![CDATA[ComfyUI]]></category>
		<guid isPermaLink="false">https://0to60.top/?p=877</guid>

					<description><![CDATA[<p>引言 Stable Difussio&#46;&#46;&#46;</p>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8c%e6%8e%a7%e5%9b%be%e7%af%87-%e5%9b%be%e5%83%8f%e6%9d%a1%e4%bb%b6%e5%8f%af%e6%8e%a7-ipadapter/">ComfyUI，SD控图入门篇，IPAdapter</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">引言</h2>



<p>Stable Difussion的作用主要是生图，而图片之所以能产生价值，一定是符合应用落地的某些需求，这就要求咱们从&#8221;随机生成&#8221;逐步迈向&#8221;精准控制&#8221;。</p>



<p>目前在comfyUI中，大致有这么几个主要方式可以进行控图。</p>



<ul class="wp-block-list">
<li>模型本身，提示词，LoRA，TI</li>



<li>IPAdapter</li>



<li>ControlNet &amp; InstantID</li>
</ul>



<p>本文主要就图像条件可控-IPAdapter进行总结。</p>



<h2 class="wp-block-heading">一、初步认识IPAdapter</h2>



<figure class="wp-block-riovizual-tablebuilder is-style-stripes rv_tb-2599dc76-e1e6-4843-8154-9805fa8ae2ae is-scroll-on-mobile" rv-tb-responsive-breakpoint="768px"><table class=""><thead><tr><th class="rv_tb-cell rv_tb-row-0-cell-0 rv_tb-rs-row-0-cell-0 rv_tb-cs-row-0-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">维度</div></div></div></th><th class="rv_tb-cell rv_tb-row-0-cell-1 rv_tb-rs-row-0-cell-1 rv_tb-cs-row-0-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">描述</div></div></div></th></tr></thead><tbody><tr><td class="rv_tb-cell rv_tb-row-1-cell-0 rv_tb-rs-row-1-cell-0 rv_tb-cs-row-1-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">定位</div></div></div></td><td class="rv_tb-cell rv_tb-row-1-cell-1 rv_tb-rs-row-1-cell-1 rv_tb-cs-row-1-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">图像风格/内容转化师。它通过图像来影响 AI 绘画的风格、身份或视觉元素。<br>理解全名，辅助理解其作用Image Prompt Adapter。</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-2-cell-0 rv_tb-rs-row-2-cell-0 rv_tb-cs-row-2-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">输入/输出</div></div></div></td><td class="rv_tb-cell rv_tb-row-2-cell-1 rv_tb-rs-row-2-cell-1 rv_tb-cs-row-2-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">输入</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li><strong>图像提示词 (Image)</strong>：你想提取风格或特征的参考图片</li><li><strong>CLIP图像编码器</strong>（CLIP Vision Encoder）：（内置或需要选择编码器类型）将人类肉眼能看见的图片信息转化成赛博雕塑世界能理解的信息，可能包含：物体概念、行为概念、色彩搭配、笔触、光影特点、艺术流派、边缘、纹理、基本形状甚至人物身份信息等。</li><li><strong>模型 (MODEL)</strong>：基础的 Stable Diffusion 模型 (UNet)，好比一个雕塑家。</li><li><strong>IPAdapter 模型 (IPAdapter Model)</strong>：IP-Adapter 自身的权重文件，负责转换和注入图像特征。好比定向训练官，拿着转化好的图片信息，定向筛选(风格 或 脸部信息)让雕塑家进行学习。</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-2"><div class="rv_tb-text">输出</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-3"><ul class="rv_tb-list"><li>一个<strong>被适配过的 MODEL</strong>，即被图像引导能力“增强”了的 UNet 模型。好比接收过定向参考训练的雕塑家。</li></ul></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-3-cell-0 rv_tb-rs-row-3-cell-0 rv_tb-cs-row-3-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">作用点</div></div></div></td><td class="rv_tb-cell rv_tb-row-3-cell-1 rv_tb-rs-row-3-cell-1 rv_tb-cs-row-3-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">主要作用于 <strong>UNet 模型</strong>的注意力层，让 UNet 在去噪过程中能“看到”并融合图像的视觉特征。</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-4-cell-0 rv_tb-rs-row-4-cell-0 rv_tb-cs-row-4-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">与pormpt关系</div></div></div></td><td class="rv_tb-cell rv_tb-row-4-cell-1 rv_tb-rs-row-4-cell-1 rv_tb-cs-row-4-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">与文本 Prompt <strong>并行工作</strong>，Prompt 定义“什么”，IP-Adapter 定义“像什么”</div></div></div></td></tr></tbody></table></figure>



<h2 class="wp-block-heading">二、IPAdapter基本工作流</h2>



<h3 class="wp-block-heading">2.1 工作流图示</h3>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1015" height="990" src="https://0to60.top/wp-content/uploads/2025/06/image-21.png" alt="" class="wp-image-885" srcset="https://0to60.top/wp-content/uploads/2025/06/image-21.png 1015w, https://0to60.top/wp-content/uploads/2025/06/image-21-300x293.png 300w, https://0to60.top/wp-content/uploads/2025/06/image-21-768x749.png 768w" sizes="auto, (max-width: 1015px) 100vw, 1015px" /></figure>



<h3 class="wp-block-heading">2.2 基本节点介绍及参数理解</h3>



<figure class="wp-block-riovizual-tablebuilder is-style-stripes rv_tb-4742b839-54e3-433d-ac2c-9f87ff87efd2 is-scroll-on-mobile" rv-tb-responsive-breakpoint="768px"><table class=""><thead><tr><th class="rv_tb-cell rv_tb-row-0-cell-0 rv_tb-rs-row-0-cell-0 rv_tb-cs-row-0-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">节点名称</div></div></div></th><th class="rv_tb-cell rv_tb-row-0-cell-1 rv_tb-rs-row-0-cell-1 rv_tb-cs-row-0-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">描述</div></div></div></th></tr></thead><tbody><tr><td class="rv_tb-cell rv_tb-row-1-cell-0 rv_tb-rs-row-1-cell-0 rv_tb-cs-row-1-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">IPAapter Advanced</div></div></div></td><td class="rv_tb-cell rv_tb-row-1-cell-1 rv_tb-rs-row-1-cell-1 rv_tb-cs-row-1-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">好比一个训练场<br>核心输入</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li>img（参考图片）</li><li>CLIP Vision Encoder(图像编码器)：它可以将图片转为为embedding。好比将人类世界的图片转换为赛博雕塑世界能理解的视觉信息。</li><li>model：unet模型，好比雕塑家。</li><li>IPAdapter：IPAdapter模型，好比一个定向训练官，筛选视觉信息中需要训练的部分，然后让雕塑家进行学习。</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-2"><div class="rv_tb-text">额外参数输入</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-3"><ul class="rv_tb-list"><li>weight（影响权重）：控制图片风格对生成结果的总体影响强度，可以理解成雕塑家的遵循程度，0.5-0.8(平衡)</li><li>weight type（影响权重策略）：在start at和start end间，weight的变化方式，如linear，就是从0到指定权重，如ease in，就是开始的时候低，后续强，依次类推。</li><li>noise（图像embedding噪声）：在对人类世界的图片进行视觉信息提取后，会在此基础上增加微量的噪声随机扰动，目的是保持整体风格的基础上，让细节表现有所不同，一般0.2以下。</li><li>start_at / end_at (指令生效时间段)：控制去噪过程中什么时候开始/结束参照风格，由于去噪过程中，前面时间通常是构图，后续增加细节，而参考的图片中也会有构图信息，为了防止构图过程中采纳风格图片，可以将开始设置延后。</li><li>embeds_scaling：图像引导的“适应性缩放”，可以理解成图像embedding的是筛选融合规则。一般选V，更多需探索。</li></ul></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-2-cell-0 rv_tb-rs-row-2-cell-0 rv_tb-cs-row-2-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">Load CLIP VISION</div></div></div></td><td class="rv_tb-cell rv_tb-row-2-cell-1 rv_tb-rs-row-2-cell-1 rv_tb-cs-row-2-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">加载CLIP Vision Encoder，需要选择 CLIP Vsion Encoder，作为IPAapter Advanced的核心输入之一。</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li>ViT-L/14(Vision Transformer, Large, Patch size 14)，示例文件：clip-vit-large-patch14.safetensors，clip-vit-l-14.ckpt</li><li>ViT-H/14(Vision Transformer, Huge, Patch size 14)，示例文件：clip-vit-huge-patch14.safetensors，ViT-H.safetensors</li><li>ViT-G/14(Vision Transformer, Giant, Patch size 14)，示例文件：clip_g.safetensors，ViT-g-14-laion2B-s12B-b42K.safetensors</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-2"><div class="rv_tb-text">原则上G>H>L,越大能识别的信息更多。</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-3-cell-0 rv_tb-rs-row-3-cell-0 rv_tb-cs-row-3-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">Load Image</div></div></div></td><td class="rv_tb-cell rv_tb-row-3-cell-1 rv_tb-rs-row-3-cell-1 rv_tb-cs-row-3-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">参考风格图片，通过CLIP Vision Encoder将其提取成视觉信息，作为IPAapter Advanced的核心输入之一。</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-4-cell-0 rv_tb-rs-row-4-cell-0 rv_tb-cs-row-4-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">IPAdapter Model Loader</div></div></div></td><td class="rv_tb-cell rv_tb-row-4-cell-1 rv_tb-rs-row-4-cell-1 rv_tb-cs-row-4-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">定向训练官，用于将视觉信息定向筛选并让雕塑家(模型)学习，作为IPAapter Advanced的核心输入之一。</div></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-1"><div class="rv_tb-text">值得一提的是，既然是从转换后的视觉信息中筛选，很大可能IPAdapter Model和CLIP Vision Encoder有匹配关系，事实也确实如此。<br>命名形如*-h的模型通常对应ViT/H<br>命名形如*-g的模型通常对应ViT/G<br>其他依次类推，无特殊信息的话，如果报错，可以先尝试用ViT/H的视觉编码器。</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-5-cell-0 rv_tb-rs-row-5-cell-0 rv_tb-cs-row-5-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">Rescale_CFG</div></div></div></td><td class="rv_tb-cell rv_tb-row-5-cell-1 rv_tb-rs-row-5-cell-1 rv_tb-cs-row-5-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text"><strong>控制最终所有条件引导强度</strong>的核心参数。它通过校准 Prompt 和 Adapter 共同产生的“合力引导方向”的强度，来<strong>平滑高 CFG Scale 和强 Adapter 可能带来的过度引导问题</strong>，减少伪影，使图像更自然、美观。<br>同时，在某种意义上也能达到这种效果：</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li>越低，模型自由发挥空间越高，IPAdapter的引导相对变弱。</li><li>越高，模型自由发挥空间越低，IPAdapter的引导相对变强。</li></ul></div></div></td></tr></tbody></table></figure>



<h2 class="wp-block-heading">三、IPAdapter-FaceID</h2>



<p>在生成图像时，除了参考风格外，常常还有这么一个场景，即：生成的作品中，如何精确地保持人物的脸部身份和特征</p>



<h3 class="wp-block-heading">3.1 基本工作流</h3>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1683" height="950" src="https://0to60.top/wp-content/uploads/2025/06/image-23.png" alt="" class="wp-image-890" srcset="https://0to60.top/wp-content/uploads/2025/06/image-23.png 1683w, https://0to60.top/wp-content/uploads/2025/06/image-23-300x169.png 300w, https://0to60.top/wp-content/uploads/2025/06/image-23-1024x578.png 1024w, https://0to60.top/wp-content/uploads/2025/06/image-23-768x434.png 768w, https://0to60.top/wp-content/uploads/2025/06/image-23-1536x867.png 1536w, https://0to60.top/wp-content/uploads/2025/06/image-23-520x293.png 520w, https://0to60.top/wp-content/uploads/2025/06/image-23-700x394.png 700w" sizes="auto, (max-width: 1683px) 100vw, 1683px" /></figure>



<h3 class="wp-block-heading">3.2 基本节点和参数理解</h3>



<figure class="wp-block-riovizual-tablebuilder is-style-stripes rv_tb-d41364a6-d8fe-4d92-a3ec-e5fab96ac11c is-scroll-on-mobile" rv-tb-responsive-breakpoint="768px"><table class=""><thead><tr><th class="rv_tb-cell rv_tb-row-0-cell-0 rv_tb-rs-row-0-cell-0 rv_tb-cs-row-0-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">节点</div></div></div></th><th class="rv_tb-cell rv_tb-row-0-cell-1 rv_tb-rs-row-0-cell-1 rv_tb-cs-row-0-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">描述</div></div></div></th></tr></thead><tbody><tr><td class="rv_tb-cell rv_tb-row-1-cell-0 rv_tb-rs-row-1-cell-0 rv_tb-cs-row-1-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">IPAdapter FaceID</div></div></div></td><td class="rv_tb-cell rv_tb-row-1-cell-1 rv_tb-rs-row-1-cell-1 rv_tb-cs-row-1-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">与IPAdapter Advanced类似，输入有：</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li>imge，Model略</li><li>CLIP Vision Encoder略</li><li>IPAdapter模型，这其中，就有FaceID类型，又可以迁移风格，又能保留脸部特征。</li><li>与FaceID配套的LoRA：据官方要求，使用FaceID的时候，一般要配合一个指定的LoRA，命名形如IPAdapter模型_lora。</li><li>Insightface：在保留脸部特征过程中，使用了insightface的能力，所以还需指定insightface。</li></ul></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-2-cell-0 rv_tb-rs-row-2-cell-0 rv_tb-cs-row-2-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">IPAdapter Model Loader</div></div></div></td><td class="rv_tb-cell rv_tb-row-2-cell-1 rv_tb-rs-row-2-cell-1 rv_tb-cs-row-2-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">略，同基本工作流</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-3-cell-0 rv_tb-rs-row-3-cell-0 rv_tb-cs-row-3-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">Load Image</div></div></div></td><td class="rv_tb-cell rv_tb-row-3-cell-1 rv_tb-rs-row-3-cell-1 rv_tb-cs-row-3-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">略，同基本工作流</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-4-cell-0 rv_tb-rs-row-4-cell-0 rv_tb-cs-row-4-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">Load CLIP Vsion</div></div></div></td><td class="rv_tb-cell rv_tb-row-4-cell-1 rv_tb-rs-row-4-cell-1 rv_tb-cs-row-4-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text"><br>略，同基本工作流</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-5-cell-0 rv_tb-rs-row-5-cell-0 rv_tb-cs-row-5-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">LoraLoaderModelOnly</div></div></div></td><td class="rv_tb-cell rv_tb-row-5-cell-1 rv_tb-rs-row-5-cell-1 rv_tb-cs-row-5-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">《<a href="https://0to60.top/2025/06/04/comfyui%ef%bc%8c%e5%ae%9e%e6%88%98%e8%ae%b0%e5%bd%95/" data-type="post" data-id="702">ComfyUI，SD小白入门篇》</a>中提到，LoRA即会影响Unet Model，又会影响CLIP，但FaceID这里只需要影响UnetModel，如果还是通过原有的Load LoRA节点进行加载，工作流的线条连结会变得更复杂，因此，这里推荐使用LoraLoaderModelOnly节点。</div></div></div></td></tr></tbody></table></figure>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8c%e6%8e%a7%e5%9b%be%e7%af%87-%e5%9b%be%e5%83%8f%e6%9d%a1%e4%bb%b6%e5%8f%af%e6%8e%a7-ipadapter/">ComfyUI，SD控图入门篇，IPAdapter</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/comfyui%ef%bc%8c%e6%8e%a7%e5%9b%be%e7%af%87-%e5%9b%be%e5%83%8f%e6%9d%a1%e4%bb%b6%e5%8f%af%e6%8e%a7-ipadapter/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ComfyUI，SD小白入门篇</title>
		<link>https://0to60.top/comfyui%ef%bc%8c%e5%ae%9e%e6%88%98%e8%ae%b0%e5%bd%95/</link>
					<comments>https://0to60.top/comfyui%ef%bc%8c%e5%ae%9e%e6%88%98%e8%ae%b0%e5%bd%95/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Wed, 04 Jun 2025 07:11:24 +0000</pubDate>
				<category><![CDATA[ComfyUI-SD]]></category>
		<guid isPermaLink="false">https://0to60.top/?p=702</guid>

					<description><![CDATA[<p>引言 本文的目的是通过SD1.5的实&#46;&#46;&#46;</p>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8c%e5%ae%9e%e6%88%98%e8%ae%b0%e5%bd%95/">ComfyUI，SD小白入门篇</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">引言</h2>



<p>本文的目的是通过SD1.5的实战记录，从而理解ComfyUI中各节点的作用，以及加深对各种参数及概念的的理解。</p>



<h2 class="wp-block-heading">一、文生图</h2>



<h3 class="wp-block-heading">1.1 小白原理篇</h3>



<p class="has-medium-font-size"><strong>Stable Diffusion 的魔法雕塑之旅</strong></p>



<p>你是不是常常幻想，如果能把脑海中的画面直接变成一幅画，那该有多好？现在，有一种叫做 Stable Diffusion 的魔法，它就能帮你做到这事！</p>



<p>别担心，这不是什么高深的电脑程序，你可以把它想象成一位拥有特殊能力的<strong>雕塑家</strong>，而你要做的，只是提供你的<strong>想法</strong>和<strong>雕塑规则</strong>。</p>



<p class="has-medium-font-size"><strong>魔法的起点：一块“混沌”的石头</strong></p>



<p>当你想雕塑一个东西时，雕塑家会给你一块<strong>特定大小，但表面粗糙、充满随机纹理的原始石头</strong>。这块石头上没有任何具体的形状，看起来乱七八糟的，就像电视没信号时的雪花点一样。</p>



<p>这块混沌的石头，就是 Stable Diffusion 开始创作的起点。</p>



<p class="has-medium-font-size"><strong>你的设计需求说明：清晰的“想法”和“不想要的”</strong></p>



<p>然后，你会把你的<strong>设计需求说明</strong>交给雕塑家。这份设计图非常特别，它不仅描述了你<strong>想要雕塑成什么样子</strong>（比如“一只可爱的蓝色猫咪，坐在阳光下的窗台上”），还会清楚地标注你<strong>不希望出现什么</strong>（比如“不要模糊的，不要有文字，不要扭曲的肢体”）。</p>



<p>雕塑家会把这些设计需求说明上的想法，牢牢地记在心里。</p>



<p class="has-medium-font-size"><strong>神奇的雕刻过程：一点一点去除杂料</strong></p>



<p>接下来，真正的魔法来了！雕塑家会动手<strong>雕刻</strong>。</p>



<p>他不是一下子就把作品变出来，而是<strong>一步一步、一刀一刀地</strong>进行。每一次下刀，他都会小心翼翼地根据你的<strong>设计需求说明</strong>，<strong>判断哪些是多余的“杂料”</strong>，然后将它们去除。</p>



<p>这个过程会重复很多很多次。刚开始时，他可能只是粗略地去除大块的杂料，让雕塑有个大致的轮廓。随着雕刻的进行，他会越来越精细，去除微小的杂料，雕琢出细节、纹理和光影。</p>



<p>而且，每一次下刀，雕塑家都会不断地参考你的设计图：</p>



<ul class="wp-block-list">
<li>“这块泥土是不是离我想要的蓝色猫咪更近了？”</li>



<li>“这部分雕刻会不会让它看起来扭曲？”</li>
</ul>



<p>他会努力让每一次下刀都朝着你设计图上描述的那个方向前进，同时也要避开你说“不想要”的地方。</p>



<p class="has-medium-font-size"><strong>最后的润饰：让作品栩栩如生</strong></p>



<p>当雕塑家觉得雕刻步骤差不多完成时，他会对作品进行最后的<strong>精修上色</strong>，最终呈现出你脑海中那幅真实的画面。</p>



<p>牢记这个比喻，我们将带着类似的想法去理解SD文生图的逻辑。</p>



<h3 class="wp-block-heading">1.2 基本工作流图示</h3>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1234" height="508" src="https://0to60.top/wp-content/uploads/2025/06/image-4.png" alt="" class="wp-image-703" srcset="https://0to60.top/wp-content/uploads/2025/06/image-4.png 1234w, https://0to60.top/wp-content/uploads/2025/06/image-4-300x124.png 300w, https://0to60.top/wp-content/uploads/2025/06/image-4-1024x422.png 1024w, https://0to60.top/wp-content/uploads/2025/06/image-4-768x316.png 768w" sizes="auto, (max-width: 1234px) 100vw, 1234px" /></figure>



<figure class="wp-block-riovizual-tablebuilder is-style-stripes rv_tb-ada3b1f5-d62c-462a-9220-a37cbfb3b9d2 is-scroll-on-mobile" rv-tb-responsive-breakpoint="768px"><table class=""><tbody><tr><th class="rv_tb-cell rv_tb-row-0-cell-0 rv_tb-rs-row-0-cell-0 rv_tb-cs-row-0-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">节点名称</div></div></div></th><th class="rv_tb-cell rv_tb-row-0-cell-1 rv_tb-rs-row-0-cell-1 rv_tb-cs-row-0-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">雕塑描述</div></div></div></th></tr><tr><td class="rv_tb-cell rv_tb-row-1-cell-0 rv_tb-rs-row-1-cell-0 rv_tb-cs-row-1-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">load checkpoint</div></div></div></td><td class="rv_tb-cell rv_tb-row-1-cell-1 rv_tb-rs-row-1-cell-1 rv_tb-cs-row-1-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">load checkpoint会做以下几件事：</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li>确定1位雕塑家，不同的雕塑家有自己的特点和风格，这个雕塑家也就是unet模型，也就是常说的的SD模型（model）。</li><li>雕塑完成后，需要确定精修上色的方式（VAE Decoder）</li><li>雕塑家需要一个专业的设计需求说明书，而这个说明书需要由咱们指定要什么和不要什么，但是需要有一个说明书转换器，才能将我们的描述转换成雕塑家能理解的专业设计需求说明书。不同的雕塑家对设计需求说明文档（Text Embeddings）的要求还不一样，所以转换器也可能不一样，而这个节点将自动指明用什么转换器，而这个转换器就是（CLIP Text Encoder）</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-2"><div class="rv_tb-text">输入：一个打包的<br>输出：<br>1. 雕塑家(model)<br>2. 最后的精修上色方式(VAE Decoder)<br>3. 设计需求文档转换器(CLIP Text Encoder)</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-2-cell-0 rv_tb-rs-row-2-cell-0 rv_tb-cs-row-2-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">CLIP TEXT Encode</div></div></div></td><td class="rv_tb-cell rv_tb-row-2-cell-1 rv_tb-rs-row-2-cell-1 rv_tb-cs-row-2-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">刚才说了，雕塑家是不认可咱们的语言，ta们有属于赛博雕塑家世界专有的语言。<br>咱们可以用自己能力理解的语言进行描述想要什么(positive prompt)和不想要什么（negtive prompt），通过雕塑家（model）认可的转换器（CLIP Text Encoder），就能得到雕塑家所需的雕塑设计需求说明文档（Text Embeddings），所以：<br>输入端：<br>1. 接收一个指定的转换器（CLIP Text Encoder），通常直接由load checkpoint节点得到<br>2. 输入咱们的要求<br>输出：<br>设计需求说明文档（Text Embeddings，节点中也成为Conditionning）<br><br></div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-3-cell-0 rv_tb-rs-row-3-cell-0 rv_tb-cs-row-3-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">Empty latent Image</div></div></div></td><td class="rv_tb-cell rv_tb-row-3-cell-1 rv_tb-rs-row-3-cell-1 rv_tb-cs-row-3-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">雕塑首先得有一块初始石料，这个石料，而选择石料的时候，会首先确定大小，所以先拿个筛选器<br>输入：宽高width、height<br>输出：石料大小筛选器（empty latent img）</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-4-cell-0 rv_tb-rs-row-4-cell-0 rv_tb-cs-row-4-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">KSampler</div></div></div></td><td class="rv_tb-cell rv_tb-row-4-cell-1 rv_tb-rs-row-4-cell-1 rv_tb-cs-row-4-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">有了雕塑家和设计需求说明文档，雕塑家就可以按照自己的各种技巧开始进行雕刻<br>1. 确定一个初始石料：拿着木框筛选器，带着指定的令牌(seed)找到对应的石料并线将大小处理好(得到初始噪声latent)。<br>2. 基于雕塑家自身的特性和风格，选择合适的技巧和工具(sampler_name,scheduler),确定大概要雕刻多少次(steps)<br>3. 每次雕刻时时，都要对比着设计需求说明文档（Text Embeddings）来判断是否符合需求，而我们可以要求雕塑家遵循设计需求说明文档的严格程度(CFG)<br>4. 雕完后，得到一个石料本色的雕塑(未上色)<br>输入：雕塑家、设计需求说明书（Text Embeddings，节点中也成为Conditionning，分pos和neg），石料大小筛选器(empty latent img)，具体是石料（seed），雕刻技巧（sampler_name,scheduler），雕刻次数（steps）及说明文档遵循程度（CFG）<br>输出：一个雕刻好的石像</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-5-cell-0 rv_tb-rs-row-5-cell-0 rv_tb-cs-row-5-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">VAE Decode</div></div></div></td><td class="rv_tb-cell rv_tb-row-5-cell-1 rv_tb-rs-row-5-cell-1 rv_tb-cs-row-5-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">有了石像后，准备上色，这时我们需要知道上色方式是什么。<br>输入：雕刻好的石像(kSamler的输出latent)，上色方式(load chekpoint的输出VAE)<br>输出：栩栩如生的雕像（VAE Decode的输出img）</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-6-cell-0 rv_tb-rs-row-6-cell-0 rv_tb-cs-row-6-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">Preview Image</div></div></div></td><td class="rv_tb-cell rv_tb-row-6-cell-1 rv_tb-rs-row-6-cell-1 rv_tb-cs-row-6-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">雕像展示柜</div></div></div></td></tr></tbody></table></figure>



<h3 class="wp-block-heading">1.3 KSampler参数理解</h3>



<figure class="wp-block-riovizual-tablebuilder is-style-stripes rv_tb-b115f063-85d0-4895-97e4-1614b0826471 is-scroll-on-mobile" rv-tb-responsive-breakpoint="768px"><table class=""><thead><tr><th class="rv_tb-cell rv_tb-row-0-cell-0 rv_tb-rs-row-0-cell-0 rv_tb-cs-row-0-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">参数名</div></div></div></th><th class="rv_tb-cell rv_tb-row-0-cell-1 rv_tb-rs-row-0-cell-1 rv_tb-cs-row-0-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">雕塑理解</div></div></div></th><th class="rv_tb-cell rv_tb-row-0-cell-2 rv_tb-rs-row-0-cell-2 rv_tb-cs-row-0-cell-2"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">加深理解</div></div></div></th><th class="rv_tb-cell rv_tb-row-0-cell-3 rv_tb-rs-row-0-cell-3 rv_tb-cs-row-0-cell-3"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">图示</div></div></div></th></tr></thead><tbody><tr><td class="rv_tb-cell rv_tb-row-1-cell-0 rv_tb-rs-row-1-cell-0 rv_tb-cs-row-1-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">seed（随机种子）</div></div></div></td><td class="rv_tb-cell rv_tb-row-1-cell-1 rv_tb-rs-row-1-cell-1 rv_tb-cs-row-1-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">就好比你从仓库里挑选了一块<strong>特定纹理和初始形状的随机石料</strong>。每次用同一个 <code>seed</code>，你拿到的都是那块一模一样的石料。如果你换一个 <code>seed</code>，就拿到了另一块完全不同的随机石料。</div></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-1"><div class="rv_tb-text"><strong>在雕塑中的作用：</strong> 决定了你的雕塑的<strong>初始基础形态</strong>。即便有相同的设计图纸（prompt），不同的石料（seed）最终雕刻出的雕塑也会有各自的特点。</div></div></div></td><td class="rv_tb-cell rv_tb-row-1-cell-2 rv_tb-rs-row-1-cell-2 rv_tb-cs-row-1-cell-2"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">一个整数值，用于初始化“随机石料”的初始状态。相同的 <code>seed</code> 值，在其他所有参数不变的情况下，每次运行都会生成相同的初始随机噪声图像。</div></div></div></td><td class="rv_tb-cell rv_tb-row-1-cell-3 rv_tb-rs-row-1-cell-3 rv_tb-cs-row-1-cell-3"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">其他参数不变，不同seed的结果</div></div></div><div class="rv_tb-element"><div class="rv_tb-image cell-element-1"><img decoding="async" loading="lazy" src="https://0to60.top/wp-content/uploads/2025/06/image-8-1024x225.png"/></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-2"><div class="rv_tb-text">其他参数不变，相同seed的结果</div></div></div><div class="rv_tb-element"><div class="rv_tb-image cell-element-3"><img decoding="async" loading="lazy" src="https://0to60.top/wp-content/uploads/2025/06/image-9-1024x225.png"/></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-2-cell-0 rv_tb-rs-row-2-cell-0 rv_tb-cs-row-2-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">control_after_generate</div></div></div></td><td class="rv_tb-cell rv_tb-row-2-cell-1 rv_tb-rs-row-2-cell-1 rv_tb-cs-row-2-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">好比你雕刻完一个作品后，决定下一件作品要用什么样的石料：</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li><code>fixed</code>：每次都用刚才那块石料（如果你想多尝试几种雕刻方法）。</li><li><code>increment</code> / <code>decrement</code>：每次都拿下一块（或上一块）不同但有序的石料。</li><li><code>random</code>：每次都随机从仓库里抓一块石料。</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-2"><div class="rv_tb-text"><strong>在雕塑中的作用：</strong> 控制你<strong>每次雕刻实践中“石料”的选取策略</strong>，方便你批量尝试或固定实验条件。</div></div></div></td><td class="rv_tb-cell rv_tb-row-2-cell-2 rv_tb-rs-row-2-cell-2 rv_tb-cs-row-2-cell-2"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">这个参数决定了在一次生成完成后，<code>seed</code> 值的行为</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li><code>fixed</code>：每次生成都使用相同的 <code>seed</code>。</li><li><code>increment</code>：每次生成后 <code>seed</code> 自动增加 1。</li><li><code>decrement</code>：每次生成后 <code>seed</code> 自动减少 1。</li><li><code>random</code>：每次生成都随机选择一个新的 <code>seed</code>。</li><li><code>reroll</code>：重新生成一个 <code>seed</code>，与 <code>random</code> 类似，但通常在某些界面中用于方便地快速更改。</li></ul></div></div></td><td class="rv_tb-cell rv_tb-row-2-cell-3 rv_tb-rs-row-2-cell-3 rv_tb-cs-row-2-cell-3"><div class="rv_tb-element"></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-3-cell-0 rv_tb-rs-row-3-cell-0 rv_tb-cs-row-3-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">steps（去噪步数）</div></div></div></td><td class="rv_tb-cell rv_tb-row-3-cell-1 rv_tb-rs-row-3-cell-1 rv_tb-cs-row-3-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">就是你<strong>雕刻的总刀数/雕刻动作的总次数</strong>。</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li><code>steps</code> 很少：只雕了几刀就停了，作品非常粗糙，甚至无法辨认。</li><li><code>steps</code> 适中：雕刻的刀数恰到好处，作品轮廓清晰，细节初具。</li><li><code>steps</code> 很多：反复雕刻，精益求精，但刀数过多也可能导致过度雕刻（artifact）或细微之处缺乏新意。</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-2"><div class="rv_tb-text"><strong>在雕塑中的作用：</strong> 决定了<strong>雕刻的精细程度和完成度</strong>。</div></div></div></td><td class="rv_tb-cell rv_tb-row-3-cell-2 rv_tb-rs-row-3-cell-2 rv_tb-cs-row-3-cell-2"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">定了 UNet 将噪声图像去噪的迭代次数。每次迭代都代表一次去噪步骤。步数越多，图像去噪越充分，细节通常也越丰富，但生成时间也越长。</div></div></div></td><td class="rv_tb-cell rv_tb-row-3-cell-3 rv_tb-rs-row-3-cell-3 rv_tb-cs-row-3-cell-3"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">看上去步数到达一定程度后，不会有太大的区别，可能和调度器和采样器本身有关系</div></div></div><div class="rv_tb-element"><div class="rv_tb-image cell-element-1"><img decoding="async" loading="lazy" src="https://0to60.top/wp-content/uploads/2025/06/image-12-1024x94.png"/></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-4-cell-0 rv_tb-rs-row-4-cell-0 rv_tb-cs-row-4-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">cfg（提示词相关性）</div></div></div></td><td class="rv_tb-cell rv_tb-row-4-cell-1 rv_tb-rs-row-4-cell-1 rv_tb-cs-row-4-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">雕刻家在雕刻时对<strong>“设计需求说明”的遵守程度</strong>。</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li><code>cfg</code> 值很大：你严格按照设计图纸的每一个细节来雕刻，不容许任何偏差。</li><li><code>cfg</code> 值很小：你只把设计图纸当作一个参考，在雕刻过程中更多地发挥自己的创意和想象力。</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-2"><div class="rv_tb-text"><strong>在雕塑中的作用：</strong> 决定了<strong>雕塑对“设计需求”的还原度与自由发挥之间的平衡</strong>。</div></div></div></td><td class="rv_tb-cell rv_tb-row-4-cell-2 rv_tb-rs-row-4-cell-2 rv_tb-cs-row-4-cell-2"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">控制图像生成时，模型对文本提示词（text embedding）的“遵循”程度。</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li><strong><code>cfg</code> 值越大：</strong> 模型越严格地按照提示词去生成，图像会更符合你的文字描述，但可能牺牲多样性和创造力。</li><li><strong><code>cfg</code> 值越小：</strong> 模型对提示词的约束越宽松，生成结果可能更具创意和多样性，但也可能偏离你的文字描述。</li></ul></div></div></td><td class="rv_tb-cell rv_tb-row-4-cell-3 rv_tb-rs-row-4-cell-3 rv_tb-cs-row-4-cell-3"><div class="rv_tb-element"><div class="rv_tb-image cell-element-0"><img decoding="async" loading="lazy" src="https://0to60.top/wp-content/uploads/2025/06/image-11-1024x103.png"/></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-5-cell-0 rv_tb-rs-row-5-cell-0 rv_tb-cs-row-5-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">sampler_name（采样器名称）</div></div></div></td><td class="rv_tb-cell rv_tb-row-5-cell-1 rv_tb-rs-row-5-cell-1 rv_tb-cs-row-5-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">雕刻时所使用的<strong>“雕刻手法”或“工具套路”</strong>。</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li>使用 <code>Euler</code>：可能是一种简单直接的雕刻手法，每刀下去都很干脆。</li><li>使用 <code>DPM++ 2M Karras</code>：可能是一种更复杂、更精细的雕刻手法，能够更好地处理细节和过渡。</li><li>不同的采样器就像雕塑家掌握的各种雕刻工具（凿子、锤子、砂纸等）和使用这些工具的特定技巧。</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-2"><div class="rv_tb-text"><strong>在雕塑中的作用：</strong> 决定了<strong>雕刻过程的效率和最终作品的风格特点</strong>。</div></div></div></td><td class="rv_tb-cell rv_tb-row-5-cell-2 rv_tb-rs-row-5-cell-2 rv_tb-cs-row-5-cell-2"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">决定了在去噪过程中，UNet 如何在每一步去噪时预测和移除噪声的<strong>具体算法</strong>。不同的采样器有不同的数学特性，会影响生成速度、图像质量和风格。常见的有 <code>Euler</code>, <code>DPM++ 2M Karras</code>, <code>DDIM</code> 等。</div></div></div></td><td class="rv_tb-cell rv_tb-row-5-cell-3 rv_tb-rs-row-5-cell-3 rv_tb-cs-row-5-cell-3"><div class="rv_tb-element"></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-6-cell-0 rv_tb-rs-row-6-cell-0 rv_tb-cs-row-6-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">scheduler（调度器）</div></div></div></td><td class="rv_tb-cell rv_tb-row-6-cell-1 rv_tb-rs-row-6-cell-1 rv_tb-cs-row-6-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">决定了你<strong>雕刻每一刀的“力度”和“去除杂料的速度曲线”</strong>。</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li><code>karras</code> 调度器：可能意味着开始去除大块杂料，然后逐渐精细，力度衰减得比较平滑高效。</li><li><code>normal</code> 调度器：可能意味着均匀地去除杂料。</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-2"><div class="rv_tb-text"><strong>在雕塑中的作用：</strong> 影响了<strong>雕刻过程的节奏和效率</strong>，以及最终作品的精细度。</div></div></div></td><td class="rv_tb-cell rv_tb-row-6-cell-2 rv_tb-rs-row-6-cell-2 rv_tb-cs-row-6-cell-2"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">这是一个与 <code>sampler_name</code> 紧密相关的参数，它决定了<strong>去噪过程中每一步“噪声量”的衰减方式</strong>（也就是去噪步长）。不同的调度器可以优化采样过程，有时能用更少的步数达到更好的效果。例如 <code>karras</code>, <code>normal</code>, <code>exponential</code> 等。</div></div></div></td><td class="rv_tb-cell rv_tb-row-6-cell-3 rv_tb-rs-row-6-cell-3 rv_tb-cs-row-6-cell-3"><div class="rv_tb-element"></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-7-cell-0 rv_tb-rs-row-7-cell-0 rv_tb-cs-row-7-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">denoise（去噪强度）</div></div></div></td><td class="rv_tb-cell rv_tb-row-7-cell-1 rv_tb-rs-row-7-cell-1 rv_tb-cs-row-7-cell-1"><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-0"><ul class="rv_tb-list"><li><code>enoise = 1.0</code> (文生图)：你的“石料”是一块完全随机的，没有任何预设形状的石头。</li><li><code>denoise &lt; 1.0</code> (图生图)：你拿到的是一块<strong>已经有了大致形状的石头</strong>（输入图像经过 VAE 编码），然后你再往上面“抹”上一些泥土（添加噪声）。<code>denoise</code> 值越小，抹的泥土越少，原始石头的形状就越清晰。</li></ul></div></div><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-1"><div class="rv_tb-text"><strong>在雕塑中的作用：</strong> <strong>决定了你的雕塑在多大程度上要“忠于”原始石料的形态</strong>（如果你是在已有的雕塑上修改），而不是完全从零开始。</div></div></div></td><td class="rv_tb-cell rv_tb-row-7-cell-2 rv_tb-rs-row-7-cell-2 rv_tb-cs-row-7-cell-2"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">这个参数主要用于<strong>图生图 (Image-to-Image)</strong> 任务，而不是纯粹的文生图。它决定了在将输入图像编码到潜在空间后，向其添加多少噪声。</div></div></div><div class="rv_tb-element"><div class="rv_tb-list-wrap rv_justify cell-element-1"><ul class="rv_tb-list"><li><code>denoise = 1.0</code> (默认文生图)：意味着从完全的随机噪声开始去噪，所以是纯粹的文生图。</li><li><code>denoise &lt; 1.0</code> (图生图)：意味着在编码后的图像上添加较少的噪声，生成结果会更多地保留原图的结构和内容。</li></ul></div></div></td><td class="rv_tb-cell rv_tb-row-7-cell-3 rv_tb-rs-row-7-cell-3 rv_tb-cs-row-7-cell-3"><div class="rv_tb-element"></div></td></tr></tbody></table></figure>



<h3 class="wp-block-heading">1.4 Sampler、Scheduler &amp; Steps的理解</h3>



<h4 class="wp-block-heading"><strong>1.4.1. Sampler (采样器)：雕刻的手法/工具</strong></h4>



<ul class="wp-block-list">
<li><strong>原理：</strong>
<ul class="wp-block-list">
<li>采样器决定了在去噪的每一步中，如何从当前带噪的图像状态 xt​（当前的“带泥土的石料”）和 UNet 预测出的噪声 ϵθ​(xt​,t,c)（雕塑家预测哪些是“杂料”）中，推导出下一步更清晰的图像状态 xt−1​（去除一部分杂料后的石料）。</li>



<li>你可以把它理解为“去噪算法”或“迭代更新规则”。它定义了每次“下刀”的具体数学操作。</li>



<li>不同的采样器使用了不同的数学方法来估计和移除噪声，因此它们在收敛速度、稳定性、生成质量和计算成本上有所差异。</li>
</ul>
</li>



<li><strong>常见类型和特点：</strong>
<ul class="wp-block-list">
<li><strong>确定性采样器（Deterministic Samplers）</strong>：
<ul class="wp-block-list">
<li><strong>Euler:</strong> 最简单，每一步的去噪是确定的，相同输入每次结果都相同。速度快，但可能需要更多步数才能达到好的效果。</li>



<li><strong>DPM++ 2M Karras:</strong> 非常流行和高效的采样器。它结合了 DPM-Solver 和 Karras 调度器的思想，通常能在相对较少的步数下生成高质量的图像，效果通常比 Euler 更平滑细腻。</li>



<li><strong>DDIM (Denoising Diffusion Implicit Models):</strong> 也是确定性的，可以用于生成和反演（将图片转为噪声）。</li>
</ul>
</li>



<li><strong>随机性采样器（Stochastic Samplers）</strong>：
<ul class="wp-block-list">
<li><strong>Euler A (Ancestral):</strong> 在每一步去噪时会添加少量的随机噪声。这使得每次运行即使使用相同的 <code>seed</code> 和 <code>steps</code>，结果也会略有不同，增加了多样性。通常能生成更“生动”或有“颗粒感”的图像。</li>



<li><strong>DPM++ SDE Karras:</strong> SDE (Stochastic Differential Equation) 意味着它在每一步中也引入了随机性。</li>
</ul>
</li>
</ul>
</li>



<li><strong>雕塑比喻：</strong>
<ul class="wp-block-list">
<li>它就像雕塑家<strong>所掌握的各种雕刻手法或工具套路</strong>。</li>



<li><strong>Euler</strong> 可能是基础的“刀法”，简单直接。</li>



<li><strong>DPM++ 2M Karras</strong> 可能是更高级、更精细的“雕刻技巧”，能更快地达到光滑、完美的表面。</li>



<li><strong>Euler A</strong> 就像在每一步雕刻时，雕塑家会稍微撒点“魔法粉尘”，让雕塑的细节带有一些随机的、意想不到的美感。</li>
</ul>
</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h4 class="wp-block-heading">1.4.2. Scheduler (调度器)：雕刻的节奏/力度曲线</h4>



<ul class="wp-block-list">
<li><strong>原理：</strong>
<ul class="wp-block-list">
<li>调度器决定了在整个去噪过程中，噪声去除的“时间表”或“力度曲线”。它定义了在不同的 <code>steps</code> 下，模型应该去除多少噪声，以及噪声水平如何从高（初始）到低（最终）逐步衰减。</li>



<li>通俗地讲，它控制了去噪过程的“非线性步进”。例如，它会决定在早期阶段去除更多的噪声，还是在后期阶段更精细地处理。</li>



<li>不同的调度器算法会影响去噪过程的稳定性、收敛速度和最终图像的质量。</li>
</ul>
</li>



<li><strong>常见类型：</strong>
<ul class="wp-block-list">
<li><strong>karras:</strong> 非常流行的调度器，通常与 DPM++ 采样器结合使用。它使用一种优化的噪声调度曲线，使得模型在较少步数下也能生成高质量的图像，效果通常更平滑。</li>



<li><strong>normal:</strong> 均匀地分配去噪步长。</li>



<li><strong>exponential:</strong> 噪声去除的速度呈指数衰减。</li>



<li><strong>sgm_uniform (SDXL 常用):</strong> 针对 SDXL 模型优化的调度器。</li>
</ul>
</li>



<li><strong>雕塑比喻：</strong>
<ul class="wp-block-list">
<li>它就像雕塑家<strong>雕刻每一刀的“力度”和“节奏”安排</strong>。</li>



<li><strong>karras </strong>调度器可能意味着雕塑家一开始大刀阔斧，去除大量杂料，然后随着雕塑逐渐成型，他会越来越轻柔、越来越精细地打磨，这种力度和节奏的变化是经过优化的。</li>



<li><strong>normal </strong>调度器就像雕塑家在每一刀都用差不多的力度，均匀地去除杂料。</li>
</ul>
</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h4 class="wp-block-heading">1.4.3. Steps (步数)：雕刻的总刀数/雕刻的次数</h4>



<ul class="wp-block-list">
<li><strong>原理：</strong>
<ul class="wp-block-list">
<li><strong>Steps</strong> 就是去噪迭代的总次数。UNet 会在每一步中预测噪声，然后采样器会根据这个预测来更新图像状态。这个过程会重复 Steps 次。</li>



<li>步数越多，去噪过程越充分，理论上图像会越清晰，细节也可能越丰富。</li>



<li>然而，并非步数越多越好。达到一定步数后，收益会递减，甚至可能引入伪影（artifacts）或过度平滑。</li>
</ul>
</li>



<li><strong>常见实践：</strong>
<ul class="wp-block-list">
<li>对于大多数 1.5 模型和现代采样器（如 DPM++ 2M Karras），通常 <strong>20-30 步</strong>就能获得很好的效果。</li>



<li>对于 SDXL，可能需要 <strong>25-35 步</strong>。</li>



<li>步数越少，生成速度越快，但图像质量可能下降。</li>
</ul>
</li>



<li><strong>雕塑比喻：</strong>
<ul class="wp-block-list">
<li>就是你<strong>雕刻的总刀数或者总的雕刻动作次数</strong>。</li>



<li>Steps = 10：可能只雕了10刀，作品很粗糙。</li>



<li>Steps = 30：雕了30刀，作品已经非常精细。</li>



<li>Steps = 100：雕了100刀，可能在30刀时就已经很好了，再多雕也没有明显提升，甚至可能过度打磨。</li>
</ul>
</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h4 class="wp-block-heading">1.4.4. 三者之间的关系</h4>



<p>它们是<strong>相互协作</strong>的：</p>



<ul class="wp-block-list">
<li>Sampler (手法) 决定了如何下刀。</li>



<li>Scheduler (节奏) 决定了在哪些阶段下重刀，哪些阶段下轻刀。</li>



<li>Steps (总刀数) 决定了下刀的总次数。</li>
</ul>



<ol class="wp-block-list">
<li><strong>Sampler 与 Scheduler 的协同：</strong>
<ul class="wp-block-list">
<li>许多采样器（特别是 DPM++ 系列）是专为与 karras 调度器配合使用而设计和优化的。当它们一起使用时，通常能在更少的 steps 下达到更好的效果。</li>



<li>错误的组合可能会导致效率低下或生成质量不佳。</li>
</ul>
</li>



<li><strong>Steps 对 Sampler 和 Scheduler 的影响：</strong>
<ul class="wp-block-list">
<li>Steps 的数量直接影响 Sampler 的迭代次数和 Scheduler 的“时间分配”。</li>



<li>如果 Steps 太少，无论采样器和调度器多优秀，都可能没有足够的时间去噪，导致图像质量差。</li>



<li>如果 Steps 太多，可能会浪费计算资源，且不一定能带来显著的质量提升。</li>
</ul>
</li>



<li><strong>CFG Scale 的额外影响：</strong>
<ul class="wp-block-list">
<li>CFG Scale 决定了采样器在每一步去噪时对提示词的“听话程度”。它会影响采样器判断“噪声”的方向，从而改变去噪路径。高 CFG 通常会和更多的 steps 结合使用，因为模型需要更多步数来严格遵循提示。</li>
</ul>
</li>
</ol>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h4 class="wp-block-heading">1.4.5. 推荐搭配</h4>



<p><strong><strong> <strong>万金油搭配（</strong>推荐度：★★★★★<strong><strong><strong>）</strong></strong></strong></strong></strong></p>



<ul class="wp-block-list">
<li><strong>Sampler (采样器):</strong> dpmpp_2m_karras (ComfyUI 中通常显示为 DPM++ 2M Karras)</li>



<li><strong>Scheduler (调度器):</strong> karras</li>



<li><strong>Steps (步数):</strong> 20 &#8211; 30 步 (建议从 25 步开始尝试)</li>



<li><strong>CFG Scale (额外推荐，非直接搭配):</strong> 6.0 &#8211; 8.0 (建议从 7.0 开始尝试)</li>
</ul>



<p><strong>为什么推荐这个搭配？</strong></p>



<ul class="wp-block-list">
<li><strong>dpmpp_2m_karras 采样器：</strong> 这是一个非常高效和高质量的采样器。它结合了 DPM-Solver 和 Karras 调度器的优点，通常能在相对较少的步数内生成平滑、细节丰富的图像，且收敛性好。</li>



<li><strong>karras 调度器：</strong> 这个调度器是专门为 DPM++ 系列采样器优化的。它能智能地分配去噪步长，使得在去噪过程中，噪声去除的节奏更合理，从而在有限的步数下达到更好的效果。</li>



<li><strong>20-30 步：</strong> 在这个搭配下，25 步是一个非常平衡的值，通常能提供很好的质量和较快的生成速度。对于大多数需求而言，再增加步数可能收益不大，反而增加生成时间。如果你想要更多细节或在某些情况下出现伪影，可以稍微增加到 30 步；如果想追求速度，可以降低到 20 步。</li>



<li><strong>6.0-8.0 CFG Scale：</strong> 这个范围是比较通用的，能让模型较好地遵循你的提示词，同时保留一定的创造性。</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>追求多样性/轻微颗粒感 (推荐度：★★★★☆)</strong></p>



<p>如果你想在生成的图像中获得一点点随机的变化，或者偶尔喜欢那种略带“噪点”或“颗粒感”的艺术效果：</p>



<ul class="wp-block-list">
<li><strong>Sampler (采样器)</strong>：euler_ancestral (ComfyUI 中通常显示为 Euler A)</li>



<li><strong>Scheduler (调度器)</strong>： karras (或 normal 也可以，但 karras 通常更通用)</li>



<li><strong>Steps (步数):</strong> 20 &#8211; 40 步 (建议从 30 步开始尝试)</li>



<li><strong>CFG Scale:</strong> 6.0 &#8211; 9.0 (可以稍微提高一些，因为 Euler A 的随机性)</li>
</ul>



<p><strong>为什么推荐这个搭配？</strong></p>



<ul class="wp-block-list">
<li><strong>Euler A 采样器：</strong> 这是一个随机采样器，它在每次迭代中会引入微小的噪声。这意味着即使 seed 和其他参数完全相同，每次生成的图像也会有细微的不同，增加了探索性。它的图像风格有时会显得更“自然”或“手绘感”。</li>



<li><strong>更多步数：</strong> Euler A 通常会受益于更多的步数，以充分发挥其随机性并细化图像。</li>
</ul>



<h2 class="wp-block-heading">二、图生图</h2>



<h3 class="wp-block-heading">2.1 小白原理篇</h3>



<p>在“文生图”的魔法世界里，我们是从一块未经雕琢的“混沌石料”开始创作，一切都是从零到有。</p>



<p>但如果你的任务是对一件现有作品进行“二次创作”或“修改”呢？比如，你手头已经有一尊精美的雕塑，但想给它换个材质，或者让它摆出不同的姿势，甚至变成另一种完全不同的生物？</p>



<p>别担心，这同样是 Stable Diffusion 的拿手好戏——“图生图”。这个过程其实并没有你想象中那么复杂，它仅仅在开始雕刻前，多加了两个巧妙的“魔法动作”。</p>



<p class="has-medium-font-size"><strong>第一步：魔法“去色”与“重塑”</strong></p>



<p>你提供的“现有作品”（无论是照片还是画作），在进入魔法世界的第一件事，就是经历一次奇特的<strong>“魔法去色”</strong>。</p>



<p>你可以把这理解成，雕塑家会施展一个特殊的魔法，瞬间将你提供的彩色、生动的作品，变回一件只有“基本形状和模糊轮廓”的原始石料。这块石料不再有色彩，也不再有精细的纹理，就像回到了雕塑的“草稿”状态。</p>



<p>为什么要做这个动作？</p>



<p>在这个魔法世界里，雕塑家（也就是我们的模型）最擅长的“雕刻动作”总是在那种没有最终上色的“草稿石料”上进行的。直到最后一步，他才进行精修上色。这个“去色”的过程，其实是为了把你的现有作品，先转换成模型最熟悉、最容易进行“去噪”雕刻的“草稿”形式。这样做也能大幅降低计算量，让魔法效率更高。</p>



<p class="has-medium-font-size"><strong>第二步：涂上“创作的泥巴”</strong></p>



<p>接下来，就是为你的“二次创作”争取创作空间的时候了。</p>



<p>雕塑家会在这块刚刚被“魔法去色”的石料表面，均匀地“涂抹”上一层额外的“泥巴”。这层泥巴会重新带来一些随机性和混沌感，就像在光滑的表面上重新覆盖了一层待处理的材料。</p>



<p>你涂的“泥巴”越多，覆盖得越厚，那么原作品的痕迹就会被掩盖得越深，雕塑家后续创作的自由度就越大，最终作品与原作品的差异也可能越大。<br>如果你只涂薄薄一层“泥巴”，那么原作品的轮廓和细节就会若隐若现，雕塑家就会更忠实于原作品进行精修或微调。<br>这个“涂抹泥巴”的多少，就决定了你希望对原作品进行多大程度的“大刀阔斧”改造。</p>



<p class="has-medium-font-size"><strong>第三步：重回“文生图”的起点，开始新的创作！</strong></p>



<p>完成了这两个“魔法动作”——先魔法去色，再涂上创作的泥巴——你的“半成品”雕塑就又回到了一个充满随机混沌但又带有原始痕迹的“草稿石料”状态。</p>



<p>从这一刻起，整个“雕刻过程”就和“文生图”一模一样了！雕塑家会根据你新的“设计需求说明”（你希望它变成什么样子，不希望它出现什么），一步一步地去除多余的“泥巴”，精雕细琢，最终呈现出一件既有你原始作品的影子（如果泥巴涂得少），又融入了你全新创意的精美作品！</p>



<h3 class="wp-block-heading">2.2 基本工作流图示</h3>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1589" height="767" src="https://0to60.top/wp-content/uploads/2025/06/image-13.png" alt="" class="wp-image-746" srcset="https://0to60.top/wp-content/uploads/2025/06/image-13.png 1589w, https://0to60.top/wp-content/uploads/2025/06/image-13-300x145.png 300w, https://0to60.top/wp-content/uploads/2025/06/image-13-1024x494.png 1024w, https://0to60.top/wp-content/uploads/2025/06/image-13-768x371.png 768w, https://0to60.top/wp-content/uploads/2025/06/image-13-1536x741.png 1536w" sizes="auto, (max-width: 1589px) 100vw, 1589px" /></figure>



<p>相对于文生图的基本工作流，多了Load Image，Load VAE 和 VAE Encode</p>



<figure class="wp-block-riovizual-tablebuilder is-style-stripes rv_tb-cb307d1b-1361-41cc-ac89-f7b191fb4fc4 is-scroll-on-mobile" rv-tb-responsive-breakpoint="768px"><table class=""><thead><tr><th class="rv_tb-cell rv_tb-row-0-cell-0 rv_tb-rs-row-0-cell-0 rv_tb-cs-row-0-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">节点名称</div></div></div></th><th class="rv_tb-cell rv_tb-row-0-cell-1 rv_tb-rs-row-0-cell-1 rv_tb-cs-row-0-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">雕塑描述</div></div></div></th></tr></thead><tbody><tr><td class="rv_tb-cell rv_tb-row-1-cell-0 rv_tb-rs-row-1-cell-0 rv_tb-cs-row-1-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">Load Image</div></div></div></td><td class="rv_tb-cell rv_tb-row-1-cell-1 rv_tb-rs-row-1-cell-1 rv_tb-cs-row-1-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">将现有作品拿出来</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-2-cell-0 rv_tb-rs-row-2-cell-0 rv_tb-cs-row-2-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">Load VAE</div></div></div></td><td class="rv_tb-cell rv_tb-row-2-cell-1 rv_tb-rs-row-2-cell-1 rv_tb-cs-row-2-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">确定魔法去色应该使用哪一种方式（VAE 模型），值得一提的是，每一种方式同时确定了魔法去色（VAE Encode）和上色（VAE Decode）的技巧。</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-3-cell-0 rv_tb-rs-row-3-cell-0 rv_tb-cs-row-3-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">VAE Encode</div></div></div></td><td class="rv_tb-cell rv_tb-row-3-cell-1 rv_tb-rs-row-3-cell-1 rv_tb-cs-row-3-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">当确定了去色方式时，就执行去色动作(VAE Eecode)。<br>输入：现有作品(Image) 和 去色方式(VAE模型)<br>输出：去色后的作品（image latent）</div></div></div></td></tr></tbody></table></figure>



<h3 class="wp-block-heading">2.3 再次理解denoise（denoising_strength）</h3>



<p>这个参数通常被翻译成去噪强度，但是我更愿意将其理解成加噪强度，或者我更愿意将其翻译成重塑幅度，其越大，重塑的空间越大。因为涂的泥巴越多，原有作品对雕塑过程的约束就越少。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="324" src="https://0to60.top/wp-content/uploads/2025/06/image-14-scaled.png" alt="" class="wp-image-747" srcset="https://0to60.top/wp-content/uploads/2025/06/image-14-scaled.png 2560w, https://0to60.top/wp-content/uploads/2025/06/image-14-300x38.png 300w, https://0to60.top/wp-content/uploads/2025/06/image-14-1024x130.png 1024w, https://0to60.top/wp-content/uploads/2025/06/image-14-768x97.png 768w, https://0to60.top/wp-content/uploads/2025/06/image-14-1536x195.png 1536w, https://0to60.top/wp-content/uploads/2025/06/image-14-2048x259.png 2048w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<h2 class="wp-block-heading">三、局部重绘</h2>



<h3 class="wp-block-heading">3.1 小白原理篇</h3>



<p>文生图，从一块混沌石料，遵循设计需求说明文档进行创作。</p>



<p>图生图，则从一件现有作品进行重塑，需要先进行魔法去色，再遵循设计需求说明文档进行创作。</p>



<p>而inpaint，则是不仅需要对现有作品进行魔法去色，还需选定重塑区域，再遵循设计需求说明文档进行创作。</p>



<h3 class="wp-block-heading">第一步：&#8221;确定改造重塑区域&#8221;并整体&#8221;魔法去色&#8221;</h3>



<p>同样要拿出那件“现有雕塑”，需要用一张特殊的<strong>“魔法遮罩”</strong>（mask），精确地圈选出你想要改造的“局部区域”，告诉雕塑家：“我只动这一块地方，其他地方尽量别动！”。然后让它经历<strong>“魔法去色”</strong>（VAE encode），回归<strong>“草稿石料”</strong>的状态<strong>。</strong></p>



<h3 class="wp-block-heading">第二步：再改造重塑区域涂上“创作的泥巴”</h3>



<p>雕塑家只会聚焦在被你圈选出的<strong>“魔法遮罩区域”<strong>内</strong></strong><strong>，根据你设定的“改造程度”(Denoise)，重新“涂抹上额外的泥巴”</strong>。遮罩之外的区域，则会小心翼翼地保持原样，不被泥巴覆盖。</p>



<h3 class="wp-block-heading">第三步：重回“文生图”的起点，开始新的创作！</h3>



<p>完成局部准备后，雕塑家便会在这块“被涂抹泥巴”的“局部草稿”上，根据你针对这个“局部”提供的新的设计需求说明书（Prompt），开始精准的雕刻。最神奇的是，他在雕刻时，不仅会严格按照你新的局部要求，还会确保新雕刻的部分，能完美、自然地融入到作品未被触碰的其他部分中，不留下任何突兀的痕迹。</p>



<h3 class="wp-block-heading">3.2 基本工作流图示</h3>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1279" height="752" src="https://0to60.top/wp-content/uploads/2025/06/image-15.png" alt="" class="wp-image-788" srcset="https://0to60.top/wp-content/uploads/2025/06/image-15.png 1279w, https://0to60.top/wp-content/uploads/2025/06/image-15-300x176.png 300w, https://0to60.top/wp-content/uploads/2025/06/image-15-1024x602.png 1024w, https://0to60.top/wp-content/uploads/2025/06/image-15-768x452.png 768w" sizes="auto, (max-width: 1279px) 100vw, 1279px" /></figure>



<p>相对于图生图的工作流，增加了遮罩信息，同时VAE Encode节点也作了调整，VAE Encode（for inpaint）</p>



<figure class="wp-block-riovizual-tablebuilder is-style-stripes rv_tb-25eddbde-6613-4d1d-8b55-51eee6edce72 is-scroll-on-mobile" rv-tb-responsive-breakpoint="768px"><table class=""><tbody><tr><th class="rv_tb-cell rv_tb-row-0-cell-0 rv_tb-rs-row-0-cell-0 rv_tb-cs-row-0-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">节点名称</div></div></div></th><th class="rv_tb-cell rv_tb-row-0-cell-1 rv_tb-rs-row-0-cell-1 rv_tb-cs-row-0-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">雕塑描述</div></div></div></th></tr><tr><td class="rv_tb-cell rv_tb-row-1-cell-0 rv_tb-rs-row-1-cell-0 rv_tb-cs-row-1-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">Load Image</div></div></div></td><td class="rv_tb-cell rv_tb-row-1-cell-1 rv_tb-rs-row-1-cell-1 rv_tb-cs-row-1-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">将现有作品拿出来，并且在Mask Editor中圈选需要重绘的区域</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-2-cell-0 rv_tb-rs-row-2-cell-0 rv_tb-cs-row-2-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">VAE Encode（for inpaint）</div></div></div></td><td class="rv_tb-cell rv_tb-row-2-cell-1 rv_tb-rs-row-2-cell-1 rv_tb-cs-row-2-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">接收已圈选区域的雕塑(original image和mask)，并对其魔法去色（将其融合到同一个latent中）。</div></div></div></td></tr><tr><td class="rv_tb-cell rv_tb-row-3-cell-0 rv_tb-rs-row-3-cell-0 rv_tb-cs-row-3-cell-0"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">Ksampler</div></div></div></td><td class="rv_tb-cell rv_tb-row-3-cell-1 rv_tb-rs-row-3-cell-1 rv_tb-cs-row-3-cell-1"><div class="rv_tb-element"><div class="rv_tb-text-wrap rv_justify cell-element-0"><div class="rv_tb-text">基于重绘幅度(denoise)，先在取色的雕塑上在圈选的区域进行摸泥巴，然后再机</div></div></div></td></tr></tbody></table></figure>



<h3 class="wp-block-heading">3.3 加深理解inpaint</h3>



<p>整个过程：</p>



<h4 class="wp-block-heading">3.3.1 Load Image 和 Mask Editor</h4>



<p>当你在 Load Image 节点加载图片后，通过 mask editor 工具，你创建了一个像素级的二值遮罩 (pixel-level binary mask)。这个遮罩通常是黑白图，白色区域表示要修改的区域（遮罩），黑色区域表示要保留的区域。<br></p>



<h4 class="wp-block-heading">3.3.2 VAE Encode (魔法去色) 和 mask 的整合：</h4>



<p>没错，当原始图像（image）和这个像素级的 mask 一起被送入 VAE Encode 节点（或专门的 Inpaint 编码器）时：</p>



<ul class="wp-block-list">
<li>图片被编码： 原始图片（像素数据）会被 VAE 的编码器部分转换成潜在空间图像 (latent image)</li>



<li>Mask 被编码或调整： mask 本身也会被处理。最常见的做法是：
<ul class="wp-block-list">
<li>Mask 也被 VAE 编码器处理成潜在空间中的 mask： VAE 编码器不仅会编码图像，也会将像素级的 mask 压缩并转换成对应潜空间尺寸的 mask。这个潜空间 mask 的分辨率会比像素级的低，但仍然表示了被遮罩的区域。</li>



<li>Mask 可能被放大/缩小后作为额外的通道： 有些实现会将潜空间 mask 作为潜在图像的一个额外的通道（例如，如果潜图像是 4 通道，它可能变成 5 通道，第 5 个通道就是 mask 信息）。</li>



<li>Mask 可能会影响潜在图像的初始化： 或者，mask 会在潜在图像初始化时，指导某些区域的加噪和不加噪。</li>
</ul>
</li>
</ul>



<h4 class="wp-block-heading">3.3.3 KSampler (雕刻过程) 中 mask 的指导</h4>



<ul class="wp-block-list">
<li>被编码后的潜在图像（可能带有 mask 信息），以及由 denoising_strength 控制的“涂抹泥巴”操作（加噪），都会作为 KSampler 的输入。</li>



<li>KSampler 内部的 UNet 模型在去噪时，会接收这个潜空间 mask 作为指导信息。</li>



<li>UNet 会根据这个 mask：
<ul class="wp-block-list">
<li>集中在遮罩区域去噪和生成内容。</li>



<li>同时，确保在遮罩之外的区域，模型尽量保持原始图像的内容不变，或者只进行平滑的融合。</li>
</ul>
</li>



<li>mask 在这里充当了<strong>“注意力权重”或“区域限制”</strong>的作用，告诉 UNet 在哪里可以自由创造，在哪里必须忠于原图。</li>
</ul>



<h4 class="wp-block-heading">3.3.4 为什么这样做？</h4>



<ul class="wp-block-list">
<li>计算效率： 在潜在空间中操作比在像素空间中更高效。将 mask 也编码到潜在空间，可以确保所有去噪操作都在同一个低维空间中进行，避免不必要的像素级操作。</li>



<li>语义理解： 潜在空间捕获的是图像的语义和结构信息。将 mask 融入到潜在空间，可以让模型更好地理解在什么“概念区域”进行修改，而不是仅仅在像素坐标上操作。</li>



<li>平滑融合： 通过在潜在空间中对 mask 区域进行内容生成和与非 mask 区域进行融合，模型能够学习到如何在语义层面实现无缝连接，而不是简单的像素级拼接。</li>
</ul>



<h2 class="wp-block-heading">四、理解LoRA</h2>



<h3 class="wp-block-heading">4.1 LoRA 小白理解</h3>



<h4 class="wp-block-heading">4.1.1 <strong>LoRA对CLIP模型产生影响</strong></h4>



<p>在之前提到，赛博雕塑世界中，需要对咱们的需求(prompt)转换成雕塑家能理解的设计需求说明书（embedding），而这个转换器的规则便记录在CLIP模型中。</p>



<p>lora的其中一个作用便是修改转换器规则（CLIP），大致的作用就是对指定的概念进行约束补充说明，倘若设计需求说明书(embedding)包含了指定的概念，这些概念就会有一个更为详细的扩充说明。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="573" height="455" src="https://0to60.top/wp-content/uploads/2025/06/image-19.png" alt="" class="wp-image-801" srcset="https://0to60.top/wp-content/uploads/2025/06/image-19.png 573w, https://0to60.top/wp-content/uploads/2025/06/image-19-300x238.png 300w" sizes="auto, (max-width: 573px) 100vw, 573px" /></figure>



<p>反向理解，如果设计需求说明书中没有lora指定的概念，即时使用了lora，也不会产生啥影响。有趣的是，设计需求说明书中有一些公有概念不会明确表示出来，(如：背景，风格等)，lora训练时如果指定了这些概念，就会产生影响。</p>



<h4 class="wp-block-heading">4.1.2 LoRA对Unet模型（雕塑家）产生影响</h4>



<p>前面提到过，unet模型可以理解为一位雕塑家，在创作之前，被要求学习雕刻技艺（对指定的概念应该以什么样的风格/元素进行雕刻创作）。</p>



<p>在这里影响的是雕塑家&#8221;真正动手雕刻&#8221;的方式</p>



<h3 class="wp-block-heading">4.2 基本工作流</h3>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1657" height="786" src="https://0to60.top/wp-content/uploads/2025/06/image-17.png" alt="" class="wp-image-799" srcset="https://0to60.top/wp-content/uploads/2025/06/image-17.png 1657w, https://0to60.top/wp-content/uploads/2025/06/image-17-300x142.png 300w, https://0to60.top/wp-content/uploads/2025/06/image-17-1024x486.png 1024w, https://0to60.top/wp-content/uploads/2025/06/image-17-768x364.png 768w, https://0to60.top/wp-content/uploads/2025/06/image-17-1536x729.png 1536w" sizes="auto, (max-width: 1657px) 100vw, 1657px" /></figure>



<p>可以看到lora的使用方式是在CLIP text encoder之前<br>Load LoRA会接收输入：CLIP和model</p>



<ul class="wp-block-list">
<li>CLIP，则是提示词（prompt）转换生成需求设计说明书(embedding)的规则，LoRA会对其进行修改。</li>



<li>model(unet模型)，雕塑家，LoRA要求雕塑家针对指定的概念进行雕塑记忆学习。</li>
</ul>



<p>输出则是进行修改过的CLIP和model，CLIP是转换器所需，而model则是各种采样器节点(如：ksampler)所需。</p>



<h2 class="wp-block-heading">五、理解Textual Inversion (Embedding)</h2>



<h3 class="wp-block-heading">5.1 小白理解 </h3>



<p>如果说Lora的作用是在需求说明书中的某个现有概念进行扩充约束说明，那么Textual Inversion (Embedding)更像是新增一个概念，并且自带扩充约束说明。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="787" height="524" src="https://0to60.top/wp-content/uploads/2025/06/image-18.png" alt="" class="wp-image-800" srcset="https://0to60.top/wp-content/uploads/2025/06/image-18.png 787w, https://0to60.top/wp-content/uploads/2025/06/image-18-300x200.png 300w, https://0to60.top/wp-content/uploads/2025/06/image-18-768x511.png 768w" sizes="auto, (max-width: 787px) 100vw, 787px" /></figure>



<h3 class="wp-block-heading">5.2 基本工作流</h3>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1772" height="759" src="https://0to60.top/wp-content/uploads/2025/06/image-20.png" alt="" class="wp-image-802" srcset="https://0to60.top/wp-content/uploads/2025/06/image-20.png 1772w, https://0to60.top/wp-content/uploads/2025/06/image-20-300x128.png 300w, https://0to60.top/wp-content/uploads/2025/06/image-20-1024x439.png 1024w, https://0to60.top/wp-content/uploads/2025/06/image-20-768x329.png 768w, https://0to60.top/wp-content/uploads/2025/06/image-20-1536x658.png 1536w" sizes="auto, (max-width: 1772px) 100vw, 1772px" /></figure>



<p>可以看到，Textual Inversion的使用方式是在CLIP text Encoder中直接通过形如embedding:xxxx.pt的形式进行使用，而xxxx.pt文件一般存在于 <strong><code>comfyUI根目录/models/embeddings</code></strong> 目录中</p>



<p></p>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8c%e5%ae%9e%e6%88%98%e8%ae%b0%e5%bd%95/">ComfyUI，SD小白入门篇</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/comfyui%ef%bc%8c%e5%ae%9e%e6%88%98%e8%ae%b0%e5%bd%95/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Hello，ComfyUI</title>
		<link>https://0to60.top/hello%ef%bc%8ccomfyui/</link>
					<comments>https://0to60.top/hello%ef%bc%8ccomfyui/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Wed, 04 Jun 2025 06:19:27 +0000</pubDate>
				<category><![CDATA[ComfyUI-SD]]></category>
		<category><![CDATA[ComfyUI]]></category>
		<guid isPermaLink="false">https://0to60.top/?p=694</guid>

					<description><![CDATA[<p>引言 本文的作用主要是搭建部署Com&#46;&#46;&#46;</p>
<p><a rel="nofollow" href="https://0to60.top/hello%ef%bc%8ccomfyui/">Hello，ComfyUI</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">引言</h2>



<p>本文的作用主要是搭建部署ComfyUI，并尝试构建工作流（文生图和图生图）</p>



<h2 class="wp-block-heading">一、ComfyUI快速部署</h2>



<h3 class="wp-block-heading">1.1 选择GPU服务器厂商</h3>



<p>这里我选择的是优云智算，价格亲民，GPU挺充足，过往选择的是AutoDL，经常遇到GPU不够的情况。</p>


https://passport.compshare.cn/register?referral_code=4tuMbi2nPCLBv4tAtMkjvr


<h3 class="wp-block-heading">1.2 购买服务器实例并部署comfyUI</h3>



<ul class="wp-block-list">
<li>确认了GPU类型，个人比较倾向3090或者3080TI，无他性价比高，显存够</li>



<li>镜像安装，选择一个带ComfyUI的镜像，<strong>ComfyUI-Wanx-I2V</strong>，随便选一个吧</li>
</ul>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="486" src="https://0to60.top/wp-content/uploads/2025/06/image-1024x486.png" alt="" class="wp-image-696" style="width:720px" srcset="https://0to60.top/wp-content/uploads/2025/06/image-1024x486.png 1024w, https://0to60.top/wp-content/uploads/2025/06/image-300x142.png 300w, https://0to60.top/wp-content/uploads/2025/06/image-768x364.png 768w, https://0to60.top/wp-content/uploads/2025/06/image-1536x729.png 1536w, https://0to60.top/wp-content/uploads/2025/06/image.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">1.3 启动ComfyUI并进入应用</h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="486" src="https://0to60.top/wp-content/uploads/2025/06/image-1-1024x486.png" alt="" class="wp-image-697" srcset="https://0to60.top/wp-content/uploads/2025/06/image-1-1024x486.png 1024w, https://0to60.top/wp-content/uploads/2025/06/image-1-300x142.png 300w, https://0to60.top/wp-content/uploads/2025/06/image-1-768x364.png 768w, https://0to60.top/wp-content/uploads/2025/06/image-1-1536x729.png 1536w, https://0to60.top/wp-content/uploads/2025/06/image-1.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>DONE</p>



<h2 class="wp-block-heading">二、Hello，ComfyUI</h2>



<h3 class="wp-block-heading">2.1 文生图</h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="486" src="https://0to60.top/wp-content/uploads/2025/06/image-2-1024x486.png" alt="" class="wp-image-698" srcset="https://0to60.top/wp-content/uploads/2025/06/image-2-1024x486.png 1024w, https://0to60.top/wp-content/uploads/2025/06/image-2-300x142.png 300w, https://0to60.top/wp-content/uploads/2025/06/image-2-768x364.png 768w, https://0to60.top/wp-content/uploads/2025/06/image-2-1536x729.png 1536w, https://0to60.top/wp-content/uploads/2025/06/image-2.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">2.2 图生图</h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="486" src="https://0to60.top/wp-content/uploads/2025/06/image-3-1024x486.png" alt="" class="wp-image-699" srcset="https://0to60.top/wp-content/uploads/2025/06/image-3-1024x486.png 1024w, https://0to60.top/wp-content/uploads/2025/06/image-3-300x142.png 300w, https://0to60.top/wp-content/uploads/2025/06/image-3-768x364.png 768w, https://0to60.top/wp-content/uploads/2025/06/image-3-1536x729.png 1536w, https://0to60.top/wp-content/uploads/2025/06/image-3.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p></p>



<div class="wp-block-cover aligncenter"><img loading="lazy" decoding="async" width="612" height="216" class="wp-block-cover__image-background wp-image-137" alt="" src="https://0to60.top/wp-content/uploads/2025/05/istockphoto-1368531657-612x612-1.jpg" data-object-fit="cover" srcset="https://0to60.top/wp-content/uploads/2025/05/istockphoto-1368531657-612x612-1.jpg 612w, https://0to60.top/wp-content/uploads/2025/05/istockphoto-1368531657-612x612-1-300x106.jpg 300w" sizes="auto, (max-width: 612px) 100vw, 612px" /><span aria-hidden="true" class="wp-block-cover__background has-background-dim"></span><div class="wp-block-cover__inner-container is-layout-flow wp-block-cover-is-layout-flow">
<p class="has-text-align-center has-large-font-size"></p>
</div></div>



<p></p>
<p><a rel="nofollow" href="https://0to60.top/hello%ef%bc%8ccomfyui/">Hello，ComfyUI</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/hello%ef%bc%8ccomfyui/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ComfyUI，启动</title>
		<link>https://0to60.top/comfyui%ef%bc%8c%e5%90%af%e5%8a%a8/</link>
					<comments>https://0to60.top/comfyui%ef%bc%8c%e5%90%af%e5%8a%a8/#respond</comments>
		
		<dc:creator><![CDATA[burson]]></dc:creator>
		<pubDate>Fri, 30 May 2025 07:32:23 +0000</pubDate>
				<category><![CDATA[ComfyUI-SD]]></category>
		<category><![CDATA[ComfyUI]]></category>
		<guid isPermaLink="false">https://0to60.top/?p=651</guid>

					<description><![CDATA[<p>引言 本文的目的是阐述为什么要研究C&#46;&#46;&#46;</p>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8c%e5%90%af%e5%8a%a8/">ComfyUI，启动</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">引言</h2>



<p>本文的目的是阐述为什么要研究ComfyUI及MVP执行路径</p>



<h2 class="wp-block-heading">一、为什么要研究ComfyUI</h2>



<ul class="wp-block-list">
<li>自媒体创作过程中需要内容，而内容的表现形式就是图片或视频，ComfyUI能为内容创作赋能。</li>



<li>过往研究过SD WebUI，而ComfyUI更为灵活，逻辑性更强，目前社区活跃度也很高，所以选择它。</li>
</ul>



<h2 class="wp-block-heading">二、MVP执行路径</h2>



<ol class="wp-block-list">
<li>快速选择一家GPU服务器平台，不需要过多在意价格。</li>



<li>购买服务器并部署ComfyUI</li>



<li>输出第一张图片</li>



<li>输出《Hello，ComfyUI》</li>
</ol>
<p><a rel="nofollow" href="https://0to60.top/comfyui%ef%bc%8c%e5%90%af%e5%8a%a8/">ComfyUI，启动</a>最先出现在<a rel="nofollow" href="https://0to60.top">0260</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://0to60.top/comfyui%ef%bc%8c%e5%90%af%e5%8a%a8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
