1. 局部重绘工作流(重绘编码器版本).json
#6
CLIPTextEncode
CLIP
条件
closeup photograph of maine coon (cat:1.2) in the yosemite national park mountains nature
#7
CLIPTextEncode
CLIP
条件
watermark, text
#26
VAEEncodeForInpaint
图像
VAE
遮罩
Latent
6
#8
VAEDecode
Latent
VAE
图像
#9
SaveImage
图像
ComfyUI
#3
KSampler
模型
正面条件
负面条件
Latent
Latent
1040111309094545
randomize
20
8
uni_pc_bh2
normal
1
#29
CheckpointLoaderSimple
模型
CLIP
VAE
512-inpainting-ema.safetensors
#20
LoadImage
图像
遮罩
yosemite_inpaint_example.png
image
#30
Note
# 局部重绘
## WebUI中的操作
在 WebUI 中,我们可以通过画布在上传的图片上涂抹/上传蒙版图来确定一块区域进行重绘
一般来说,白色是1(需要被操作)黑色是0(不动)
## ComfyUI中的操作
在作者提供的工作流示例中,也有提供:Inpaint文件夹。或者其他更多的工作流方法
### 重绘编码器版本
核心
- 蒙版的设置
蒙版的位置比较隐蔽,在加载图像节点上右键 > 在蒙版(遮罩)编辑器里打开 (Open in MaskEditor),在里面可以编辑蒙版
- VAE内补编码器
这个本质也是VAE编码节点,不过这个是专门用于重绘的。用这个代替之前的普通版本的VAE编码节点
- 后面的流程同普通图生图
要项
- 重绘强度(去噪强度),建议0.8
太低了容易生成纯白色块(原理上,加了遮罩后,遮罩的部分是白色图像,以对应“空白”的潜空间)
太高了容易完全重绘,与原图没关系
### 潜空间噪声蒙版版本
上一个版本重绘强度不能太低,那如何使用更小的重绘强度?
- 将VAE内补编码器替换成先连 `VAE Encode` 再连 `SetLatentNoiseMask` 节点
### 含蒙版翻转、收缩、模糊选项
### 上传蒙版版本
Load image and alpha mask for inpainting
Press enter or space to select a node. You can then use the arrow keys to move the node around. You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel.
链接到当前文件 0
没有文件链接到当前文件