ComfyPilotComfyPilot
工作流 / 图像工具 / 物体移除: Bria Eraser
物体移除: Bria Eraser

物体移除: Bria Eraser

Object Removal: Bria Eraser

使用Bria的橡皮擦移除图像中不需要的对象或区域,它会用周围上下文填充遮罩区域,同时保持图像的其余部分像素级完美。上传1张图像,用画笔遮罩涂抹目标对象,即可获得1张清理后的输出以及前后对比。非常适合清理照片炸弹、移除水印或文字,以及整理产品或房地产照片。

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

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

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

节点构成

LoadImage × 1
Painter × 1
SaveImageAdvanced × 1
ImageCompare × 1
MarkdownNote × 1
BriaEraser × 1

官方标注的模型

BRIA

工作流 JSON

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

1{
2 "id": "fb5b92b3-fd02-4753-8d96-4f8848898ee8",
3 "revision": 0,
4 "last_node_id": 15,
5 "last_link_id": 29,
6 "nodes": [
7 {
8 "id": 2,
9 "type": "LoadImage",
10 "pos": [
11 -2900,
12 4860
13 ],
14 "size": [
15 360,
16 470
17 ],
18 "flags": [],
19 "order": 0,
20 "mode": 0,
21 "inputs": [],
22 "outputs": [
23 {
24 "name": "IMAGE",
25 "type": "IMAGE",
26 "links": [
27 5,
28 24,
29 26
30 ]
31 },
32 {
33 "name": "MASK",
34 "type": "MASK",
35 "links": []
36 }
37 ],
38 "properties": {
39 "Node name for S&R": "LoadImage",
40 "image": "clipspace-painted-masked-1787233871783.png [input]"
41 },
42 "widgets_values": [
43 "vintage_girl_yellow_apple.png",
44 "image"
45 ]
46 },
47 {
48 "id": 3,
49 "type": "Painter",
50 "pos": [
51 -2492,
52 4860
53 ],
54 "size": [
55 400,
56 750
57 ],
58 "flags": [],
59 "order": 2,
60 "mode": 0,
61 "inputs": [
62 {
63 "name": "image",
64 "shape": 7,
65 "type": "IMAGE",
66 "link": 24
67 }
68 ],
69 "outputs": [
70 {
71 "name": "IMAGE",
72 "type": "IMAGE",
73 "links": []
74 },
75 {
76 "name": "MASK",
77 "type": "MASK",
78 "links": [
79 27
80 ]
81 }
82 ],
83 "properties": {
84 "Node name for S&R": "Painter",
85 "painterTool": "brush",
86 "painterBrushSize": 110,
87 "painterBrushColor": "#000000",
88 "painterBrushOpacity": 1,
89 "painterBrushHardness": 1
90 },
91 "widgets_values": [
92 "painter-3-1787235837607.png [input]",
93 1024,
94 1024,
95 "#000000"
96 ]
97 },
98 {
99 "id": 4,
100 "type": "SaveImageAdvanced",
101 "pos": [
102 -1730,
103 4860
104 ],
105 "size": [
106 550,
107 377.875
108 ],
109 "flags": [],
110 "order": 4,
111 "mode": 0,
112 "inputs": [
113 {
114 "name": "images",
115 "type": "IMAGE",
116 "link": 29
117 }
118 ],
119 "outputs": [
120 {
121 "name": "images",
122 "type": "IMAGE",
123 "links": [
124 6
125 ]
126 }
127 ],
128 "properties": [],
129 "widgets_values": [
130 "Bria_Eraser",
131 "png",
132 "8-bit",
133 "sRGB"
134 ]
135 },
136 {
137 "id": 5,
138 "type": "ImageCompare",
139 "pos": [
140 -1128,
141 4860
142 ],
143 "size": [
144 400,
145 350
146 ],
147 "flags": [],
148 "order": 5,
149 "mode": 0,
150 "inputs": [
151 {
152 "name": "image_a",
153 "shape": 7,
154 "type": "IMAGE",
155 "link": 5
156 },
157 {
158 "name": "image_b",
159 "shape": 7,
160 "type": "IMAGE",
161 "link": 6
162 }
163 ],
164 "outputs": [],
165 "properties": {
166 "Node name for S&R": "ImageCompare"
167 },
168 "widgets_values": []
169 },
170 {
171 "id": 13,
172 "type": "MarkdownNote",
173 "pos": [
174 -3380,
175 4860
176 ],
177 "size": [
178 440,
179 690
180 ],
181 "flags": [],
182 "order": 1,
183 "mode": 0,
184 "inputs": [],
185 "outputs": [],
186 "title": "Note: Bria Eraser",
187 "properties": [],
188 "widgets_values": [
189 "# Bria Eraser Template\n\nUse this template to **remove a specific object or region from an image** with Bria's Eraser API. The masked area is erased and filled with surrounding context; everything outside the mask stays pixel-perfect unchanged.\n\n## Input Assets\n\n- [vintage_girl_yellow_apple.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/vintage_girl_yellow_apple.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 object or region you want to remove. Tip: paint slightly beyond the object's edge (hair, glass, fabric, contact points) so the model has room to blend cleanly.\n3. **Run `BriaEraser`**: No prompt needed. The node erases the masked area and inpaints the background. Enter your `api_key` if it is not already set.\n4. **Compare and save**: `ImageCompare` shows before/after, `SaveImageAdvanced` exports the result.\n\n## Notes\n\n- The masked area is **fully regenerated from its surroundings**: Eraser erases the object and inpaints the region with the surrounding background, so the result blends seamlessly. Keep the mask slightly larger than the object's edge for clean blending.\n- The mask is **binary**: white (255) marks the region to erase, black (0) everywhere else, and it must match the image's aspect ratio.\n- For more precise results, use an automatic segmentation mask (SAM-style) if available: the API's `mask_type` distinguishes `manual` (brush-drawn) from `automatic` (algorithm-generated) masks.\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."
190 ],
191 "color": "#222",
192 "bgcolor": "#000"
193 },
194 {
195 "id": 15,
196 "type": "BriaEraser",
197 "pos": [
198 -2040,
199 4860
200 ],
201 "size": [
202 270,
203 197.921875
204 ],
205 "flags": [],
206 "order": 3,
207 "mode": 0,
208 "inputs": [
209 {
210 "name": "image",
211 "type": "IMAGE",
212 "link": 26
213 },
214 {
215 "name": "mask",
216 "type": "MASK",
217 "link": 27
218 }
219 ],
220 "outputs": [
221 {
222 "name": "IMAGE",
223 "type": "IMAGE",
224 "links": [
225 29
226 ]
227 }
228 ],
229 "properties": {
230 "Node name for S&R": "BriaEraser"
231 },
232 "widgets_values": [
233 "manual",
234 "false"
235 ],
236 "color": "#432",
237 "bgcolor": "#653"
238 }
239 ],
240 "links": [
241 [
242 5,
243 2,
244 0,
245 5,
246 0,
247 "IMAGE"
248 ],
249 [
250 6,
251 4,
252 0,
253 5,
254 1,
255 "IMAGE"
256 ],
257 [
258 24,
259 2,
260 0,
261 3,
262 0,
263 "IMAGE"
264 ],
265 [
266 26,
267 2,
268 0,
269 15,
270 0,
271 "IMAGE"
272 ],
273 [
274 27,
275 3,
276 1,
277 15,
278 1,
279 "MASK"
280 ],
281 [
282 29,
283 15,
284 0,
285 4,
286 0,
287 "IMAGE"
288 ]
289 ],
290 "groups": [],
291 "config": [],
292 "extra": {
293 "ds": {
294 "scale": 0.6447181148595378,
295 "offset": [
296 4009.9670539443127,
297 -4410.370290183048
298 ]
299 },
300 "frontendVersion": "1.48.7",
301 "VHS_latentpreview": false,
302 "VHS_latentpreviewrate": 0,
303 "VHS_MetadataImage": true,
304 "VHS_KeepIntermediate": true
305 },
306 "version": 0.4
307}