工作流 /
角色与时尚 /
LivePortrait 面部表情

LivePortrait 面部表情
LivePortrait for Facial Expression
上传一张肖像图片和一段参考表情视频。生成带有参考表情的肖像视频。
角色与时尚
11 个节点 2 个输入 20 次使用 ComfyUI ≥ 0.0.1 shane 16 KB
节点构成
ImageResizeKJv2
× 2
DownloadAndLoadLivePortraitModels
× 1
LivePortraitLoadMediaPipeCropper
× 1
LivePortraitCropper
× 1
LivePortraitComposite
× 1
LoadImage
× 1
VHS_LoadVideo
× 1
VHS_VideoCombine
× 1
LivePortraitProcess
× 1
SaveImage
× 1
官方标注的模型
LivePortrait
工作流 JSON
和上面「下载工作流 JSON」是同一份文件。
1{
2 "id": "c4d4a7ff-6545-4239-b0c8-f14b106ad5bd",
3 "revision": 0,
4 "last_node_id": 74,
5 "last_link_id": 116,
6 "nodes": [
7 {
8 "id": 61,
9 "type": "ImageResizeKJv2",
10 "pos": [
11 625,
12 473.33333333333337
13 ],
14 "size": [
15 270,
16 345.52083333333337
17 ],
18 "flags": [],
19 "order": 4,
20 "mode": 4,
21 "inputs": [
22 {
23 "name": "image",
24 "type": "IMAGE",
25 "link": 91
26 },
27 {
28 "name": "mask",
29 "shape": 7,
30 "type": "MASK",
31 "link": null
32 }
33 ],
34 "outputs": [
35 {
36 "name": "IMAGE",
37 "type": "IMAGE",
38 "links": [
39 88,
40 89,
41 90
42 ]
43 },
44 {
45 "name": "width",
46 "type": "INT",
47 "links": null
48 },
49 {
50 "name": "height",
51 "type": "INT",
52 "links": null
53 },
54 {
55 "name": "mask",
56 "type": "MASK",
57 "links": null
58 }
59 ],
60 "properties": {
61 "Node name for S&R": "ImageResizeKJv2",
62 "cnr_id": "comfyui-kjnodes",
63 "ver": "a5e66ce5510c9b3bf984c43a22014cefae4bd044",
64 "widget_ue_connectable": []
65 },
66 "widgets_values": [
67 512,
68 512,
69 "nearest-exact",
70 "stretch",
71 "0, 0, 0",
72 "center",
73 2,
74 "cpu"
75 ]
76 },
77 {
78 "id": 60,
79 "type": "DownloadAndLoadLivePortraitModels",
80 "pos": [
81 991.6666666666667,
82 73.33333333333334
83 ],
84 "size": [
85 302.421875,
86 117.76041666666667
87 ],
88 "flags": [],
89 "order": 0,
90 "mode": 0,
91 "inputs": [],
92 "outputs": [
93 {
94 "name": "live_portrait_pipe",
95 "type": "LIVEPORTRAITPIPE",
96 "slot_index": 0,
97 "links": [
98 66,
99 76
100 ]
101 }
102 ],
103 "properties": {
104 "Node name for S&R": "DownloadAndLoadLivePortraitModels",
105 "cnr_id": "comfyui-liveportraitkj",
106 "ver": "1.1.0",
107 "widget_ue_connectable": []
108 },
109 "widgets_values": [
110 "auto",
111 "human"
112 ]
113 },
114 {
115 "id": 59,
116 "type": "LivePortraitLoadMediaPipeCropper",
117 "pos": [
118 991.6666375277472,
119 231.66667185498554
120 ],
121 "size": [
122 300,
123 112.21354166666667
124 ],
125 "flags": [],
126 "order": 1,
127 "mode": 0,
128 "inputs": [],
129 "outputs": [
130 {
131 "name": "cropper",
132 "type": "LPCROPPER",
133 "links": [
134 77
135 ]
136 }
137 ],
138 "properties": {
139 "Node name for S&R": "LivePortraitLoadMediaPipeCropper",
140 "cnr_id": "comfyui-liveportraitkj",
141 "ver": "1.1.0",
142 "widget_ue_connectable": []
143 },
144 "widgets_values": [
145 "CPU",
146 true
147 ]
148 },
149 {
150 "id": 51,
151 "type": "LivePortraitCropper",
152 "pos": [
153 991.6666666666667,
154 481.6666666666667
155 ],
156 "size": [
157 330,
158 285.546875
159 ],
160 "flags": [],
161 "order": 6,
162 "mode": 0,
163 "inputs": [
164 {
165 "name": "pipeline",
166 "type": "LIVEPORTRAITPIPE",
167 "link": 76
168 },
169 {
170 "name": "cropper",
171 "type": "LPCROPPER",
172 "link": 77
173 },
174 {
175 "name": "source_image",
176 "type": "IMAGE",
177 "link": 90
178 }
179 ],
180 "outputs": [
181 {
182 "name": "cropped_image",
183 "type": "IMAGE",
184 "slot_index": 0,
185 "links": []
186 },
187 {
188 "name": "crop_info",
189 "type": "CROPINFO",
190 "slot_index": 1,
191 "links": [
192 67
193 ]
194 }
195 ],
196 "properties": {
197 "Node name for S&R": "LivePortraitCropper",
198 "cnr_id": "comfyui-liveportraitkj",
199 "ver": "1.1.0",
200 "widget_ue_connectable": []
201 },
202 "widgets_values": [
203 512,
204 2,
205 0,
206 -0.125,
207 0,
208 "large-small",
209 true
210 ]
211 },
212 {
213 "id": 49,
214 "type": "LivePortraitComposite",
215 "pos": [
216 1866.6666666666667,
217 473.33333333333337
218 ],
219 "size": [
220 355.1953125,
221 120
222 ],
223 "flags": [],
224 "order": 8,
225 "mode": 0,
226 "inputs": [
227 {
228 "name": "source_image",
229 "type": "IMAGE",
230 "link": 89
231 },
232 {
233 "name": "cropped_image",
234 "type": "IMAGE",
235 "link": 72
236 },
237 {
238 "name": "liveportrait_out",
239 "type": "LP_OUT",
240 "link": 73
241 },
242 {
243 "name": "mask",
244 "shape": 7,
245 "type": "MASK",
246 "link": null
247 }
248 ],
249 "outputs": [
250 {
251 "name": "full_images",
252 "type": "IMAGE",
253 "slot_index": 0,
254 "links": [
255 86,
256 87
257 ]
258 },
259 {
260 "name": "mask",
261 "type": "MASK",
262 "links": null
263 }
264 ],
265 "properties": {
266 "Node name for S&R": "LivePortraitComposite",
267 "cnr_id": "comfyui-liveportraitkj",
268 "ver": "1.1.0",
269 "widget_ue_connectable": []
270 },
271 "widgets_values": []
272 },
273 {
274 "id": 3,
275 "type": "LoadImage",
276 "pos": [
277 258.3333333333333,
278 473.33333333333337
279 ],
280 "size": [
281 315,
282 314
283 ],
284 "flags": [],
285 "order": 2,
286 "mode": 0,
287 "inputs": [],
288 "outputs": [
289 {
290 "name": "IMAGE",
291 "type": "IMAGE",
292 "slot_index": 0,
293 "links": [
294 91
295 ]
296 },
297 {
298 "name": "MASK",
299 "type": "MASK",
300 "slot_index": 1,
301 "links": null
302 }
303 ],
304 "properties": {
305 "Node name for S&R": "LoadImage",
306 "cnr_id": "comfy-core",
307 "ver": "0.9.2",
308 "widget_ue_connectable": []
309 },
310 "widgets_values": [
311 "live_portrait_character.png",
312 "image"
313 ]
314 },
315 {
316 "id": 44,
317 "type": "VHS_LoadVideo",
318 "pos": [
319 273.15946274052055,
320 936.1801100900469
321 ],
322 "size": [
323 260.4306640625,
324 564.4306640625
325 ],
326 "flags": [],
327 "order": 3,
328 "mode": 0,
329 "inputs": [
330 {
331 "name": "meta_batch",
332 "shape": 7,
333 "type": "VHS_BatchManager",
334 "link": null
335 },
336 {
337 "name": "vae",
338 "shape": 7,
339 "type": "VAE",
340 "link": null
341 }
342 ],
343 "outputs": [
344 {
345 "name": "IMAGE",
346 "type": "IMAGE",
347 "slot_index": 0,
348 "links": [
349 113
350 ]
351 },
352 {
353 "name": "frame_count",
354 "type": "INT",
355 "links": null
356 },
357 {
358 "name": "audio",
359 "type": "AUDIO",
360 "links": null
361 },
362 {
363 "name": "video_info",
364 "type": "VHS_VIDEOINFO",
365 "links": null
366 }
367 ],
368 "properties": {
369 "Node name for S&R": "VHS_LoadVideo",
370 "cnr_id": "comfyui-videohelpersuite",
371 "ver": "a7ce59e381934733bfae03b1be029756d6ce936d",
372 "widget_ue_connectable": []
373 },
374 "widgets_values": {
375 "video": "live_portrait_expression.mp4",
376 "force_rate": 0,
377 "custom_width": 0,
378 "custom_height": 0,
379 "frame_load_cap": 0,
380 "skip_first_frames": 0,
381 "select_every_nth": 2,
382 "format": "AnimateDiff",
383 "videopreview": {
384 "hidden": false,
385 "params": {
386 "filename": "live_portrait_expression.mp4",
387 "force_rate": 0,
388 "format": "video/mp4",
389 "frame_load_cap": 0,
390 "select_every_nth": 2,
391 "skip_first_frames": 0,
392 "type": "input"
393 },
394 "paused": false
395 }
396 }
397 },
398 {
399 "id": 10,
400 "type": "VHS_VideoCombine",
401 "pos": [
402 2316.666666666667,
403 998.3333333333334
404 ],
405 "size": [
406 261.796875,
407 589.796875
408 ],
409 "flags": [],
410 "order": 10,
411 "mode": 0,
412 "inputs": [
413 {
414 "name": "images",
415 "type": "IMAGE",
416 "link": 87
417 },
418 {
419 "name": "audio",
420 "shape": 7,
421 "type": "AUDIO",
422 "link": null
423 },
424 {
425 "name": "meta_batch",
426 "shape": 7,
427 "type": "VHS_BatchManager",
428 "link": null
429 },
430 {
431 "name": "vae",
432 "shape": 7,
433 "type": "VAE",
434 "link": null
435 }
436 ],
437 "outputs": [
438 {
439 "name": "Filenames",
440 "type": "VHS_FILENAMES",
441 "links": null
442 }
443 ],
444 "properties": {
445 "Node name for S&R": "VHS_VideoCombine",
446 "cnr_id": "comfyui-videohelpersuite",
447 "ver": "a7ce59e381934733bfae03b1be029756d6ce936d",
448 "widget_ue_connectable": []
449 },
450 "widgets_values": {
451 "frame_rate": 15,
452 "loop_count": 0,
453 "filename_prefix": "LivePortrait",
454 "format": "video/h264-mp4",
455 "pix_fmt": "yuv420p",
456 "crf": 19,
457 "save_metadata": true,
458 "trim_to_audio": false,
459 "pingpong": false,
460 "save_output": true,
461 "videopreview": {
462 "hidden": false,
463 "params": {
464 "filename": "b749a25e23b048b733151e9862fe5346d3e66cef8645d4ba4ae56651fb28ca04.mp4",
465 "format": "video/h264-mp4",
466 "frame_rate": 15,
467 "fullpath": "",
468 "subfolder": "",
469 "type": "output",
470 "workflow": "LivePortrait_00001.png"
471 },
472 "paused": false
473 }
474 }
475 },
476 {
477 "id": 71,
478 "type": "ImageResizeKJv2",
479 "pos": [
480 630,
481 940
482 ],
483 "size": [
484 270,
485 345.52083333333337
486 ],
487 "flags": [],
488 "order": 5,
489 "mode": 4,
490 "inputs": [
491 {
492 "name": "image",
493 "type": "IMAGE",
494 "link": 113
495 },
496 {
497 "name": "mask",
498 "shape": 7,
499 "type": "MASK",
500 "link": null
501 }
502 ],
503 "outputs": [
504 {
505 "name": "IMAGE",
506 "type": "IMAGE",
507 "links": [
508 114
509 ]
510 },
511 {
512 "name": "width",
513 "type": "INT",
514 "links": null
515 },
516 {
517 "name": "height",
518 "type": "INT",
519 "links": null
520 },
521 {
522 "name": "mask",
523 "type": "MASK",
524 "links": null
525 }
526 ],
527 "properties": {
528 "Node name for S&R": "ImageResizeKJv2",
529 "cnr_id": "comfyui-kjnodes",
530 "ver": "a5e66ce5510c9b3bf984c43a22014cefae4bd044",
531 "widget_ue_connectable": []
532 },
533 "widgets_values": [
534 512,
535 512,
536 "nearest-exact",
537 "stretch",
538 "0, 0, 0",
539 "center",
540 2,
541 "cpu"
542 ]
543 },
544 {
545 "id": 47,
546 "type": "LivePortraitProcess",
547 "pos": [
548 1383.3333333333335,
549 473.33333333333337
550 ],
551 "size": [
552 430,
553 350
554 ],
555 "flags": [],
556 "order": 7,
557 "mode": 0,
558 "inputs": [
559 {
560 "name": "pipeline",
561 "type": "LIVEPORTRAITPIPE",
562 "link": 66
563 },
564 {
565 "name": "crop_info",
566 "type": "CROPINFO",
567 "link": 67
568 },
569 {
570 "name": "source_image",
571 "type": "IMAGE",
572 "link": 88
573 },
574 {
575 "name": "driving_images",
576 "type": "IMAGE",
577 "link": 114
578 },
579 {
580 "name": "opt_retargeting_info",
581 "shape": 7,
582 "type": "RETARGETINGINFO",
583 "link": null
584 }
585 ],
586 "outputs": [
587 {
588 "name": "cropped_image",
589 "type": "IMAGE",
590 "slot_index": 0,
591 "links": [
592 72
593 ]
594 },
595 {
596 "name": "output",
597 "type": "LP_OUT",
598 "slot_index": 1,
599 "links": [
600 73
601 ]
602 }
603 ],
604 "properties": {
605 "Node name for S&R": "LivePortraitProcess",
606 "cnr_id": "comfyui-liveportraitkj",
607 "ver": "1.1.0",
608 "widget_ue_connectable": []
609 },
610 "widgets_values": [
611 false,
612 0.03,
613 true,
614 1.5,
615 "constant",
616 "relative",
617 3.0e-6,
618 false,
619 1
620 ]
621 },
622 {
623 "id": 21,
624 "type": "SaveImage",
625 "pos": [
626 2316.666666666667,
627 490
628 ],
629 "size": [
630 268.3854166666667,
631 278.8151041666667
632 ],
633 "flags": [],
634 "order": 9,
635 "mode": 4,
636 "inputs": [
637 {
638 "name": "images",
639 "type": "IMAGE",
640 "link": 86
641 }
642 ],
643 "outputs": [],
644 "properties": {
645 "cnr_id": "comfy-core",
646 "ver": "0.9.2",
647 "Node name for S&R": "SaveImage",
648 "widget_ue_connectable": []
649 },
650 "widgets_values": [
651 "LivePortrait"
652 ]
653 }
654 ],
655 "links": [
656 [
657 66,
658 60,
659 0,
660 47,
661 0,
662 "LIVEPORTRAITPIPE"
663 ],
664 [
665 67,
666 51,
667 1,
668 47,
669 1,
670 "CROPINFO"
671 ],
672 [
673 72,
674 47,
675 0,
676 49,
677 1,
678 "IMAGE"
679 ],
680 [
681 73,
682 47,
683 1,
684 49,
685 2,
686 "LP_OUT"
687 ],
688 [
689 76,
690 60,
691 0,
692 51,
693 0,
694 "LIVEPORTRAITPIPE"
695 ],
696 [
697 77,
698 59,
699 0,
700 51,
701 1,
702 "LPCROPPER"
703 ],
704 [
705 86,
706 49,
707 0,
708 21,
709 0,
710 "IMAGE"
711 ],
712 [
713 87,
714 49,
715 0,
716 10,
717 0,
718 "IMAGE"
719 ],
720 [
721 88,
722 61,
723 0,
724 47,
725 2,
726 "IMAGE"
727 ],
728 [
729 89,
730 61,
731 0,
732 49,
733 0,
734 "IMAGE"
735 ],
736 [
737 90,
738 61,
739 0,
740 51,
741 2,
742 "IMAGE"
743 ],
744 [
745 91,
746 3,
747 0,
748 61,
749 0,
750 "IMAGE"
751 ],
752 [
753 113,
754 44,
755 0,
756 71,
757 0,
758 "IMAGE"
759 ],
760 [
761 114,
762 71,
763 0,
764 47,
765 3,
766 "IMAGE"
767 ]
768 ],
769 "groups": [
770 {
771 "id": 3,
772 "title": "Character Input",
773 "bounding": [
774 233.33333333333334,
775 390,
776 693.9861579999999,
777 445.01184279999984
778 ],
779 "color": "#8A8",
780 "font_size": 24,
781 "flags": []
782 },
783 {
784 "id": 4,
785 "title": "Expression Input",
786 "bounding": [
787 233.33333333333334,
788 856.6666666666667,
789 692.8934597148755,
790 680.669736315275
791 ],
792 "color": "#8A8",
793 "font_size": 24,
794 "flags": []
795 },
796 {
797 "id": 5,
798 "title": "LivePortrait Models",
799 "bounding": [
800 958.3333333333334,
801 -10,
802 358.33333333333337,
803 375
804 ],
805 "color": "#3f789e",
806 "font_size": 24,
807 "flags": []
808 },
809 {
810 "id": 6,
811 "title": "LivePortrait Process",
812 "bounding": [
813 958.3333333333334,
814 390,
815 1310,
816 450
817 ],
818 "color": "#3f789e",
819 "font_size": 24,
820 "flags": []
821 },
822 {
823 "id": 7,
824 "title": "Save Animation",
825 "bounding": [
826 2291.666666666667,
827 906.6666666666667,
828 316.6666666666667,
829 533.3333333333334
830 ],
831 "color": "#b58b2a",
832 "font_size": 24,
833 "flags": []
834 },
835 {
836 "id": 8,
837 "title": "Save Expressions",
838 "bounding": [
839 2291.666666666667,
840 390,
841 316.6666666666667,
842 483.33333333333337
843 ],
844 "color": "#b58b2a",
845 "font_size": 24,
846 "flags": []
847 }
848 ],
849 "config": [],
850 "extra": {
851 "VHS_KeepIntermediate": true,
852 "VHS_MetadataImage": true,
853 "VHS_latentpreview": false,
854 "VHS_latentpreviewrate": 0,
855 "ds": {
856 "scale": 0.9363817211181196,
857 "offset": [
858 48.590261222731726,
859 -540.7152620138385
860 ]
861 },
862 "frontendVersion": "1.41.13",
863 "links_added_by_ue": [],
864 "ue_links": [],
865 "workflowRendererVersion": "LG",
866 "linearData": {
867 "inputs": [
868 [
869 3,
870 "image"
871 ],
872 [
873 44,
874 "choose video to upload"
875 ],
876 [
877 44,
878 "videopreview"
879 ]
880 ],
881 "outputs": [
882 10
883 ]
884 },
885 "linearMode": true
886 },
887 "version": 0.4
888}