ComfyPilotComfyPilot
工作流 / 图像工具 / 局部重绘: Bria Generative Fill
局部重绘: Bria Generative Fill

局部重绘: Bria Generative Fill

Inpainting: Bria Generative Fill

使用Bria的生成式填充API重新生成图像的特定区域,同时保持遮罩之外的区域像素级不变。在目标区域上绘制遮罩,为替换内容编写详细的提示词,并在导出前并排比较之前/之后的效果。非常适合产品照片修正、物体移除或替换,以及需要对编辑区域进行精确控制的创意合成。

图像工具 6 个节点 1 个输入 40 次使用 ComfyUI ≥ 0.33.0 ComfyUI 7 KB

下载工作流 JSON 查看官方来源

下载后把文件拖进 ComfyUI 窗口即可打开。

节点构成

BriaGenFill × 1
LoadImage × 1
Painter × 1
SaveImageAdvanced × 1
ImageCompare × 1
MarkdownNote × 1

官方标注的模型

BRIA

工作流 JSON

和上面「下载工作流 JSON」是同一份文件。

1{
2 "id": "fb5b92b3-fd02-4753-8d96-4f8848898ee8",
3 "revision": 0,
4 "last_node_id": 13,
5 "last_link_id": 24,
6 "nodes": [
7 {
8 "id": 1,
9 "type": "BriaGenFill",
10 "pos": [
11 -2060,
12 4860
13 ],
14 "size": [
15 400,
16 297.890625
17 ],
18 "flags": [],
19 "order": 3,
20 "mode": 0,
21 "inputs": [
22 {
23 "name": "image",
24 "type": "IMAGE",
25 "link": 23
26 },
27 {
28 "name": "mask",
29 "type": "MASK",
30 "link": 21
31 }
32 ],
33 "outputs": [
34 {
35 "name": "IMAGE",
36 "type": "IMAGE",
37 "links": [
38 4
39 ]
40 }
41 ],
42 "properties": {
43 "Node name for S&R": "BriaGenFill"
44 },
45 "widgets_values": [
46 "The girl is holding a cup of beverage, which is a glass of lime juice.",
47 "",
48 true,
49 1745816485,
50 "randomize",
51 "false"
52 ],
53 "color": "#432",
54 "bgcolor": "#653"
55 },
56 {
57 "id": 2,
58 "type": "LoadImage",
59 "pos": [
60 -2900,
61 4860
62 ],
63 "size": [
64 360,
65 470
66 ],
67 "flags": [],
68 "order": 0,
69 "mode": 0,
70 "inputs": [],
71 "outputs": [
72 {
73 "name": "IMAGE",
74 "type": "IMAGE",
75 "links": [
76 5,
77 23,
78 24
79 ]
80 },
81 {
82 "name": "MASK",
83 "type": "MASK",
84 "links": []
85 }
86 ],
87 "properties": {
88 "Node name for S&R": "LoadImage",
89 "image": "clipspace-painted-masked-1787233871783.png [input]"
90 },
91 "widgets_values": [
92 "retro_girl_cinnamon_bun.png",
93 "image"
94 ]
95 },
96 {
97 "id": 3,
98 "type": "Painter",
99 "pos": [
100 -2500,
101 4860
102 ],
103 "size": [
104 400,
105 750
106 ],
107 "flags": [],
108 "order": 2,
109 "mode": 0,
110 "inputs": [
111 {
112 "name": "image",
113 "shape": 7,
114 "type": "IMAGE",
115 "link": 24
116 }
117 ],
118 "outputs": [
119 {
120 "name": "IMAGE",
121 "type": "IMAGE",
122 "links": []
123 },
124 {
125 "name": "MASK",
126 "type": "MASK",
127 "links": [
128 21
129 ]
130 }
131 ],
132 "properties": {
133 "Node name for S&R": "Painter",
134 "painterTool": "brush",
135 "painterBrushSize": 110,
136 "painterBrushColor": "#000000",
137 "painterBrushOpacity": 1,
138 "painterBrushHardness": 1
139 },
140 "widgets_values": [
141 "painter-3-1787234799226.png [input]",
142 1024,
143 1024,
144 "#000000"
145 ]
146 },
147 {
148 "id": 4,
149 "type": "SaveImageAdvanced",
150 "pos": [
151 -1610,
152 4860
153 ],
154 "size": [
155 550,
156 145.90625
157 ],
158 "flags": [],
159 "order": 4,
160 "mode": 0,
161 "inputs": [
162 {
163 "name": "images",
164 "type": "IMAGE",
165 "link": 4
166 }
167 ],
168 "outputs": [
169 {
170 "name": "images",
171 "type": "IMAGE",
172 "links": [
173 6
174 ]
175 }
176 ],
177 "properties": [],
178 "widgets_values": [
179 "Bria_GenFill",
180 "png",
181 "8-bit",
182 "sRGB"
183 ]
184 },
185 {
186 "id": 5,
187 "type": "ImageCompare",
188 "pos": [
189 -1020,
190 4860
191 ],
192 "size": [
193 400,
194 350
195 ],
196 "flags": [],
197 "order": 5,
198 "mode": 0,
199 "inputs": [
200 {
201 "name": "image_a",
202 "shape": 7,
203 "type": "IMAGE",
204 "link": 5
205 },
206 {
207 "name": "image_b",
208 "shape": 7,
209 "type": "IMAGE",
210 "link": 6
211 }
212 ],
213 "outputs": [],
214 "properties": {
215 "Node name for S&R": "ImageCompare"
216 },
217 "widgets_values": []
218 },
219 {
220 "id": 13,
221 "type": "MarkdownNote",
222 "pos": [
223 -3380,
224 4860
225 ],
226 "size": [
227 440,
228 690
229 ],
230 "flags": [],
231 "order": 1,
232 "mode": 0,
233 "inputs": [],
234 "outputs": [],
235 "title": "Note: Bria GenFill",
236 "properties": [],
237 "widgets_values": [
238 "# Bria GenFill Template\n\nUse this template to **regenerate a specific region of an image** with Bria's Generative Fill API. The masked area is fully regenerated from your prompt; everything outside the mask stays pixel-perfect unchanged.\n\n## Input Assets\n\n- [retro_girl_cinnamon_bun.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/retro_girl_cinnamon_bun.png)\n\n## How to use\n\n1. **Load an image**: Upload your image in `LoadImage`. The Painter canvas and compare view auto-update.\n2. **Paint a mask**: Use the `Painter` node to brush over the region you want to regenerate. Blob-shaped, brush-drawn masks work best. Tip: paint slightly beyond the object's edge (hair, glass, fabric, contact points) so the model has room to blend.\n3. **Write the prompt**: In `BriaGenFill`, describe what should be generated *inside the masked area*, as if art-directing a cropped micro-scene: name the object, its material and size, how it interacts with the surface, and ask for a contact shadow. Around 90-110 words works best. Keep `refine_prompt` enabled.\n4. **Optional**: `negative_prompt` to avoid unwanted details. Use a fixed `seed` to iterate on the mask or wording, then randomize once the result looks right.\n5. **Compare and save**: `ImageCompare` shows before/after, `SaveImageAdvanced` exports the result.\n\n## Notes\n\n- Masks trigger **generative replacement**, not pixel retouching: the masked area is \"regenerate this region\", not \"touch up this region\".\n- The `Painter` node is only available under **Nodes 2.0**. The canvas auto-updates when you upload a new image. If you only see \"Painter: Node 2.0 only\": enable Nodes 2.0 via **Menu -> Nodes2.0**, or remove the Painter node and use the [Mask Editor](https://docs.comfy.org/interface/maskeditor) to create the mask."
239 ],
240 "color": "#222",
241 "bgcolor": "#000"
242 }
243 ],
244 "links": [
245 [
246 4,
247 1,
248 0,
249 4,
250 0,
251 "IMAGE"
252 ],
253 [
254 5,
255 2,
256 0,
257 5,
258 0,
259 "IMAGE"
260 ],
261 [
262 6,
263 4,
264 0,
265 5,
266 1,
267 "IMAGE"
268 ],
269 [
270 21,
271 3,
272 1,
273 1,
274 1,
275 "MASK"
276 ],
277 [
278 23,
279 2,
280 0,
281 1,
282 0,
283 "IMAGE"
284 ],
285 [
286 24,
287 2,
288 0,
289 3,
290 0,
291 "IMAGE"
292 ]
293 ],
294 "groups": [],
295 "config": [],
296 "extra": {
297 "ds": {
298 "scale": 0.42470937079664656,
299 "offset": [
300 4070.628281640673,
301 -4352.9194436876605
302 ]
303 },
304 "frontendVersion": "1.48.7",
305 "VHS_latentpreview": false,
306 "VHS_latentpreviewrate": 0,
307 "VHS_MetadataImage": true,
308 "VHS_KeepIntermediate": true
309 },
310 "version": 0.4
311}