Files
kijai-ComfyUI-LivePortraitKJ/examples/liveportrait_video_example_02.json
T
2024-07-23 21:13:15 +03:00

1605 lines
28 KiB
JSON

{
"last_node_id": 195,
"last_link_id": 467,
"nodes": [
{
"id": 81,
"type": "GrowMaskWithBlur",
"pos": [
80,
441
],
"size": {
"0": 315,
"1": 246
},
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 192,
"slot_index": 0
}
],
"outputs": [
{
"name": "mask",
"type": "MASK",
"links": [
187
],
"shape": 3,
"slot_index": 0
},
{
"name": "mask_inverted",
"type": "MASK",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "GrowMaskWithBlur"
},
"widgets_values": [
0,
0,
true,
false,
13.9,
1,
1,
false
]
},
{
"id": 165,
"type": "ImageResizeKJ",
"pos": [
-873,
-573
],
"size": {
"0": 315,
"1": 242
},
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 433
},
{
"name": "get_image_size",
"type": "IMAGE",
"link": null
},
{
"name": "width_input",
"type": "INT",
"link": null,
"widget": {
"name": "width_input"
}
},
{
"name": "height_input",
"type": "INT",
"link": null,
"widget": {
"name": "height_input"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
434
],
"shape": 3,
"slot_index": 0
},
{
"name": "width",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "height",
"type": "INT",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageResizeKJ"
},
"widgets_values": [
1024,
1024,
"bilinear",
true,
2,
0,
0
]
},
{
"id": 129,
"type": "LivePortraitLoadCropper",
"pos": [
-1253,
-757
],
"size": {
"0": 315,
"1": 82
},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{
"name": "cropper",
"type": "LPCROPPER",
"links": [
444,
464
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "LivePortraitLoadCropper"
},
"widgets_values": [
"CPU",
true
]
},
{
"id": 82,
"type": "MaskPreview+",
"pos": [
436,
434
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 187
}
],
"properties": {
"Node name for S&R": "MaskPreview+"
}
},
{
"id": 83,
"type": "CreateShapeMask",
"pos": [
-283,
441
],
"size": {
"0": 315,
"1": 270
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "mask",
"type": "MASK",
"links": [
192
],
"shape": 3,
"slot_index": 0
},
{
"name": "mask_inverted",
"type": "MASK",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CreateShapeMask"
},
"widgets_values": [
"circle",
1,
256,
256,
0,
512,
512,
472,
472
]
},
{
"id": 133,
"type": "PrimitiveNode",
"pos": [
-1576,
-82
],
"size": {
"0": 210,
"1": 82
},
"flags": {},
"order": 2,
"mode": 0,
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
302,
324
],
"widget": {
"name": "frame_load_cap"
},
"slot_index": 0
}
],
"title": "frame_load_cap",
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
128,
"fixed"
]
},
{
"id": 182,
"type": "GetImageSizeAndCount",
"pos": [
-831,
37
],
"size": {
"0": 210,
"1": 86
},
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 436
}
],
"outputs": [
{
"name": "image",
"type": "IMAGE",
"links": [
443,
451,
465
],
"shape": 3,
"slot_index": 0
},
{
"name": "480 width",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "480 height",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "128 count",
"type": "INT",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "GetImageSizeAndCount"
}
},
{
"id": 134,
"type": "GetImageSizeAndCount",
"pos": [
-193,
182
],
"size": {
"0": 210,
"1": 86
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": null
}
],
"outputs": [
{
"name": "image",
"type": "IMAGE",
"links": [],
"shape": 3,
"slot_index": 0
},
{
"name": "256 width",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "256 height",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "128 count",
"type": "INT",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "GetImageSizeAndCount"
}
},
{
"id": 188,
"type": "Note",
"pos": [
39,
137
],
"size": {
"0": 229.1644287109375,
"1": 95.92726135253906
},
"flags": {},
"order": 4,
"mode": 0,
"properties": {
"text": ""
},
"widgets_values": [
"If you want to crop your driving video, use this as driving_images instead"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 189,
"type": "LivePortraitCropper",
"pos": [
-3,
-755
],
"size": {
"0": 330,
"1": 242
},
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "pipeline",
"type": "LIVEPORTRAITPIPE",
"link": 446,
"slot_index": 0
},
{
"name": "cropper",
"type": "LPCROPPER",
"link": 444
},
{
"name": "source_image",
"type": "IMAGE",
"link": 445
}
],
"outputs": [
{
"name": "cropped_image",
"type": "IMAGE",
"links": null,
"shape": 3,
"slot_index": 0
},
{
"name": "crop_info",
"type": "CROPINFO",
"links": [
449
],
"shape": 3,
"slot_index": 1
}
],
"properties": {
"Node name for S&R": "LivePortraitCropper"
},
"widgets_values": [
512,
2.3,
0,
-0.125,
0,
"large-small",
true
]
},
{
"id": 78,
"type": "GetImageSizeAndCount",
"pos": [
-522,
-572
],
"size": {
"0": 210,
"1": 86
},
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 434
}
],
"outputs": [
{
"name": "image",
"type": "IMAGE",
"links": [
445,
455
],
"shape": 3,
"slot_index": 0
},
{
"name": "1024 width",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "540 height",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "128 count",
"type": "INT",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "GetImageSizeAndCount"
}
},
{
"id": 192,
"type": "Reroute",
"pos": [
423,
-466
],
"size": [
82,
26
],
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 455
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
456,
457
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 191,
"type": "LivePortraitComposite",
"pos": [
1025,
-464
],
"size": {
"0": 355.20001220703125,
"1": 86
},
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "source_image",
"type": "IMAGE",
"link": 457
},
{
"name": "cropped_image",
"type": "IMAGE",
"link": 454
},
{
"name": "liveportrait_out",
"type": "LP_OUT",
"link": 452
},
{
"name": "mask",
"type": "MASK",
"link": null
}
],
"outputs": [
{
"name": "full_images",
"type": "IMAGE",
"links": [
458
],
"shape": 3,
"slot_index": 0
},
{
"name": "mask",
"type": "MASK",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LivePortraitComposite"
}
},
{
"id": 181,
"type": "GetImageSizeAndCount",
"pos": [
1379,
-286
],
"size": {
"0": 210,
"1": 86
},
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 458
}
],
"outputs": [
{
"name": "image",
"type": "IMAGE",
"links": [
440
],
"shape": 3,
"slot_index": 0
},
{
"name": "1024 width",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "540 height",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "128 count",
"type": "INT",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "GetImageSizeAndCount"
}
},
{
"id": 1,
"type": "DownloadAndLoadLivePortraitModels",
"pos": [
-1244,
-870
],
"size": {
"0": 302.43463134765625,
"1": 58
},
"flags": {},
"order": 5,
"mode": 0,
"outputs": [
{
"name": "live_portrait_pipe",
"type": "LIVEPORTRAITPIPE",
"links": [
446,
448,
466
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "DownloadAndLoadLivePortraitModels"
},
"widgets_values": [
"fp16"
]
},
{
"id": 8,
"type": "VHS_LoadVideo",
"pos": [
-1253,
28
],
"size": [
340.1555480957031,
572.1555480957031
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "meta_batch",
"type": "VHS_BatchManager",
"link": null
},
{
"name": "vae",
"type": "VAE",
"link": null
},
{
"name": "frame_load_cap",
"type": "INT",
"link": 302,
"widget": {
"name": "frame_load_cap"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
436
],
"shape": 3,
"slot_index": 0
},
{
"name": "frame_count",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "audio",
"type": "VHS_AUDIO",
"links": null,
"shape": 3
},
{
"name": "video_info",
"type": "VHS_VIDEOINFO",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VHS_LoadVideo"
},
"widgets_values": {
"video": "d6.mp4",
"force_rate": 0,
"force_size": "Disabled",
"custom_width": 512,
"custom_height": 512,
"frame_load_cap": 128,
"skip_first_frames": 0,
"select_every_nth": 1,
"choose video to upload": "image",
"videopreview": {
"hidden": false,
"paused": false,
"params": {
"frame_load_cap": 128,
"skip_first_frames": 0,
"force_rate": 0,
"filename": "d6.mp4",
"type": "input",
"format": "video/mp4",
"select_every_nth": 1
}
}
}
},
{
"id": 168,
"type": "VHS_VideoCombine",
"pos": [
1495,
-143
],
"size": [
1103.3974609375,
693.5853313577586
],
"flags": {},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 441
},
{
"name": "audio",
"type": "VHS_AUDIO",
"link": 462
},
{
"name": "meta_batch",
"type": "VHS_BatchManager",
"link": null
},
{
"name": "vae",
"type": "VAE",
"link": null
},
{
"name": "frame_rate",
"type": "FLOAT",
"link": 460,
"widget": {
"name": "frame_rate"
},
"slot_index": 4
}
],
"outputs": [
{
"name": "Filenames",
"type": "VHS_FILENAMES",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VHS_VideoCombine"
},
"widgets_values": {
"frame_rate": 16,
"loop_count": 0,
"filename_prefix": "LivePortrait",
"format": "video/h264-mp4",
"pix_fmt": "yuv420p",
"crf": 19,
"save_metadata": true,
"pingpong": false,
"save_output": false,
"videopreview": {
"hidden": false,
"paused": false,
"params": {
"filename": "LivePortrait_00005.mp4",
"subfolder": "",
"type": "temp",
"format": "video/h264-mp4",
"frame_rate": 25
}
}
}
},
{
"id": 186,
"type": "ImageConcanate",
"pos": [
1019,
28
],
"size": {
"0": 315,
"1": 102
},
"flags": {},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "image1",
"type": "IMAGE",
"link": 443
},
{
"name": "image2",
"type": "IMAGE",
"link": 440
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
441
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "ImageConcanate"
},
"widgets_values": [
"right",
true
]
},
{
"id": 146,
"type": "VHS_LoadVideo",
"pos": [
-1271,
-572
],
"size": [
340.1555480957031,
420.83202731609344
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "meta_batch",
"type": "VHS_BatchManager",
"link": null
},
{
"name": "vae",
"type": "VAE",
"link": null
},
{
"name": "frame_load_cap",
"type": "INT",
"link": 324,
"widget": {
"name": "frame_load_cap"
},
"slot_index": 2
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
433
],
"shape": 3,
"slot_index": 0
},
{
"name": "frame_count",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "audio",
"type": "VHS_AUDIO",
"links": [
461
],
"shape": 3,
"slot_index": 2
},
{
"name": "video_info",
"type": "VHS_VIDEOINFO",
"links": [
459
],
"shape": 3,
"slot_index": 3
}
],
"properties": {
"Node name for S&R": "VHS_LoadVideo"
},
"widgets_values": {
"video": "4098429-uhd_4096_2160_25fps.mp4",
"force_rate": 0,
"force_size": "Disabled",
"custom_width": 512,
"custom_height": 512,
"frame_load_cap": 128,
"skip_first_frames": 0,
"select_every_nth": 1,
"choose video to upload": "image",
"videopreview": {
"hidden": false,
"paused": false,
"params": {
"frame_load_cap": 128,
"skip_first_frames": 0,
"force_rate": 0,
"filename": "4098429-uhd_4096_2160_25fps.mp4",
"type": "input",
"format": "video/mp4",
"select_every_nth": 1
}
}
}
},
{
"id": 193,
"type": "VHS_VideoInfo",
"pos": [
-1064,
-48
],
"size": {
"0": 393,
"1": 206
},
"flags": {
"collapsed": true
},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "video_info",
"type": "VHS_VIDEOINFO",
"link": 459
}
],
"outputs": [
{
"name": "source_fps🟨",
"type": "FLOAT",
"links": [
460
],
"shape": 3
},
{
"name": "source_frame_count🟨",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "source_duration🟨",
"type": "FLOAT",
"links": null,
"shape": 3
},
{
"name": "source_width🟨",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "source_height🟨",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "loaded_fps🟦",
"type": "FLOAT",
"links": null,
"shape": 3
},
{
"name": "loaded_frame_count🟦",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "loaded_duration🟦",
"type": "FLOAT",
"links": null,
"shape": 3
},
{
"name": "loaded_width🟦",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "loaded_height🟦",
"type": "INT",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VHS_VideoInfo"
},
"widgets_values": {}
},
{
"id": 194,
"type": "Reroute",
"pos": [
-1054,
-114
],
"size": [
115.6,
26
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 461
}
],
"outputs": [
{
"name": "VHS_AUDIO",
"type": "VHS_AUDIO",
"links": [
462
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 187,
"type": "Note",
"pos": [
118,
-243
],
"size": {
"0": 210,
"1": 58
},
"flags": {},
"order": 6,
"mode": 0,
"properties": {
"text": ""
},
"widgets_values": [
"Connect this if you want to use the eye/lip retargeting mode"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 180,
"type": "LivePortraitRetargeting",
"pos": [
-320,
-311
],
"size": {
"0": 430.8000183105469,
"1": 130
},
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "driving_crop_info",
"type": "CROPINFO",
"link": 467,
"slot_index": 0
}
],
"outputs": [
{
"name": "retargeting_info",
"type": "RETARGETINGINFO",
"links": [],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "LivePortraitRetargeting"
},
"widgets_values": [
true,
1,
true,
1
]
},
{
"id": 195,
"type": "LivePortraitCropper",
"pos": [
-636,
187
],
"size": {
"0": 330,
"1": 242
},
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "pipeline",
"type": "LIVEPORTRAITPIPE",
"link": 466,
"slot_index": 0
},
{
"name": "cropper",
"type": "LPCROPPER",
"link": 464
},
{
"name": "source_image",
"type": "IMAGE",
"link": 465
}
],
"outputs": [
{
"name": "cropped_image",
"type": "IMAGE",
"links": null,
"shape": 3
},
{
"name": "crop_info",
"type": "CROPINFO",
"links": [
467
],
"shape": 3,
"slot_index": 1
}
],
"properties": {
"Node name for S&R": "LivePortraitCropper"
},
"widgets_values": [
512,
2.3,
0,
-0.125,
0,
"large-small",
true
]
},
{
"id": 190,
"type": "LivePortraitProcess",
"pos": [
551,
-383
],
"size": {
"0": 430.8000183105469,
"1": 282
},
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "pipeline",
"type": "LIVEPORTRAITPIPE",
"link": 448
},
{
"name": "crop_info",
"type": "CROPINFO",
"link": 449
},
{
"name": "source_image",
"type": "IMAGE",
"link": 456
},
{
"name": "driving_images",
"type": "IMAGE",
"link": 451
},
{
"name": "opt_retargeting_info",
"type": "RETARGETINGINFO",
"link": null
}
],
"outputs": [
{
"name": "cropped_image",
"type": "IMAGE",
"links": [
454
],
"shape": 3,
"slot_index": 0
},
{
"name": "output",
"type": "LP_OUT",
"links": [
452
],
"shape": 3,
"slot_index": 1
}
],
"properties": {
"Node name for S&R": "LivePortraitProcess"
},
"widgets_values": [
false,
0.03,
true,
1,
"constant",
"source_video_smoothed",
0.000003
]
}
],
"links": [
[
187,
81,
0,
82,
0,
"MASK"
],
[
192,
83,
0,
81,
0,
"MASK"
],
[
302,
133,
0,
8,
2,
"INT"
],
[
324,
133,
0,
146,
2,
"INT"
],
[
433,
146,
0,
165,
0,
"IMAGE"
],
[
434,
165,
0,
78,
0,
"IMAGE"
],
[
436,
8,
0,
182,
0,
"IMAGE"
],
[
440,
181,
0,
186,
1,
"IMAGE"
],
[
441,
186,
0,
168,
0,
"IMAGE"
],
[
443,
182,
0,
186,
0,
"IMAGE"
],
[
444,
129,
0,
189,
1,
"LPCROPPER"
],
[
445,
78,
0,
189,
2,
"IMAGE"
],
[
446,
1,
0,
189,
0,
"LIVEPORTRAITPIPE"
],
[
448,
1,
0,
190,
0,
"LIVEPORTRAITPIPE"
],
[
449,
189,
1,
190,
1,
"CROPINFO"
],
[
451,
182,
0,
190,
3,
"IMAGE"
],
[
452,
190,
1,
191,
2,
"LP_OUT"
],
[
454,
190,
0,
191,
1,
"IMAGE"
],
[
455,
78,
0,
192,
0,
"*"
],
[
456,
192,
0,
190,
2,
"IMAGE"
],
[
457,
192,
0,
191,
0,
"IMAGE"
],
[
458,
191,
0,
181,
0,
"IMAGE"
],
[
459,
146,
3,
193,
0,
"VHS_VIDEOINFO"
],
[
460,
193,
0,
168,
4,
"FLOAT"
],
[
461,
146,
2,
194,
0,
"*"
],
[
462,
194,
0,
168,
1,
"VHS_AUDIO"
],
[
464,
129,
0,
195,
1,
"LPCROPPER"
],
[
465,
182,
0,
195,
2,
"IMAGE"
],
[
466,
1,
0,
195,
0,
"LIVEPORTRAITPIPE"
],
[
467,
195,
1,
180,
0,
"CROPINFO"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.6209213230591556,
"offset": {
"0": 1561.0563501752945,
"1": 914.6435241564945
}
}
},
"version": 0.4
}