提交 9273ae84 authored 作者: kijai's avatar kijai

update example

上级 4fe892a7
{ {
"last_node_id": 51, "last_node_id": 54,
"last_link_id": 128, "last_link_id": 139,
"nodes": [ "nodes": [
{ {
"id": 42, "id": 51,
"type": "MimicMotionGetPoses", "type": "Note",
"pos": [ "pos": [
327, 766,
702 105
], ],
"size": { "size": {
"0": 330, "0": 290.1233825683594,
"1": 126 "1": 69.71562957763672
}, },
"flags": {}, "flags": {},
"order": 9, "order": 0,
"mode": 0, "mode": 0,
"inputs": [
{
"name": "ref_image",
"type": "IMAGE",
"link": 110
},
{
"name": "pose_images",
"type": "IMAGE",
"link": 111
}
],
"outputs": [
{
"name": "poses_with_ref",
"type": "IMAGE",
"links": [
112,
114
],
"shape": 3,
"slot_index": 0
},
{
"name": "pose_images",
"type": "IMAGE",
"links": [
113
],
"shape": 3,
"slot_index": 1
}
],
"properties": { "properties": {
"Node name for S&R": "MimicMotionGetPoses" "text": ""
}, },
"widgets_values": [ "widgets_values": [
true, "Downloads MimicMotion model and fp16 version of SVD XT 1.1"
true,
true
]
},
{
"id": 35,
"type": "ImageResizeKJ",
"pos": [
-75,
781
],
"size": {
"0": 315,
"1": 242
},
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 86
},
{
"name": "get_image_size",
"type": "IMAGE",
"link": null
},
{
"name": "width_input",
"type": "INT",
"link": 88,
"widget": {
"name": "width_input"
}
},
{
"name": "height_input",
"type": "INT",
"link": 89,
"widget": {
"name": "height_input"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
111
],
"shape": 3,
"slot_index": 0
},
{
"name": "width",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "height",
"type": "INT",
"links": null,
"shape": 3
}
], ],
"properties": { "color": "#432",
"Node name for S&R": "ImageResizeKJ" "bgcolor": "#653"
},
"widgets_values": [
576,
1024,
"lanczos",
false,
64,
0,
0
]
}, },
{ {
"id": 9, "id": 9,
"type": "GetImageSizeAndCount", "type": "GetImageSizeAndCount",
"pos": [ "pos": [
826, 825,
505 518
], ],
"size": { "size": {
"0": 210, "0": 210,
"1": 86 "1": 86
}, },
"flags": {}, "flags": {},
"order": 10, "order": 7,
"mode": 0, "mode": 0,
"inputs": [ "inputs": [
{ {
...@@ -168,13 +57,13 @@ ...@@ -168,13 +57,13 @@
"slot_index": 0 "slot_index": 0
}, },
{ {
"name": "576 width", "name": "1024 width",
"type": "INT", "type": "INT",
"links": null, "links": null,
"shape": 3 "shape": 3
}, },
{ {
"name": "1024 height", "name": "576 height",
"type": "INT", "type": "INT",
"links": null, "links": null,
"shape": 3 "shape": 3
...@@ -190,177 +79,6 @@ ...@@ -190,177 +79,6 @@
"Node name for S&R": "GetImageSizeAndCount" "Node name for S&R": "GetImageSizeAndCount"
} }
}, },
{
"id": 37,
"type": "VHS_VideoCombine",
"pos": [
723,
819
],
"size": {
"0": 440,
"1": 218
},
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 114
},
{
"name": "audio",
"type": "VHS_AUDIO",
"link": null
},
{
"name": "meta_batch",
"type": "VHS_BatchManager",
"link": null
}
],
"outputs": [
{
"name": "Filenames",
"type": "VHS_FILENAMES",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VHS_VideoCombine"
},
"widgets_values": {
"frame_rate": 8,
"loop_count": 0,
"filename_prefix": "MimicPose",
"format": "image/webp",
"pingpong": false,
"save_output": false,
"videopreview": {
"hidden": false,
"paused": false,
"params": {
"filename": "MimicPose_00001.webp",
"subfolder": "",
"type": "temp",
"format": "image/webp"
}
}
}
},
{
"id": 28,
"type": "ImageResizeKJ",
"pos": [
-71,
481
],
"size": {
"0": 315,
"1": 242
},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 61
},
{
"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": [
95,
110
],
"shape": 3,
"slot_index": 0
},
{
"name": "width",
"type": "INT",
"links": [
88
],
"shape": 3,
"slot_index": 1
},
{
"name": "height",
"type": "INT",
"links": [
89
],
"shape": 3,
"slot_index": 2
}
],
"properties": {
"Node name for S&R": "ImageResizeKJ"
},
"widgets_values": [
576,
1024,
"lanczos",
false,
64,
0,
0
]
},
{
"id": 49,
"type": "PreviewImage",
"pos": [
290,
251
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 125
}
],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{ {
"id": 2, "id": 2,
"type": "DownloadAndLoadMimicMotionModel", "type": "DownloadAndLoadMimicMotionModel",
...@@ -370,10 +88,10 @@ ...@@ -370,10 +88,10 @@
], ],
"size": { "size": {
"0": 315, "0": 315,
"1": 82 "1": 106
}, },
"flags": {}, "flags": {},
"order": 0, "order": 1,
"mode": 0, "mode": 0,
"outputs": [ "outputs": [
{ {
...@@ -390,68 +108,23 @@ ...@@ -390,68 +108,23 @@
}, },
"widgets_values": [ "widgets_values": [
"MimicMotion-fp16.safetensors", "MimicMotion-fp16.safetensors",
"fp16" "fp16",
false
] ]
}, },
{
"id": 50,
"type": "Note",
"pos": [
281,
104
],
"size": {
"0": 293.7375183105469,
"1": 101.26885986328125
},
"flags": {},
"order": 1,
"mode": 0,
"properties": {
"text": ""
},
"widgets_values": [
"ref_image needs to be 224x224 for clip_vision\ndefault seems to be just resizing, you can try other methods like cropping as well"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 51,
"type": "Note",
"pos": [
779,
105
],
"size": {
"0": 290.1233825683594,
"1": 69.71562957763672
},
"flags": {},
"order": 2,
"mode": 0,
"properties": {
"text": ""
},
"widgets_values": [
"Downloads MimicMotion model and fp16 version of SVD XT 1.1"
],
"color": "#432",
"bgcolor": "#653"
},
{ {
"id": 17, "id": 17,
"type": "ImageConcatMulti", "type": "ImageConcatMulti",
"pos": [ "pos": [
1186, 1212,
774 865
], ],
"size": { "size": {
"0": 210, "0": 210,
"1": 170 "1": 190
}, },
"flags": {}, "flags": {},
"order": 13, "order": 10,
"mode": 0, "mode": 0,
"inputs": [ "inputs": [
{ {
...@@ -462,12 +135,17 @@ ...@@ -462,12 +135,17 @@
{ {
"name": "image_2", "name": "image_2",
"type": "IMAGE", "type": "IMAGE",
"link": 113 "link": 137
}, },
{ {
"name": "image_3", "name": "image_3",
"type": "IMAGE", "type": "IMAGE",
"link": 99 "link": 138
},
{
"name": "image_4",
"type": "IMAGE",
"link": 139
} }
], ],
"outputs": [ "outputs": [
...@@ -483,106 +161,142 @@ ...@@ -483,106 +161,142 @@
], ],
"properties": {}, "properties": {},
"widgets_values": [ "widgets_values": [
3, 4,
"right", "right",
false, false,
null null
] ]
}, },
{ {
"id": 48, "id": 37,
"type": "ImageResizeKJ", "type": "VHS_VideoCombine",
"pos": [ "pos": [
-57, 653,
170 958
],
"size": [
440,
468.25
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 114
},
{
"name": "audio",
"type": "VHS_AUDIO",
"link": null
},
{
"name": "meta_batch",
"type": "VHS_BatchManager",
"link": null
}
],
"outputs": [
{
"name": "Filenames",
"type": "VHS_FILENAMES",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VHS_VideoCombine"
},
"widgets_values": {
"frame_rate": 8,
"loop_count": 0,
"filename_prefix": "MimicPose",
"format": "image/webp",
"pingpong": false,
"save_output": false,
"videopreview": {
"hidden": false,
"paused": false,
"params": {
"filename": "MimicPose_00001.webp",
"subfolder": "",
"type": "temp",
"format": "image/webp"
}
}
}
},
{
"id": 42,
"type": "MimicMotionGetPoses",
"pos": [
327,
702
], ],
"size": { "size": {
"0": 315, "0": 330,
"1": 242 "1": 126
}, },
"flags": {}, "flags": {},
"order": 6, "order": 6,
"mode": 0, "mode": 0,
"inputs": [ "inputs": [
{ {
"name": "image", "name": "ref_image",
"type": "IMAGE", "type": "IMAGE",
"link": 124 "link": 110
}, },
{ {
"name": "get_image_size", "name": "pose_images",
"type": "IMAGE", "type": "IMAGE",
"link": null "link": 111
},
{
"name": "width_input",
"type": "INT",
"link": null,
"widget": {
"name": "width_input"
}
},
{
"name": "height_input",
"type": "INT",
"link": null,
"widget": {
"name": "height_input"
}
} }
], ],
"outputs": [ "outputs": [
{ {
"name": "IMAGE", "name": "poses_with_ref",
"type": "IMAGE", "type": "IMAGE",
"links": [ "links": [
125, 112,
128 114
], ],
"shape": 3, "shape": 3,
"slot_index": 0 "slot_index": 0
}, },
{ {
"name": "width", "name": "pose_images",
"type": "INT", "type": "IMAGE",
"links": [], "links": [
138
],
"shape": 3, "shape": 3,
"slot_index": 1 "slot_index": 1
},
{
"name": "height",
"type": "INT",
"links": [],
"shape": 3,
"slot_index": 2
} }
], ],
"properties": { "properties": {
"Node name for S&R": "ImageResizeKJ" "Node name for S&R": "MimicMotionGetPoses"
}, },
"widgets_values": [ "widgets_values": [
224, true,
224, true,
"lanczos", true
false,
64,
0,
0
] ]
}, },
{ {
"id": 16, "id": 16,
"type": "VHS_VideoCombine", "type": "VHS_VideoCombine",
"pos": [ "pos": [
1482, 1483,
192 95
], ],
"size": [ "size": [
1530.4949951171875, 2861.6603258383248,
1199.1081452546296 703.6084833210144
], ],
"flags": {}, "flags": {},
"order": 14, "order": 11,
"mode": 0, "mode": 0,
"inputs": [ "inputs": [
{ {
...@@ -613,7 +327,7 @@ ...@@ -613,7 +327,7 @@
"Node name for S&R": "VHS_VideoCombine" "Node name for S&R": "VHS_VideoCombine"
}, },
"widgets_values": { "widgets_values": {
"frame_rate": 8, "frame_rate": 12,
"loop_count": 0, "loop_count": 0,
"filename_prefix": "MimicMotion", "filename_prefix": "MimicMotion",
"format": "video/h264-mp4", "format": "video/h264-mp4",
...@@ -626,7 +340,7 @@ ...@@ -626,7 +340,7 @@
"hidden": false, "hidden": false,
"paused": false, "paused": false,
"params": { "params": {
"filename": "MimicMotion_00005.mp4", "filename": "MimicMotion_00010.mp4",
"subfolder": "", "subfolder": "",
"type": "temp", "type": "temp",
"format": "video/h264-mp4" "format": "video/h264-mp4"
...@@ -646,15 +360,14 @@ ...@@ -646,15 +360,14 @@
"1": 410.70074462890625 "1": 410.70074462890625
}, },
"flags": {}, "flags": {},
"order": 3, "order": 2,
"mode": 0, "mode": 0,
"outputs": [ "outputs": [
{ {
"name": "IMAGE", "name": "IMAGE",
"type": "IMAGE", "type": "IMAGE",
"links": [ "links": [
61, 61
124
], ],
"shape": 3, "shape": 3,
"slot_index": 0 "slot_index": 0
...@@ -670,7 +383,7 @@ ...@@ -670,7 +383,7 @@
"Node name for S&R": "LoadImage" "Node name for S&R": "LoadImage"
}, },
"widgets_values": [ "widgets_values": [
"2bc567e9f448176b4e2416ceebf9beab.png", "demo1.jpg",
"image" "image"
] ]
}, },
...@@ -686,7 +399,7 @@ ...@@ -686,7 +399,7 @@
658.5777723524305 658.5777723524305
], ],
"flags": {}, "flags": {},
"order": 4, "order": 3,
"mode": 0, "mode": 0,
"inputs": [ "inputs": [
{ {
...@@ -733,25 +446,190 @@ ...@@ -733,25 +446,190 @@
"force_size": "Disabled", "force_size": "Disabled",
"custom_width": 512, "custom_width": 512,
"custom_height": 512, "custom_height": 512,
"frame_load_cap": 16, "frame_load_cap": 15,
"skip_first_frames": 0, "skip_first_frames": 0,
"select_every_nth": 3, "select_every_nth": 2,
"choose video to upload": "image", "choose video to upload": "image",
"videopreview": { "videopreview": {
"hidden": false, "hidden": false,
"paused": false, "paused": false,
"params": { "params": {
"frame_load_cap": 16, "frame_load_cap": 15,
"skip_first_frames": 0, "skip_first_frames": 0,
"force_rate": 0, "force_rate": 0,
"filename": "pose1.mp4", "filename": "pose1.mp4",
"type": "input", "type": "input",
"format": "video/mp4", "format": "video/mp4",
"select_every_nth": 3 "select_every_nth": 2
} }
} }
} }
}, },
{
"id": 35,
"type": "ImageResizeKJ",
"pos": [
-75,
781
],
"size": {
"0": 315,
"1": 242
},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 86
},
{
"name": "get_image_size",
"type": "IMAGE",
"link": null
},
{
"name": "width_input",
"type": "INT",
"link": 88,
"widget": {
"name": "width_input"
}
},
{
"name": "height_input",
"type": "INT",
"link": 89,
"widget": {
"name": "height_input"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
111,
137
],
"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": [
576,
1024,
"lanczos",
false,
64,
0,
0
]
},
{
"id": 28,
"type": "ImageResizeKJ",
"pos": [
-71,
481
],
"size": {
"0": 315,
"1": 242
},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 61
},
{
"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": [
95,
110,
136
],
"shape": 3,
"slot_index": 0
},
{
"name": "width",
"type": "INT",
"links": [
88
],
"shape": 3,
"slot_index": 1
},
{
"name": "height",
"type": "INT",
"links": [
89
],
"shape": 3,
"slot_index": 2
}
],
"properties": {
"Node name for S&R": "ImageResizeKJ"
},
"widgets_values": [
576,
1024,
"lanczos",
true,
64,
0,
0
]
},
{ {
"id": 1, "id": 1,
"type": "MimicMotionSampler", "type": "MimicMotionSampler",
...@@ -764,7 +642,7 @@ ...@@ -764,7 +642,7 @@
"1": 314 "1": 314
}, },
"flags": {}, "flags": {},
"order": 12, "order": 9,
"mode": 0, "mode": 0,
"inputs": [ "inputs": [
{ {
...@@ -776,7 +654,7 @@ ...@@ -776,7 +654,7 @@
{ {
"name": "ref_image", "name": "ref_image",
"type": "IMAGE", "type": "IMAGE",
"link": 128, "link": 136,
"slot_index": 1 "slot_index": 1
}, },
{ {
...@@ -790,7 +668,7 @@ ...@@ -790,7 +668,7 @@
"name": "images", "name": "images",
"type": "IMAGE", "type": "IMAGE",
"links": [ "links": [
99 139
], ],
"shape": 3, "shape": 3,
"slot_index": 0 "slot_index": 0
...@@ -803,10 +681,10 @@ ...@@ -803,10 +681,10 @@
25, 25,
2, 2,
2, 2,
123, 42,
"fixed", "fixed",
15, 15,
0.02, 0,
16, 16,
6, 6,
true true
...@@ -878,14 +756,6 @@ ...@@ -878,14 +756,6 @@
0, 0,
"IMAGE" "IMAGE"
], ],
[
99,
1,
0,
17,
2,
"IMAGE"
],
[ [
110, 110,
28, 28,
...@@ -910,14 +780,6 @@ ...@@ -910,14 +780,6 @@
0, 0,
"IMAGE" "IMAGE"
], ],
[
113,
42,
1,
17,
1,
"IMAGE"
],
[ [
114, 114,
42, 42,
...@@ -927,27 +789,35 @@ ...@@ -927,27 +789,35 @@
"IMAGE" "IMAGE"
], ],
[ [
124, 136,
3, 28,
0,
48,
0, 0,
1,
1,
"IMAGE" "IMAGE"
], ],
[ [
125, 137,
48, 35,
0,
49,
0, 0,
17,
1,
"IMAGE" "IMAGE"
], ],
[ [
128, 138,
48, 42,
0,
1, 1,
17,
2,
"IMAGE"
],
[
139,
1, 1,
0,
17,
3,
"IMAGE" "IMAGE"
] ]
], ],
...@@ -955,10 +825,10 @@ ...@@ -955,10 +825,10 @@
"config": {}, "config": {},
"extra": { "extra": {
"ds": { "ds": {
"scale": 0.6830134553650705, "scale": 0.6934334949441352,
"offset": { "offset": {
"0": 839.62744140625, "0": 466.36474609375,
"1": 131.28245544433594 "1": 44.73270034790039
} }
} }
}, },
......
...@@ -110,7 +110,8 @@ class DownloadAndLoadMimicMotionModel: ...@@ -110,7 +110,8 @@ class DownloadAndLoadMimicMotionModel:
pbar.update(1) pbar.update(1)
mimicmotion_models = MimicMotionModel(svd_path, lcm=lcm).to(device=device).eval() mimicmotion_models = MimicMotionModel(svd_path, lcm=lcm).to(device=device).eval()
mimicmotion_models.load_state_dict(comfy.utils.load_torch_file(model_path), strict=False) mimic_motion_sd = comfy.utils.load_torch_file(model_path)
mimicmotion_models.load_state_dict(mimic_motion_sd, strict=False)
if lcm: if lcm:
lcm_noise_scheduler = AnimateLCMSVDStochasticIterativeScheduler( lcm_noise_scheduler = AnimateLCMSVDStochasticIterativeScheduler(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论