ComfyPilotComfyPilot
工作流 / 视频工具 / 视频编辑: Beeble SwitchX
视频编辑: Beeble SwitchX

视频编辑: Beeble SwitchX

Video Edit: Beeble SwitchX

上传一个来源视频和一张参考图,然后提供一个描述所需环境和光照的提示词。生成一个编辑后的视频,其中遮罩区域遵循您的提示词和参考图,而未遮罩区域保留原始像素和运动,同时生成一个用于合成的透明度遮罩。

视频工具 10 个节点 2 个输入 54 次使用 ComfyUI ≥ 0.23.0 ComfyUI 9 KB

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

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

节点构成

SaveVideo × 2
LoadImage × 1
MarkdownNote × 1
BeebleSwitchXVideoEdit × 1
LoadVideo × 1
GetVideoComponents × 1
Video Slice × 1
GetImageSize × 1
PreviewAny × 1

官方标注的模型

SwitchX

工作流 JSON

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

1{
2 "id": "26d0d199-1925-4395-ac1f-57e3cbc6bcd4",
3 "revision": 0,
4 "last_node_id": 37,
5 "last_link_id": 52,
6 "nodes": [
7 {
8 "id": 17,
9 "type": "LoadImage",
10 "pos": [
11 -40,
12 1800
13 ],
14 "size": [
15 370,
16 430
17 ],
18 "flags": [],
19 "order": 0,
20 "mode": 0,
21 "inputs": [],
22 "outputs": [
23 {
24 "name": "IMAGE",
25 "type": "IMAGE",
26 "links": [
27 25
28 ]
29 },
30 {
31 "name": "MASK",
32 "type": "MASK",
33 "links": null
34 }
35 ],
36 "title": "Load Image (Optional)",
37 "properties": {
38 "Node name for S&R": "LoadImage"
39 },
40 "widgets_values": [
41 "blue_poppies_field.png",
42 "image"
43 ]
44 },
45 {
46 "id": 19,
47 "type": "MarkdownNote",
48 "pos": [
49 -750,
50 1250
51 ],
52 "size": [
53 550,
54 1070
55 ],
56 "flags": [],
57 "order": 1,
58 "mode": 0,
59 "inputs": [],
60 "outputs": [],
61 "title": "Beeble SwitchX Image Edit",
62 "properties": [],
63 "widgets_values": [
64 "## Beeble SwitchX — Image Edit\n\n**Switch anything, keep what matters.** Masked regions follow your prompt and reference; unmasked regions keep the source pixels and are relit to match.\n\n---\n\n### What this graph does\n\n1. **Source image** — the still SwitchX edits.\n2. **Reference image** (optional) — visual blueprint for background, lighting, mood, and costumes. Masked areas are filled from it; the subject adopts its look without replacing unmasked pixels.\n3. **Beeble API** — uploads both, runs SwitchX, then downloads the **render** and the **alpha matte** Beeble used.\n4. **Outputs you get:** the composited result, a before/after compare, and (via alpha) a transparent cutout PNG.\n\nAt least one of **prompt** or **reference_image** is required.\n\n---\n\n### Alpha modes\n\n| Comfy | Beeble | Best for |\n|-------|--------|----------|\n| **auto** | Auto | Background swap, relighting, virtual production |\n| **select** | Select | Targeted edits (outfit, inpainting); connect your mask |\n| **fill** | Fill | Full-frame relight/restyle; no separate alpha output |\n| **custom** | Upload | Custom matte from Nuke, After Effects, etc. |\n\n---\n\n### Prompting \n\nBe specific — environment, lighting, mood:\n\n*\"A dramatic cliff in Ireland, soft overcast lighting, highly detailed props.\"*\n\nAvoid vague prompts (e.g. *\"Take me to heaven\"*).\n\n**Reference image:** does not need to match the source perfectly; SwitchX keeps your real pixels outside the mask and only pulls style/lighting from the reference.\n\nVideo: use **Beeble SwitchX Video Edit** (max 240 frames)."
65 ],
66 "color": "#222",
67 "bgcolor": "#000"
68 },
69 {
70 "id": 20,
71 "type": "BeebleSwitchXVideoEdit",
72 "pos": [
73 930,
74 1250
75 ],
76 "size": [
77 400,
78 329.3125
79 ],
80 "flags": [],
81 "order": 4,
82 "mode": 0,
83 "inputs": [
84 {
85 "name": "video",
86 "type": "VIDEO",
87 "link": 38
88 },
89 {
90 "name": "reference_image",
91 "shape": 7,
92 "type": "IMAGE",
93 "link": 25
94 }
95 ],
96 "outputs": [
97 {
98 "name": "video",
99 "type": "VIDEO",
100 "links": [
101 29
102 ]
103 },
104 {
105 "name": "alpha",
106 "type": "VIDEO",
107 "links": [
108 30
109 ]
110 }
111 ],
112 "properties": {
113 "Node name for S&R": "BeebleSwitchXVideoEdit"
114 },
115 "widgets_values": [
116 "The character stands in the wilderness and looks back towards the camera.",
117 "auto",
118 "720p",
119 379113823,
120 "randomize"
121 ],
122 "color": "#432",
123 "bgcolor": "#653"
124 },
125 {
126 "id": 21,
127 "type": "LoadVideo",
128 "pos": [
129 -40,
130 1250
131 ],
132 "size": [
133 370,
134 496
135 ],
136 "flags": [],
137 "order": 2,
138 "mode": 0,
139 "inputs": [],
140 "outputs": [
141 {
142 "name": "VIDEO",
143 "type": "VIDEO",
144 "links": [
145 37
146 ]
147 }
148 ],
149 "properties": {
150 "Node name for S&R": "LoadVideo"
151 },
152 "widgets_values": [
153 "woman_in_wheat_field.mp4",
154 "image"
155 ]
156 },
157 {
158 "id": 22,
159 "type": "SaveVideo",
160 "pos": [
161 1380,
162 1250
163 ],
164 "size": [
165 450,
166 470
167 ],
168 "flags": [],
169 "order": 6,
170 "mode": 0,
171 "inputs": [
172 {
173 "name": "video",
174 "type": "VIDEO",
175 "link": 29
176 }
177 ],
178 "outputs": [],
179 "properties": [],
180 "widgets_values": [
181 "video/Beeble_switchX_video",
182 "auto",
183 "auto"
184 ]
185 },
186 {
187 "id": 24,
188 "type": "SaveVideo",
189 "pos": [
190 1910,
191 1250
192 ],
193 "size": [
194 450,
195 470
196 ],
197 "flags": [],
198 "order": 7,
199 "mode": 0,
200 "inputs": [
201 {
202 "name": "video",
203 "type": "VIDEO",
204 "link": 30
205 }
206 ],
207 "outputs": [],
208 "title": "Save Video (Alpha)",
209 "properties": [],
210 "widgets_values": [
211 "video/Beeble_switchX_alpha",
212 "auto",
213 "auto"
214 ]
215 },
216 {
217 "id": 25,
218 "type": "GetVideoComponents",
219 "pos": [
220 530,
221 1560
222 ],
223 "size": [
224 225,
225 8
226 ],
227 "flags": {
228 "collapsed": true
229 },
230 "order": 5,
231 "mode": 0,
232 "inputs": [
233 {
234 "name": "video",
235 "type": "VIDEO",
236 "link": 39
237 }
238 ],
239 "outputs": [
240 {
241 "name": "images",
242 "type": "IMAGE",
243 "links": [
244 40
245 ]
246 },
247 {
248 "name": "audio",
249 "type": "AUDIO",
250 "links": null
251 },
252 {
253 "name": "fps",
254 "type": "FLOAT",
255 "links": null
256 }
257 ],
258 "properties": {
259 "Node name for S&R": "GetVideoComponents"
260 },
261 "widgets_values": []
262 },
263 {
264 "id": 29,
265 "type": "Video Slice",
266 "pos": [
267 520,
268 1250
269 ],
270 "size": [
271 270,
272 170
273 ],
274 "flags": [],
275 "order": 3,
276 "mode": 0,
277 "inputs": [
278 {
279 "name": "video",
280 "type": "VIDEO",
281 "link": 37
282 }
283 ],
284 "outputs": [
285 {
286 "name": "VIDEO",
287 "type": "VIDEO",
288 "links": [
289 38,
290 39
291 ]
292 }
293 ],
294 "properties": {
295 "Node name for S&R": "Video Slice"
296 },
297 "widgets_values": [
298 0,
299 5,
300 false
301 ]
302 },
303 {
304 "id": 30,
305 "type": "GetImageSize",
306 "pos": [
307 530,
308 1700
309 ],
310 "size": [
311 225,
312 8
313 ],
314 "flags": {
315 "collapsed": true
316 },
317 "order": 8,
318 "mode": 0,
319 "inputs": [
320 {
321 "name": "image",
322 "type": "IMAGE",
323 "link": 40
324 }
325 ],
326 "outputs": [
327 {
328 "name": "width",
329 "type": "INT",
330 "links": null
331 },
332 {
333 "name": "height",
334 "type": "INT",
335 "links": null
336 },
337 {
338 "name": "batch_size",
339 "type": "INT",
340 "links": [
341 41
342 ]
343 }
344 ],
345 "properties": {
346 "Node name for S&R": "GetImageSize"
347 },
348 "widgets_values": []
349 },
350 {
351 "id": 31,
352 "type": "PreviewAny",
353 "pos": [
354 520,
355 1790
356 ],
357 "size": [
358 260,
359 220
360 ],
361 "flags": [],
362 "order": 9,
363 "mode": 0,
364 "inputs": [
365 {
366 "name": "source",
367 "type": "*",
368 "link": 41
369 }
370 ],
371 "outputs": [
372 {
373 "name": "STRING",
374 "type": "STRING",
375 "links": null
376 }
377 ],
378 "properties": {
379 "Node name for S&R": "PreviewAny"
380 },
381 "widgets_values": [
382 null,
383 null,
384 null
385 ]
386 }
387 ],
388 "links": [
389 [
390 25,
391 17,
392 0,
393 20,
394 1,
395 "IMAGE"
396 ],
397 [
398 29,
399 20,
400 0,
401 22,
402 0,
403 "VIDEO"
404 ],
405 [
406 30,
407 20,
408 1,
409 24,
410 0,
411 "VIDEO"
412 ],
413 [
414 37,
415 21,
416 0,
417 29,
418 0,
419 "VIDEO"
420 ],
421 [
422 38,
423 29,
424 0,
425 20,
426 0,
427 "VIDEO"
428 ],
429 [
430 39,
431 29,
432 0,
433 25,
434 0,
435 "VIDEO"
436 ],
437 [
438 40,
439 25,
440 0,
441 30,
442 0,
443 "IMAGE"
444 ],
445 [
446 41,
447 30,
448 2,
449 31,
450 0,
451 "INT"
452 ]
453 ],
454 "groups": [
455 {
456 "id": 1,
457 "title": "Get frame counts (need < 240)",
458 "bounding": [
459 470,
460 1470,
461 380,
462 560
463 ],
464 "color": "#3f789e",
465 "flags": []
466 }
467 ],
468 "config": [],
469 "extra": {
470 "ds": {
471 "scale": 0.5720545434645345,
472 "offset": [
473 627.2685059772914,
474 -918.7800326921753
475 ]
476 },
477 "frontendVersion": "1.44.19"
478 },
479 "version": 0.4
480}