提交 f7e831d6 authored 作者: kijai's avatar kijai

expose context options

上级 b546cfc3
...@@ -58,84 +58,6 @@ ...@@ -58,84 +58,6 @@
true 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, "id": 35,
"type": "ImageResizeKJ", "type": "ImageResizeKJ",
...@@ -258,7 +180,7 @@ ...@@ -258,7 +180,7 @@
"shape": 3 "shape": 3
}, },
{ {
"name": "17 count", "name": "129 count",
"type": "INT", "type": "INT",
"links": null, "links": null,
"shape": 3 "shape": 3
...@@ -275,10 +197,10 @@ ...@@ -275,10 +197,10 @@
723, 723,
819 819
], ],
"size": [ "size": {
440, "0": 440,
978.6666666666666 "1": 218
], },
"flags": {}, "flags": {},
"order": 11, "order": 11,
"mode": 0, "mode": 0,
...@@ -421,10 +343,10 @@ ...@@ -421,10 +343,10 @@
290, 290,
251 251
], ],
"size": [ "size": {
210, "0": 210,
246 "1": 246
], },
"flags": {}, "flags": {},
"order": 8, "order": 8,
"mode": 0, "mode": 0,
...@@ -451,7 +373,7 @@ ...@@ -451,7 +373,7 @@
"1": 82 "1": 82
}, },
"flags": {}, "flags": {},
"order": 1, "order": 0,
"mode": 0, "mode": 0,
"outputs": [ "outputs": [
{ {
...@@ -478,12 +400,12 @@ ...@@ -478,12 +400,12 @@
281, 281,
104 104
], ],
"size": [ "size": {
293.73750640869093, "0": 293.7375183105469,
101.2688590393065 "1": 101.26885986328125
], },
"flags": {}, "flags": {},
"order": 2, "order": 1,
"mode": 0, "mode": 0,
"properties": { "properties": {
"text": "" "text": ""
...@@ -501,12 +423,12 @@ ...@@ -501,12 +423,12 @@
779, 779,
105 105
], ],
"size": [ "size": {
290.12339111328083, "0": 290.1233825683594,
69.71562744140618 "1": 69.71562957763672
], },
"flags": {}, "flags": {},
"order": 3, "order": 2,
"mode": 0, "mode": 0,
"properties": { "properties": {
"text": "" "text": ""
...@@ -567,16 +489,97 @@ ...@@ -567,16 +489,97 @@
null 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, "id": 16,
"type": "VHS_VideoCombine", "type": "VHS_VideoCombine",
"pos": [ "pos": [
1452, 1482,
196 192
], ],
"size": [ "size": [
1530.494967759278, 1530.4949951171875,
1199.1081290425352 1199.1081452546296
], ],
"flags": {}, "flags": {},
"order": 14, "order": 14,
...@@ -623,7 +626,7 @@ ...@@ -623,7 +626,7 @@
"hidden": false, "hidden": false,
"paused": false, "paused": false,
"params": { "params": {
"filename": "MimicMotion_00001.mp4", "filename": "MimicMotion_00005.mp4",
"subfolder": "", "subfolder": "",
"type": "temp", "type": "temp",
"format": "video/h264-mp4" "format": "video/h264-mp4"
...@@ -631,64 +634,6 @@ ...@@ -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, "id": 3,
"type": "LoadImage", "type": "LoadImage",
...@@ -701,7 +646,7 @@ ...@@ -701,7 +646,7 @@
"1": 410.70074462890625 "1": 410.70074462890625
}, },
"flags": {}, "flags": {},
"order": 4, "order": 3,
"mode": 0, "mode": 0,
"outputs": [ "outputs": [
{ {
...@@ -725,50 +670,29 @@ ...@@ -725,50 +670,29 @@
"Node name for S&R": "LoadImage" "Node name for S&R": "LoadImage"
}, },
"widgets_values": [ "widgets_values": [
"demo1.jpg", "2bc567e9f448176b4e2416ceebf9beab.png",
"image" "image"
] ]
}, },
{ {
"id": 48, "id": 5,
"type": "ImageResizeKJ", "type": "VHS_LoadVideo",
"pos": [ "pos": [
-57, -402,
170 787
], ],
"size": [ "size": [
315, 235.1999969482422,
242 658.5777723524305
], ],
"flags": {}, "flags": {},
"order": 6, "order": 4,
"mode": 0, "mode": 0,
"inputs": [ "inputs": [
{ {
"name": "image", "name": "meta_batch",
"type": "IMAGE", "type": "VHS_BatchManager",
"link": 124
},
{
"name": "get_image_size",
"type": "IMAGE",
"link": null "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": [ "outputs": [
...@@ -776,38 +700,116 @@ ...@@ -776,38 +700,116 @@
"name": "IMAGE", "name": "IMAGE",
"type": "IMAGE", "type": "IMAGE",
"links": [ "links": [
125, 86
128
], ],
"shape": 3, "shape": 3,
"slot_index": 0 "slot_index": 0
}, },
{ {
"name": "width", "name": "frame_count",
"type": "INT", "type": "INT",
"links": [], "links": null,
"shape": 3, "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 "slot_index": 1
}, },
{ {
"name": "height", "name": "pose_images",
"type": "INT", "type": "IMAGE",
"links": [], "link": 92
}
],
"outputs": [
{
"name": "images",
"type": "IMAGE",
"links": [
99
],
"shape": 3, "shape": 3,
"slot_index": 2 "slot_index": 0
} }
], ],
"properties": { "properties": {
"Node name for S&R": "ImageResizeKJ" "Node name for S&R": "MimicMotionSampler"
}, },
"widgets_values": [ "widgets_values": [
224, 25,
224, 2,
"lanczos", 2,
false, 123,
64, "fixed",
0, 15,
0 0.02,
16,
6,
true
] ]
} }
], ],
...@@ -953,10 +955,10 @@ ...@@ -953,10 +955,10 @@
"config": {}, "config": {},
"extra": { "extra": {
"ds": { "ds": {
"scale": 0.5644739300537774, "scale": 0.6830134553650705,
"offset": { "offset": {
"0": 738.7613525390625, "0": 839.62744140625,
"1": 31.221477508544922 "1": 131.28245544433594
} }
} }
}, },
......
...@@ -135,6 +135,8 @@ class MimicMotionSampler: ...@@ -135,6 +135,8 @@ class MimicMotionSampler:
"seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}), "seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}),
"fps": ("INT", {"default": 15, "min": 2, "max": 100, "step": 1}), "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}), "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}), "keep_model_loaded": ("BOOLEAN", {"default": True}),
}, },
} }
...@@ -144,7 +146,7 @@ class MimicMotionSampler: ...@@ -144,7 +146,7 @@ class MimicMotionSampler:
FUNCTION = "process" FUNCTION = "process"
CATEGORY = "MimicMotionWrapper" 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() device = mm.get_torch_device()
offload_device = mm.unet_offload_device() offload_device = mm.unet_offload_device()
mm.unload_all_models() mm.unload_all_models()
...@@ -175,8 +177,8 @@ class MimicMotionSampler: ...@@ -175,8 +177,8 @@ class MimicMotionSampler:
ref_img, ref_img,
image_pose=pose_images, image_pose=pose_images,
num_frames=B, num_frames=B,
tile_size = 16, tile_size = context_size,
tile_overlap= 6, tile_overlap= context_overlap,
height=H, height=H,
width=W, width=W,
fps=fps, fps=fps,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论