工作流 /
图像工具 /
物体移除: Flux

物体移除: Flux
Object Removal: Flux
上传图片并在要移除的对象上绘制遮罩。该工作流会擦除遮罩区域并重建背景。
图像工具
5 个节点 1 个输入 36 次使用 ComfyUI ≥ 0.23.0 ComfyUI 5 KB
节点构成
SaveImage
× 1
ImageCompare
× 1
MarkdownNote
× 1
FluxEraseNode
× 1
LoadImage
× 1
官方标注的模型
FLUX
工作流 JSON
和上面「下载工作流 JSON」是同一份文件。
1{
2 "id": "437d157e-2504-4275-81c7-df5594af9af0",
3 "revision": 0,
4 "last_node_id": 11,
5 "last_link_id": 20,
6 "nodes": [
7 {
8 "id": 3,
9 "type": "SaveImage",
10 "pos": [
11 480,
12 -60
13 ],
14 "size": [
15 400,
16 500
17 ],
18 "flags": [],
19 "order": 3,
20 "mode": 0,
21 "inputs": [
22 {
23 "name": "images",
24 "type": "IMAGE",
25 "link": 16
26 }
27 ],
28 "outputs": [],
29 "properties": [],
30 "widgets_values": [
31 "Flux_erase_image"
32 ]
33 },
34 {
35 "id": 4,
36 "type": "ImageCompare",
37 "pos": [
38 940,
39 -50
40 ],
41 "size": [
42 440,
43 480
44 ],
45 "flags": [],
46 "order": 4,
47 "mode": 0,
48 "inputs": [
49 {
50 "name": "image_a",
51 "shape": 7,
52 "type": "IMAGE",
53 "link": 20
54 },
55 {
56 "name": "image_b",
57 "shape": 7,
58 "type": "IMAGE",
59 "link": 17
60 }
61 ],
62 "outputs": [],
63 "properties": {
64 "Node name for S&R": "ImageCompare"
65 },
66 "widgets_values": []
67 },
68 {
69 "id": 7,
70 "type": "MarkdownNote",
71 "pos": [
72 -1070,
73 -120
74 ],
75 "size": [
76 600,
77 960
78 ],
79 "flags": [],
80 "order": 0,
81 "mode": 0,
82 "inputs": [],
83 "outputs": [],
84 "title": "Note: Flux Erase Image",
85 "properties": [],
86 "widgets_values": [
87 "## FLUX Erase Image (BFL API)\n\nRemoves whatever you mask and reconstructs the background behind it. No prompt is required — only an image and a binary mask.\n\n---\n\n### Quick start in this graph\n\n1. **Load Image** — Click the widget, upload your photo (min **256×256**). The same node outputs **IMAGE** and **MASK**.\n2. **Paint the mask** — On **Load Image**, open the mask editor (right‑click the node → [mask editor](https://docs.comfy.org/interface/maskeditor)). Paint over everything you want removed (people, text, cables, logos, shadows you want gone).\n - Alternative: use a separate black/white mask via **Load Image (as Mask)**, then wire that into **Flux Erase Image**.\n - Convention matches the API: **white = erase**, **black = keep**. Mask is auto-resized to match the image.\n3. **Flux Erase Image** — `dilate_pixels` (default **10**, range **0–25**) expands the mask slightly so edges, hair, and soft boundaries are fully covered. Increase to **15–20** for fuzzy edges; lower if you are erasing near important detail.\n4. **Queue Prompt** \n5. **Save Image** \n---\n\n### Mask tips\n\n- Cover the **whole** object plus any shadow/reflection you want removed; a tight mask often leaves a halo — raise `dilate_pixels`.\n- Best quality is near **~1 MP** and aspect ratios between **1:2** and **2:1** (per BFL guidance); very unusual sizes may look worse.\n"
88 ],
89 "color": "#222",
90 "bgcolor": "#000"
91 },
92 {
93 "id": 8,
94 "type": "FluxEraseNode",
95 "pos": [
96 150,
97 -60
98 ],
99 "size": [
100 270,
101 192
102 ],
103 "flags": [],
104 "order": 2,
105 "mode": 0,
106 "inputs": [
107 {
108 "name": "image",
109 "type": "IMAGE",
110 "link": 18
111 },
112 {
113 "name": "mask",
114 "type": "MASK",
115 "link": 19
116 }
117 ],
118 "outputs": [
119 {
120 "name": "IMAGE",
121 "type": "IMAGE",
122 "links": [
123 16,
124 17
125 ]
126 }
127 ],
128 "properties": {
129 "Node name for S&R": "FluxEraseNode"
130 },
131 "widgets_values": [
132 10
133 ],
134 "color": "#432",
135 "bgcolor": "#653"
136 },
137 {
138 "id": 10,
139 "type": "LoadImage",
140 "pos": [
141 -310,
142 -60
143 ],
144 "size": [
145 320,
146 490
147 ],
148 "flags": [],
149 "order": 1,
150 "mode": 0,
151 "inputs": [],
152 "outputs": [
153 {
154 "name": "IMAGE",
155 "type": "IMAGE",
156 "links": [
157 18,
158 20
159 ]
160 },
161 {
162 "name": "MASK",
163 "type": "MASK",
164 "links": [
165 19
166 ]
167 }
168 ],
169 "properties": {
170 "Node name for S&R": "LoadImage",
171 "image": "6391e828dbba3d840e66cce1031cb5c6aa4012153668b64d2a7a18296b2c6799.png [input]"
172 },
173 "widgets_values": [
174 "city_street_young_man.png",
175 "image"
176 ]
177 }
178 ],
179 "links": [
180 [
181 16,
182 8,
183 0,
184 3,
185 0,
186 "IMAGE"
187 ],
188 [
189 17,
190 8,
191 0,
192 4,
193 1,
194 "IMAGE"
195 ],
196 [
197 18,
198 10,
199 0,
200 8,
201 0,
202 "IMAGE"
203 ],
204 [
205 19,
206 10,
207 1,
208 8,
209 1,
210 "MASK"
211 ],
212 [
213 20,
214 10,
215 0,
216 4,
217 0,
218 "IMAGE"
219 ]
220 ],
221 "groups": [
222 {
223 "id": 1,
224 "title": "Right-Click menu → Open in Mask Editor → Draw Mask",
225 "bounding": [
226 -420,
227 -140,
228 530,
229 590
230 ],
231 "color": "#3f789e",
232 "flags": []
233 }
234 ],
235 "config": [],
236 "extra": {
237 "ds": {
238 "scale": 0.46382567503535904,
239 "offset": [
240 1792.108198877168,
241 1097.545324408336
242 ]
243 },
244 "frontendVersion": "1.45.14",
245 "VHS_latentpreview": false,
246 "VHS_latentpreviewrate": 0,
247 "VHS_MetadataImage": true,
248 "VHS_KeepIntermediate": true
249 },
250 "version": 0.4
251}