diff --git a/workflow/matanyone_with_rembg_anime_for_first_frame.json b/workflow/matanyone_with_rembg_anime_for_first_frame.json new file mode 100644 index 0000000..bf3d715 --- /dev/null +++ b/workflow/matanyone_with_rembg_anime_for_first_frame.json @@ -0,0 +1,824 @@ +{ + "last_node_id": 61, + "last_link_id": 141, + "nodes": [ + { + "id": 57, + "type": "ImageRemoveBackground+", + "pos": [ + 2095.767333984375, + -232.19960021972656 + ], + "size": [ + 327.5999755859375, + 46 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "rembg_session", + "type": "REMBG_SESSION", + "link": 132 + }, + { + "name": "image", + "type": "IMAGE", + "link": 131 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [], + "slot_index": 0 + }, + { + "name": "MASK", + "type": "MASK", + "links": [ + 136, + 140 + ], + "slot_index": 1 + } + ], + "properties": { + "Node name for S&R": "ImageRemoveBackground+" + }, + "color": "#223", + "bgcolor": "#335" + }, + { + "id": 61, + "type": "PreviewImage", + "pos": [ + 2129.94140625, + -84.86492156982422 + ], + "size": [ + 291.8623352050781, + 246 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 141 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "PreviewImage" + }, + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 58, + "type": "RemBGSession+", + "pos": [ + 1870.11572265625, + -232.04246520996094 + ], + "size": [ + 210, + 82 + ], + "flags": { + "collapsed": false + }, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "REMBG_SESSION", + "type": "REMBG_SESSION", + "links": [ + 132 + ] + } + ], + "properties": { + "Node name for S&R": "RemBGSession+" + }, + "widgets_values": [ + "isnet-anime: anime illustrations", + "CUDA" + ], + "color": "#223", + "bgcolor": "#335" + }, + { + "id": 10, + "type": "GetImagesFromBatchIndexed", + "pos": [ + 1863.1431884765625, + -107.56769561767578 + ], + "size": [ + 249.4266815185547, + 76 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 124 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 131 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "GetImagesFromBatchIndexed" + }, + "widgets_values": [ + "0" + ], + "color": "#223", + "bgcolor": "#335" + }, + { + "id": 50, + "type": "Note", + "pos": [ + 1863.9886474609375, + 12.788887977600098 + ], + "size": [ + 248.09019470214844, + 78.03827667236328 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "Extract First Frame to Create Mask\n(if you have your own mask to supply, then replace these nodes with \"Load Image (as Mask)\" Node" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 52, + "type": "LoadImageMask", + "pos": [ + 1862.7899169921875, + 131.81292724609375 + ], + "size": [ + 250.32403564453125, + 106 + ], + "flags": {}, + "order": 2, + "mode": 4, + "inputs": [], + "outputs": [ + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "properties": { + "Node name for S&R": "LoadImageMask" + }, + "widgets_values": [ + "-29uhxfSJXU_7_107to243.mp4", + "alpha", + "image" + ] + }, + { + "id": 60, + "type": "MaskToImage", + "pos": [ + 2130.353759765625, + -144.71340942382812 + ], + "size": [ + 288.6349792480469, + 26 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "mask", + "type": "MASK", + "link": 140 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 141 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "MaskToImage" + }, + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 5, + "type": "MaskToImage", + "pos": [ + 2591.809814453125, + -72.77027130126953 + ], + "size": [ + 282.15380859375, + 26 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "name": "mask", + "type": "MASK", + "link": 113 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 120 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "MaskToImage" + }, + "widgets_values": [], + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 3, + "type": "VHS_LoadVideo", + "pos": [ + 1284.1927490234375, + -304.6094055175781 + ], + "size": [ + 263.345947265625, + 630.1072387695312 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "meta_batch", + "type": "VHS_BatchManager", + "shape": 7, + "link": null + }, + { + "name": "vae", + "type": "VAE", + "shape": 7, + "link": null + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 123 + ], + "slot_index": 0 + }, + { + "name": "frame_count", + "type": "INT", + "links": null + }, + { + "name": "audio", + "type": "AUDIO", + "links": null + }, + { + "name": "video_info", + "type": "VHS_VIDEOINFO", + "links": null + } + ], + "properties": { + "Node name for S&R": "VHS_LoadVideo" + }, + "widgets_values": { + "video": "Professional_Mode_view_from_behind__she_moves_her_ (2).mp4", + "force_rate": 0, + "custom_width": 0, + "custom_height": 0, + "frame_load_cap": 0, + "skip_first_frames": 0, + "select_every_nth": 1, + "format": "AnimateDiff", + "choose video to upload": "image", + "videopreview": { + "hidden": false, + "paused": false, + "params": { + "filename": "Professional_Mode_view_from_behind__she_moves_her_ (2).mp4", + "type": "input", + "format": "video/mp4", + "force_rate": 0, + "custom_width": 0, + "custom_height": 0, + "frame_load_cap": 0, + "skip_first_frames": 0, + "select_every_nth": 1 + } + } + }, + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 49, + "type": "ImageResizeKJ", + "pos": [ + 1559.731201171875, + -304.4844665527344 + ], + "size": [ + 280.9140625, + 238 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 123 + }, + { + "name": "get_image_size", + "type": "IMAGE", + "shape": 7, + "link": null + }, + { + "name": "width_input", + "type": "INT", + "shape": 7, + "widget": { + "name": "width_input" + }, + "link": null + }, + { + "name": "height_input", + "type": "INT", + "shape": 7, + "widget": { + "name": "height_input" + }, + "link": null + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 124, + 126 + ], + "slot_index": 0 + }, + { + "name": "width", + "type": "INT", + "links": null + }, + { + "name": "height", + "type": "INT", + "links": null + } + ], + "properties": { + "Node name for S&R": "ImageResizeKJ" + }, + "widgets_values": [ + 1600, + 1024, + "bilinear", + true, + 2, + 0, + 0, + "disabled" + ], + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 47, + "type": "VHS_VideoCombine", + "pos": [ + 2934.9609375, + -309.9883117675781 + ], + "size": [ + 248.2620849609375, + 633.7461547851562 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 119 + }, + { + "name": "audio", + "type": "AUDIO", + "shape": 7, + "link": null + }, + { + "name": "meta_batch", + "type": "VHS_BatchManager", + "shape": 7, + "link": null + }, + { + "name": "vae", + "type": "VAE", + "shape": 7, + "link": null + } + ], + "outputs": [ + { + "name": "Filenames", + "type": "VHS_FILENAMES", + "links": null + } + ], + "properties": { + "Node name for S&R": "VHS_VideoCombine" + }, + "widgets_values": { + "frame_rate": 30, + "loop_count": 0, + "filename_prefix": "AnimateDiff", + "format": "video/h264-mp4", + "pix_fmt": "yuv420p", + "crf": 19, + "save_metadata": true, + "trim_to_audio": false, + "pingpong": false, + "save_output": true, + "videopreview": { + "hidden": false, + "paused": false, + "params": { + "filename": "AnimateDiff_01580.mp4", + "subfolder": "", + "type": "output", + "format": "video/h264-mp4", + "frame_rate": 30, + "workflow": "AnimateDiff_01580.png", + "fullpath": "E:\\GenerativeAI\\ComfyUI\\output\\AnimateDiff_01580.mp4" + } + } + }, + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 48, + "type": "VHS_VideoCombine", + "pos": [ + 3196.839111328125, + -312.02740478515625 + ], + "size": [ + 248.71827697753906, + 634.3172607421875 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 120 + }, + { + "name": "audio", + "type": "AUDIO", + "shape": 7, + "link": null + }, + { + "name": "meta_batch", + "type": "VHS_BatchManager", + "shape": 7, + "link": null + }, + { + "name": "vae", + "type": "VAE", + "shape": 7, + "link": null + } + ], + "outputs": [ + { + "name": "Filenames", + "type": "VHS_FILENAMES", + "links": null + } + ], + "properties": { + "Node name for S&R": "VHS_VideoCombine" + }, + "widgets_values": { + "frame_rate": 30, + "loop_count": 0, + "filename_prefix": "AnimateDiff", + "format": "video/h264-mp4", + "pix_fmt": "yuv420p", + "crf": 19, + "save_metadata": true, + "trim_to_audio": false, + "pingpong": false, + "save_output": true, + "videopreview": { + "hidden": false, + "paused": false, + "params": { + "filename": "AnimateDiff_01581.mp4", + "subfolder": "", + "type": "output", + "format": "video/h264-mp4", + "frame_rate": 30, + "workflow": "AnimateDiff_01581.png", + "fullpath": "E:\\GenerativeAI\\ComfyUI\\output\\AnimateDiff_01581.mp4" + } + } + }, + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 43, + "type": "MatAnyoneVideoMatting", + "pos": [ + 2492.537109375, + -308.7641296386719 + ], + "size": [ + 380.4000244140625, + 198 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "video_frames", + "type": "IMAGE", + "link": 126 + }, + { + "name": "mask", + "type": "MASK", + "link": 136 + } + ], + "outputs": [ + { + "name": "foreground_frames", + "type": "IMAGE", + "links": [ + 119 + ], + "slot_index": 0 + }, + { + "name": "alpha_frames", + "type": "MASK", + "links": [ + 113 + ], + "slot_index": 1 + } + ], + "properties": { + "Node name for S&R": "MatAnyoneVideoMatting" + }, + "widgets_values": [ + 10, + 10, + 10, + 0, + 255, + 0 + ], + "color": "#322", + "bgcolor": "#533" + } + ], + "links": [ + [ + 113, + 43, + 1, + 5, + 0, + "MASK" + ], + [ + 119, + 43, + 0, + 47, + 0, + "IMAGE" + ], + [ + 120, + 5, + 0, + 48, + 0, + "IMAGE" + ], + [ + 123, + 3, + 0, + 49, + 0, + "IMAGE" + ], + [ + 124, + 49, + 0, + 10, + 0, + "IMAGE" + ], + [ + 126, + 49, + 0, + 43, + 0, + "IMAGE" + ], + [ + 131, + 10, + 0, + 57, + 1, + "IMAGE" + ], + [ + 132, + 58, + 0, + 57, + 0, + "REMBG_SESSION" + ], + [ + 136, + 57, + 1, + 43, + 1, + "MASK" + ], + [ + 140, + 57, + 1, + 60, + 0, + "MASK" + ], + [ + 141, + 60, + 0, + 61, + 0, + "IMAGE" + ] + ], + "groups": [ + { + "id": 1, + "title": "Video Load and Initial Mask Creation", + "bounding": [ + 1262.716552734375, + -390.7190856933594, + 1196.1712646484375, + 728.5146484375 + ], + "color": "#3f789e", + "font_size": 24, + "flags": { + "pinned": true + } + }, + { + "id": 2, + "title": "Process Video Matting", + "bounding": [ + 2474.395263671875, + -392.3843688964844, + 436.1109924316406, + 729.2651977539062 + ], + "color": "#b58b2a", + "font_size": 24, + "flags": { + "pinned": true + } + }, + { + "id": 3, + "title": "Video Combine Results", + "bounding": [ + 2922.43994140625, + -393.0893249511719, + 537.6991577148438, + 729.4254760742188 + ], + "color": "#8A8", + "font_size": 24, + "flags": { + "pinned": true + } + } + ], + "config": {}, + "extra": { + "ds": { + "scale": 0.7627768444385622, + "offset": [ + -1091.7308637134033, + 766.4326940531596 + ] + }, + "node_versions": { + "ComfyUI_essentials": "33ff89fd354d8ec3ab6affb605a79a931b445d99", + "comfy-core": "0.3.18", + "ComfyUI-KJNodes": "ced72635c7725ea9925b1937739ea128ef68f469", + "ComfyUI-VideoHelperSuite": "f7369389620ff244ddd6086cf0fa792a569086f2" + }, + "ue_links": [], + "VHS_latentpreview": false, + "VHS_latentpreviewrate": 0 + }, + "version": 0.4 +} \ No newline at end of file