ComfyPilotComfyPilot
工作流 / 视频工具 / 视频编辑: Crossfade Merge
视频编辑: Crossfade Merge

视频编辑: Crossfade Merge

Video Edit: Crossfade Merge

使用交叉淡入淡出效果平滑融合两个视频序列。输入两个图像序列并定义过渡长度和混合模式。输出一个合并后的单一视频序列。

视频工具 6 个节点 2 个输入 6 次使用 ComfyUI ≥ 0.0.1 PurzBeats 11 KB

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

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

节点构成

VHS_LoadVideo × 2
FL_VideoCrossfade × 1
VHS_VideoInfo × 1
VHS_VideoCombine × 1
MarkdownNote × 1

官方标注的模型

None

工作流 JSON

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

1{
2 "id": "5259dad1-0c38-4c86-a90f-93a15848ee70",
3 "revision": 0,
4 "last_node_id": 11,
5 "last_link_id": 27,
6 "nodes": [
7 {
8 "id": 2,
9 "type": "FL_VideoCrossfade",
10 "pos": [
11 -1000.0000227095109,
12 5040.000105797924
13 ],
14 "size": [
15 284.328125,
16 226.4375
17 ],
18 "flags": [],
19 "order": 4,
20 "mode": 0,
21 "inputs": [
22 {
23 "name": "images_a",
24 "type": "IMAGE",
25 "link": 23
26 },
27 {
28 "name": "images_b",
29 "type": "IMAGE",
30 "link": 25
31 },
32 {
33 "name": "target_width",
34 "type": "INT",
35 "widget": {
36 "name": "target_width"
37 },
38 "link": 4
39 },
40 {
41 "name": "target_height",
42 "type": "INT",
43 "widget": {
44 "name": "target_height"
45 },
46 "link": 27
47 }
48 ],
49 "outputs": [
50 {
51 "name": "IMAGE",
52 "type": "IMAGE",
53 "links": [
54 6
55 ]
56 }
57 ],
58 "properties": {
59 "Node name for S&R": "FL_VideoCrossfade"
60 },
61 "widgets_values": [
62 72,
63 "normal",
64 512,
65 512
66 ],
67 "color": "#16727c",
68 "bgcolor": "#4F0074"
69 },
70 {
71 "id": 3,
72 "type": "VHS_LoadVideo",
73 "pos": [
74 -1859.8912431582926,
75 5043.677683616478
76 ],
77 "size": [
78 260.390625,
79 835.09375
80 ],
81 "flags": [],
82 "order": 0,
83 "mode": 0,
84 "inputs": [
85 {
86 "name": "meta_batch",
87 "shape": 7,
88 "type": "VHS_BatchManager",
89 "link": null
90 },
91 {
92 "name": "vae",
93 "shape": 7,
94 "type": "VAE",
95 "link": null
96 }
97 ],
98 "outputs": [
99 {
100 "name": "IMAGE",
101 "type": "IMAGE",
102 "links": [
103 23
104 ]
105 },
106 {
107 "name": "frame_count",
108 "type": "INT",
109 "links": null
110 },
111 {
112 "name": "audio",
113 "type": "AUDIO",
114 "links": null
115 },
116 {
117 "name": "video_info",
118 "type": "VHS_VIDEOINFO",
119 "links": [
120 3
121 ]
122 }
123 ],
124 "properties": {
125 "Node name for S&R": "VHS_LoadVideo"
126 },
127 "widgets_values": {
128 "video": "crossfade_clip_1.mp4",
129 "force_rate": 0,
130 "custom_width": 0,
131 "custom_height": 0,
132 "frame_load_cap": 0,
133 "skip_first_frames": 0,
134 "select_every_nth": 1,
135 "format": "AnimateDiff",
136 "videopreview": {
137 "hidden": false,
138 "paused": false,
139 "params": {
140 "filename": "crossfade_clip_1.mp4",
141 "type": "input",
142 "format": "video/mp4",
143 "force_rate": 0,
144 "custom_width": 0,
145 "custom_height": 0,
146 "frame_load_cap": 0,
147 "skip_first_frames": 0,
148 "select_every_nth": 1
149 }
150 }
151 }
152 },
153 {
154 "id": 4,
155 "type": "VHS_LoadVideo",
156 "pos": [
157 -1570.0001813841063,
158 5040.000105797924
159 ],
160 "size": [
161 260.390625,
162 835.09375
163 ],
164 "flags": [],
165 "order": 1,
166 "mode": 0,
167 "inputs": [
168 {
169 "name": "meta_batch",
170 "shape": 7,
171 "type": "VHS_BatchManager",
172 "link": null
173 },
174 {
175 "name": "vae",
176 "shape": 7,
177 "type": "VAE",
178 "link": null
179 }
180 ],
181 "outputs": [
182 {
183 "name": "IMAGE",
184 "type": "IMAGE",
185 "links": [
186 25
187 ]
188 },
189 {
190 "name": "frame_count",
191 "type": "INT",
192 "links": null
193 },
194 {
195 "name": "audio",
196 "type": "AUDIO",
197 "links": null
198 },
199 {
200 "name": "video_info",
201 "type": "VHS_VIDEOINFO",
202 "links": null
203 }
204 ],
205 "properties": {
206 "Node name for S&R": "VHS_LoadVideo"
207 },
208 "widgets_values": {
209 "video": "crossfade_clip_2.mp4",
210 "force_rate": 0,
211 "custom_width": 0,
212 "custom_height": 0,
213 "frame_load_cap": 0,
214 "skip_first_frames": 0,
215 "select_every_nth": 1,
216 "format": "AnimateDiff",
217 "videopreview": {
218 "hidden": false,
219 "paused": false,
220 "params": {
221 "filename": "crossfade_clip_2.mp4",
222 "type": "input",
223 "format": "video/mp4",
224 "force_rate": 0,
225 "custom_width": 0,
226 "custom_height": 0,
227 "frame_load_cap": 0,
228 "skip_first_frames": 0,
229 "select_every_nth": 1
230 }
231 }
232 }
233 },
234 {
235 "id": 5,
236 "type": "VHS_VideoInfo",
237 "pos": [
238 -1280.0000203571103,
239 5040.000105797924
240 ],
241 "size": [
242 243.890625,
243 287.78125
244 ],
245 "flags": [],
246 "order": 3,
247 "mode": 0,
248 "inputs": [
249 {
250 "name": "video_info",
251 "type": "VHS_VIDEOINFO",
252 "link": 3
253 }
254 ],
255 "outputs": [
256 {
257 "name": "source_fps🟨",
258 "type": "FLOAT",
259 "links": [
260 7
261 ]
262 },
263 {
264 "name": "source_frame_count🟨",
265 "type": "INT",
266 "links": null
267 },
268 {
269 "name": "source_duration🟨",
270 "type": "FLOAT",
271 "links": null
272 },
273 {
274 "name": "source_width🟨",
275 "type": "INT",
276 "links": [
277 4
278 ]
279 },
280 {
281 "name": "source_height🟨",
282 "type": "INT",
283 "links": [
284 27
285 ]
286 },
287 {
288 "name": "loaded_fps🟦",
289 "type": "FLOAT",
290 "links": null
291 },
292 {
293 "name": "loaded_frame_count🟦",
294 "type": "INT",
295 "links": null
296 },
297 {
298 "name": "loaded_duration🟦",
299 "type": "FLOAT",
300 "links": null
301 },
302 {
303 "name": "loaded_width🟦",
304 "type": "INT",
305 "links": null
306 },
307 {
308 "name": "loaded_height🟦",
309 "type": "INT",
310 "links": null
311 }
312 ],
313 "properties": {
314 "Node name for S&R": "VHS_VideoInfo"
315 },
316 "widgets_values": []
317 },
318 {
319 "id": 6,
320 "type": "VHS_VideoCombine",
321 "pos": [
322 -690.0003270925597,
323 5040.000105797924
324 ],
325 "size": [
326 225.3125,
327 822.484375
328 ],
329 "flags": [],
330 "order": 5,
331 "mode": 0,
332 "inputs": [
333 {
334 "name": "images",
335 "type": "IMAGE",
336 "link": 6
337 },
338 {
339 "name": "audio",
340 "shape": 7,
341 "type": "AUDIO",
342 "link": null
343 },
344 {
345 "name": "meta_batch",
346 "shape": 7,
347 "type": "VHS_BatchManager",
348 "link": null
349 },
350 {
351 "name": "vae",
352 "shape": 7,
353 "type": "VAE",
354 "link": null
355 },
356 {
357 "name": "frame_rate",
358 "type": "FLOAT",
359 "widget": {
360 "name": "frame_rate"
361 },
362 "link": 7
363 }
364 ],
365 "outputs": [
366 {
367 "name": "Filenames",
368 "type": "VHS_FILENAMES",
369 "links": null
370 }
371 ],
372 "properties": {
373 "Node name for S&R": "VHS_VideoCombine"
374 },
375 "widgets_values": {
376 "frame_rate": 8,
377 "loop_count": 0,
378 "filename_prefix": "AnimateDiff",
379 "format": "video/h264-mp4",
380 "pix_fmt": "yuv420p",
381 "crf": 13,
382 "save_metadata": true,
383 "trim_to_audio": false,
384 "pingpong": false,
385 "save_output": true,
386 "videopreview": {
387 "hidden": false,
388 "paused": false,
389 "params": {
390 "filename": "be9565be2277a60d341bbbfd93f575b4652729f34590d8632bd0af11d2ec3765.mp4",
391 "format": "video/h264-mp4",
392 "frame_rate": 24,
393 "fullpath": "",
394 "subfolder": "",
395 "type": "output",
396 "workflow": "AnimateDiff_00002.png"
397 }
398 }
399 }
400 },
401 {
402 "id": 11,
403 "type": "MarkdownNote",
404 "pos": [
405 -2610.000053192587,
406 5049.999983116352
407 ],
408 "size": [
409 718.953125,
410 566.984375
411 ],
412 "flags": [],
413 "order": 2,
414 "mode": 0,
415 "inputs": [],
416 "outputs": [],
417 "properties": [],
418 "widgets_values": [
419 "# FL Video Crossfade\n\nBlends two video image sequences together with a crossfade transition.\n\n## Parameters\n\n| Parameter | Default | Notes |\n|---|---|---|\n| `images_a` | — | First video sequence (IMAGE input). |\n| `images_b` | — | Second video sequence (IMAGE input). |\n| `crossfade_frames` | 72 | Number of frames over which the crossfade occurs. |\n| `blend_mode` | normal | Blending mode used during the transition. |\n| `target_width` | 512 | Output width in pixels. |\n| `target_height` | 512 | Output height in pixels. |\n\n> **Note:** `target_width` and `target_height` are determined by the dimensions of `images_a` using the `Video Info` node.\n\n> **Tip:** To add more clips, chain multiple FL Video Crossfade nodes — pass the IMAGE output into `images_a` of the next node and connect a new video to `images_b`."
420 ],
421 "color": "#222",
422 "bgcolor": "#000"
423 }
424 ],
425 "links": [
426 [
427 3,
428 3,
429 3,
430 5,
431 0,
432 "VHS_VIDEOINFO"
433 ],
434 [
435 4,
436 5,
437 3,
438 2,
439 2,
440 "INT"
441 ],
442 [
443 6,
444 2,
445 0,
446 6,
447 0,
448 "IMAGE"
449 ],
450 [
451 7,
452 5,
453 0,
454 6,
455 4,
456 "FLOAT"
457 ],
458 [
459 23,
460 3,
461 0,
462 2,
463 0,
464 "IMAGE"
465 ],
466 [
467 25,
468 4,
469 0,
470 2,
471 1,
472 "IMAGE"
473 ],
474 [
475 27,
476 5,
477 4,
478 2,
479 3,
480 "INT"
481 ]
482 ],
483 "groups": [],
484 "config": [],
485 "extra": {
486 "linearData": {
487 "inputs": [
488 [
489 "3",
490 "video"
491 ],
492 [
493 "3",
494 "videopreview"
495 ],
496 [
497 "4",
498 "video"
499 ],
500 [
501 "4",
502 "videopreview"
503 ],
504 [
505 "2",
506 "crossfade_frames"
507 ],
508 [
509 "2",
510 "blend_mode"
511 ]
512 ],
513 "outputs": [
514 "6"
515 ]
516 },
517 "linearMode": false,
518 "ds": {
519 "scale": 0.6934334949441372,
520 "offset": [
521 2740.1988550435995,
522 -4791.582253027365
523 ]
524 },
525 "frontendVersion": "1.41.13",
526 "VHS_latentpreview": true,
527 "VHS_latentpreviewrate": 0,
528 "VHS_MetadataImage": true,
529 "VHS_KeepIntermediate": true
530 },
531 "version": 0.4
532}