Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
ComfyUI-MimicMotionWrapper
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
王骏浩
ComfyUI-MimicMotionWrapper
Commits
f7e831d6
提交
f7e831d6
authored
7月 02, 2024
作者:
kijai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
expose context options
上级
b546cfc3
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
220 行增加
和
216 行删除
+220
-216
mimic_motion_example_02.json
examples/mimic_motion_example_02.json
+215
-213
nodes.py
nodes.py
+5
-3
没有找到文件。
examples/mimic_motion_example_02.json
浏览文件 @
f7e831d6
...
...
@@ -58,84 +58,6 @@
true
]
},
{
"id"
:
5
,
"type"
:
"VHS_LoadVideo"
,
"pos"
:
[
-402
,
787
],
"size"
:
[
235.1999969482422
,
658.5777723524305
],
"flags"
:
{},
"order"
:
0
,
"mode"
:
0
,
"inputs"
:
[
{
"name"
:
"meta_batch"
,
"type"
:
"VHS_BatchManager"
,
"link"
:
null
}
],
"outputs"
:
[
{
"name"
:
"IMAGE"
,
"type"
:
"IMAGE"
,
"links"
:
[
86
],
"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"
:
"pose1.mp4"
,
"force_rate"
:
0
,
"force_size"
:
"Disabled"
,
"custom_width"
:
512
,
"custom_height"
:
512
,
"frame_load_cap"
:
16
,
"skip_first_frames"
:
0
,
"select_every_nth"
:
3
,
"choose video to upload"
:
"image"
,
"videopreview"
:
{
"hidden"
:
false
,
"paused"
:
false
,
"params"
:
{
"frame_load_cap"
:
16
,
"skip_first_frames"
:
0
,
"force_rate"
:
0
,
"filename"
:
"pose1.mp4"
,
"type"
:
"input"
,
"format"
:
"video/mp4"
,
"select_every_nth"
:
3
}
}
}
},
{
"id"
:
35
,
"type"
:
"ImageResizeKJ"
,
...
...
@@ -258,7 +180,7 @@
"shape"
:
3
},
{
"name"
:
"1
7
count"
,
"name"
:
"1
29
count"
,
"type"
:
"INT"
,
"links"
:
null
,
"shape"
:
3
...
...
@@ -275,10 +197,10 @@
723
,
819
],
"size"
:
[
440
,
978.6666666666666
]
,
"size"
:
{
"0"
:
440
,
"1"
:
218
}
,
"flags"
:
{},
"order"
:
11
,
"mode"
:
0
,
...
...
@@ -421,10 +343,10 @@
290
,
251
],
"size"
:
[
210
,
246
]
,
"size"
:
{
"0"
:
210
,
"1"
:
246
}
,
"flags"
:
{},
"order"
:
8
,
"mode"
:
0
,
...
...
@@ -451,7 +373,7 @@
"1"
:
82
},
"flags"
:
{},
"order"
:
1
,
"order"
:
0
,
"mode"
:
0
,
"outputs"
:
[
{
...
...
@@ -478,12 +400,12 @@
281
,
104
],
"size"
:
[
293.73750640869093
,
101.268859039306
5
]
,
"size"
:
{
"0"
:
293.7375183105469
,
"1"
:
101.2688598632812
5
}
,
"flags"
:
{},
"order"
:
2
,
"order"
:
1
,
"mode"
:
0
,
"properties"
:
{
"text"
:
""
...
...
@@ -501,12 +423,12 @@
779
,
105
],
"size"
:
[
290.12339111328083
,
69.71562744140618
]
,
"size"
:
{
"0"
:
290.1233825683594
,
"1"
:
69.71562957763672
}
,
"flags"
:
{},
"order"
:
3
,
"order"
:
2
,
"mode"
:
0
,
"properties"
:
{
"text"
:
""
...
...
@@ -567,16 +489,97 @@
null
]
},
{
"id"
:
48
,
"type"
:
"ImageResizeKJ"
,
"pos"
:
[
-57
,
170
],
"size"
:
{
"0"
:
315
,
"1"
:
242
},
"flags"
:
{},
"order"
:
6
,
"mode"
:
0
,
"inputs"
:
[
{
"name"
:
"image"
,
"type"
:
"IMAGE"
,
"link"
:
124
},
{
"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"
:
[
125
,
128
],
"shape"
:
3
,
"slot_index"
:
0
},
{
"name"
:
"width"
,
"type"
:
"INT"
,
"links"
:
[],
"shape"
:
3
,
"slot_index"
:
1
},
{
"name"
:
"height"
,
"type"
:
"INT"
,
"links"
:
[],
"shape"
:
3
,
"slot_index"
:
2
}
],
"properties"
:
{
"Node name for S&R"
:
"ImageResizeKJ"
},
"widgets_values"
:
[
224
,
224
,
"lanczos"
,
false
,
64
,
0
,
0
]
},
{
"id"
:
16
,
"type"
:
"VHS_VideoCombine"
,
"pos"
:
[
14
5
2
,
19
6
14
8
2
,
19
2
],
"size"
:
[
1530.4949
67759278
,
1199.1081
290425352
1530.4949
951171875
,
1199.1081
452546296
],
"flags"
:
{},
"order"
:
14
,
...
...
@@ -623,7 +626,7 @@
"hidden"
:
false
,
"paused"
:
false
,
"params"
:
{
"filename"
:
"MimicMotion_0000
1
.mp4"
,
"filename"
:
"MimicMotion_0000
5
.mp4"
,
"subfolder"
:
""
,
"type"
:
"temp"
,
"format"
:
"video/h264-mp4"
...
...
@@ -631,64 +634,6 @@
}
}
},
{
"id"
:
1
,
"type"
:
"MimicMotionSampler"
,
"pos"
:
[
1101
,
419
],
"size"
:
{
"0"
:
307.6666259765625
,
"1"
:
290
},
"flags"
:
{},
"order"
:
12
,
"mode"
:
0
,
"inputs"
:
[
{
"name"
:
"mimic_pipeline"
,
"type"
:
"MIMICPIPE"
,
"link"
:
1
,
"slot_index"
:
0
},
{
"name"
:
"ref_image"
,
"type"
:
"IMAGE"
,
"link"
:
128
,
"slot_index"
:
1
},
{
"name"
:
"pose_images"
,
"type"
:
"IMAGE"
,
"link"
:
92
}
],
"outputs"
:
[
{
"name"
:
"images"
,
"type"
:
"IMAGE"
,
"links"
:
[
99
],
"shape"
:
3
,
"slot_index"
:
0
}
],
"properties"
:
{
"Node name for S&R"
:
"MimicMotionSampler"
},
"widgets_values"
:
[
25
,
2
,
2
,
123
,
"fixed"
,
15
,
0.02
,
true
]
},
{
"id"
:
3
,
"type"
:
"LoadImage"
,
...
...
@@ -701,7 +646,7 @@
"1"
:
410.70074462890625
},
"flags"
:
{},
"order"
:
4
,
"order"
:
3
,
"mode"
:
0
,
"outputs"
:
[
{
...
...
@@ -725,50 +670,29 @@
"Node name for S&R"
:
"LoadImage"
},
"widgets_values"
:
[
"
demo1.jp
g"
,
"
2bc567e9f448176b4e2416ceebf9beab.pn
g"
,
"image"
]
},
{
"id"
:
48
,
"type"
:
"
ImageResizeKJ
"
,
"id"
:
5
,
"type"
:
"
VHS_LoadVideo
"
,
"pos"
:
[
-
57
,
170
-
402
,
787
],
"size"
:
[
315
,
242
235.1999969482422
,
658.5777723524305
],
"flags"
:
{},
"order"
:
6
,
"order"
:
4
,
"mode"
:
0
,
"inputs"
:
[
{
"name"
:
"image"
,
"type"
:
"IMAGE"
,
"link"
:
124
},
{
"name"
:
"get_image_size"
,
"type"
:
"IMAGE"
,
"name"
:
"meta_batch"
,
"type"
:
"VHS_BatchManager"
,
"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"
:
[
...
...
@@ -776,38 +700,116 @@
"name"
:
"IMAGE"
,
"type"
:
"IMAGE"
,
"links"
:
[
125
,
128
86
],
"shape"
:
3
,
"slot_index"
:
0
},
{
"name"
:
"
width
"
,
"name"
:
"
frame_count
"
,
"type"
:
"INT"
,
"links"
:
[],
"shape"
:
3
,
"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"
:
"pose1.mp4"
,
"force_rate"
:
0
,
"force_size"
:
"Disabled"
,
"custom_width"
:
512
,
"custom_height"
:
512
,
"frame_load_cap"
:
16
,
"skip_first_frames"
:
0
,
"select_every_nth"
:
3
,
"choose video to upload"
:
"image"
,
"videopreview"
:
{
"hidden"
:
false
,
"paused"
:
false
,
"params"
:
{
"frame_load_cap"
:
16
,
"skip_first_frames"
:
0
,
"force_rate"
:
0
,
"filename"
:
"pose1.mp4"
,
"type"
:
"input"
,
"format"
:
"video/mp4"
,
"select_every_nth"
:
3
}
}
}
},
{
"id"
:
1
,
"type"
:
"MimicMotionSampler"
,
"pos"
:
[
1101
,
419
],
"size"
:
{
"0"
:
307.6666259765625
,
"1"
:
314
},
"flags"
:
{},
"order"
:
12
,
"mode"
:
0
,
"inputs"
:
[
{
"name"
:
"mimic_pipeline"
,
"type"
:
"MIMICPIPE"
,
"link"
:
1
,
"slot_index"
:
0
},
{
"name"
:
"ref_image"
,
"type"
:
"IMAGE"
,
"link"
:
128
,
"slot_index"
:
1
},
{
"name"
:
"height"
,
"type"
:
"INT"
,
"links"
:
[],
"name"
:
"pose_images"
,
"type"
:
"IMAGE"
,
"link"
:
92
}
],
"outputs"
:
[
{
"name"
:
"images"
,
"type"
:
"IMAGE"
,
"links"
:
[
99
],
"shape"
:
3
,
"slot_index"
:
2
"slot_index"
:
0
}
],
"properties"
:
{
"Node name for S&R"
:
"
ImageResizeKJ
"
"Node name for S&R"
:
"
MimicMotionSampler
"
},
"widgets_values"
:
[
224
,
224
,
"lanczos"
,
false
,
64
,
0
,
0
25
,
2
,
2
,
123
,
"fixed"
,
15
,
0.02
,
16
,
6
,
true
]
}
],
...
...
@@ -953,10 +955,10 @@
"config"
:
{},
"extra"
:
{
"ds"
:
{
"scale"
:
0.
5644739300537774
,
"scale"
:
0.
6830134553650705
,
"offset"
:
{
"0"
:
738.761352539
0625
,
"1"
:
31.221477508544922
"0"
:
839.6274414
0625
,
"1"
:
131.28245544433594
}
}
},
...
...
nodes.py
浏览文件 @
f7e831d6
...
...
@@ -135,6 +135,8 @@ class MimicMotionSampler:
"seed"
:
(
"INT"
,
{
"default"
:
0
,
"min"
:
0
,
"max"
:
0xffffffffffffffff
}),
"fps"
:
(
"INT"
,
{
"default"
:
15
,
"min"
:
2
,
"max"
:
100
,
"step"
:
1
}),
"noise_aug_strength"
:
(
"FLOAT"
,
{
"default"
:
0.0
,
"min"
:
0.0
,
"max"
:
10.0
,
"step"
:
0.01
}),
"context_size"
:
(
"INT"
,
{
"default"
:
16
,
"min"
:
1
,
"max"
:
128
,
"step"
:
1
}),
"context_overlap"
:
(
"INT"
,
{
"default"
:
6
,
"min"
:
1
,
"max"
:
128
,
"step"
:
1
}),
"keep_model_loaded"
:
(
"BOOLEAN"
,
{
"default"
:
True
}),
},
}
...
...
@@ -144,7 +146,7 @@ class MimicMotionSampler:
FUNCTION
=
"process"
CATEGORY
=
"MimicMotionWrapper"
def
process
(
self
,
mimic_pipeline
,
ref_image
,
pose_images
,
cfg_min
,
cfg_max
,
steps
,
seed
,
noise_aug_strength
,
fps
,
keep_model_loaded
):
def
process
(
self
,
mimic_pipeline
,
ref_image
,
pose_images
,
cfg_min
,
cfg_max
,
steps
,
seed
,
noise_aug_strength
,
fps
,
keep_model_loaded
,
context_size
,
context_overlap
):
device
=
mm
.
get_torch_device
()
offload_device
=
mm
.
unet_offload_device
()
mm
.
unload_all_models
()
...
...
@@ -175,8 +177,8 @@ class MimicMotionSampler:
ref_img
,
image_pose
=
pose_images
,
num_frames
=
B
,
tile_size
=
16
,
tile_overlap
=
6
,
tile_size
=
context_size
,
tile_overlap
=
context_overlap
,
height
=
H
,
width
=
W
,
fps
=
fps
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论