{ "id": "249e56fe-2377-4f0d-9f2a-059c81497ab7", "revision": 0, "last_node_id": 122, "last_link_id": 241, "nodes": [ { "id": 104, "type": "FaceFilterNode", "pos": [ 1560, -3480 ], "size": [ 240, 360 ], "flags": {}, "order": 20, "mode": 0, "inputs": [ { "name": "ref_images", "type": "IMAGE", "link": 223 }, { "name": "candidate_images", "type": "IMAGE", "link": 224 } ], "outputs": [ { "name": "MATCHING", "type": "IMAGE", "links": [ 225 ] }, { "name": "REJECTED", "type": "IMAGE", "links": null }, { "name": "DEBUG", "type": "STRING", "links": [] } ], "properties": { "cnr_id": "comfyui-facefilter", "ver": "eea179ed67e06bc0e702dbbcde3e3a8f8a7d7c4a", "Node name for S&R": "FaceFilterNode", "aux_id": "Kidev/ComfyUI-FaceFilter", "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": [ 0.3, "black_512", "black_512", false, "antelopev2", "auto(cuda+cpu)", 256, "fit_min_side" ] }, { "id": 103, "type": "FaceFilterNode", "pos": [ 1560, -3900 ], "size": [ 240, 360 ], "flags": {}, "order": 19, "mode": 0, "inputs": [ { "name": "ref_images", "type": "IMAGE", "link": 219 }, { "name": "candidate_images", "type": "IMAGE", "link": 220 } ], "outputs": [ { "name": "MATCHING", "type": "IMAGE", "links": [ 221 ] }, { "name": "REJECTED", "type": "IMAGE", "links": null }, { "name": "DEBUG", "type": "STRING", "links": null } ], "properties": { "cnr_id": "comfyui-facefilter", "ver": "eea179ed67e06bc0e702dbbcde3e3a8f8a7d7c4a", "Node name for S&R": "FaceFilterNode", "aux_id": "Kidev/ComfyUI-FaceFilter", "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": [ 0.3, "black_512", "black_512", false, "antelopev2", "auto(cuda+cpu)", 256, "fit_min_side" ] }, { "id": 80, "type": "ImageBatch", "pos": [ 2160, -3660 ], "size": [ 140, 46 ], "flags": {}, "order": 26, "mode": 0, "inputs": [ { "name": "image1", "type": "IMAGE", "link": 161 }, { "name": "image2", "type": "IMAGE", "link": 162 } ], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 188 ] } ], "properties": { "cnr_id": "comfy-core", "ver": "0.3.59", "Node name for S&R": "ImageBatch", "ue_properties": { "widget_ue_connectable": {}, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [] }, { "id": 96, "type": "FaceFilterNode", "pos": [ 1560, -3000 ], "size": [ 240, 360 ], "flags": {}, "order": 18, "mode": 0, "inputs": [ { "name": "ref_images", "type": "IMAGE", "link": 210 }, { "name": "candidate_images", "type": "IMAGE", "link": 202 } ], "outputs": [ { "name": "MATCHING", "type": "IMAGE", "links": [ 201 ] }, { "name": "REJECTED", "type": "IMAGE", "links": null }, { "name": "DEBUG", "type": "STRING", "links": null } ], "properties": { "cnr_id": "comfyui-facefilter", "ver": "eea179ed67e06bc0e702dbbcde3e3a8f8a7d7c4a", "Node name for S&R": "FaceFilterNode", "aux_id": "Kidev/ComfyUI-FaceFilter", "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": [ 0.3, "black_512", "black_512", false, "antelopev2", "auto(cuda+cpu)", 256, "fit_min_side" ] }, { "id": 28, "type": "ImageFromBatch", "pos": [ 1200, -3000 ], "size": [ 270, 82 ], "flags": {}, "order": 15, "mode": 0, "inputs": [ { "name": "image", "type": "IMAGE", "link": 56 } ], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 202, 220 ] } ], "properties": { "cnr_id": "comfy-core", "ver": "0.3.59", "Node name for S&R": "ImageFromBatch", "ue_properties": { "widget_ue_connectable": { "batch_index": true, "length": true }, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [ 0, 1 ] }, { "id": 61, "type": "ImageFromBatch", "pos": [ 1200, -3180 ], "size": [ 270, 82 ], "flags": {}, "order": 16, "mode": 0, "inputs": [ { "name": "image", "type": "IMAGE", "link": 131 } ], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 224, 228 ] } ], "properties": { "cnr_id": "comfy-core", "ver": "0.3.59", "Node name for S&R": "ImageFromBatch", "ue_properties": { "widget_ue_connectable": { "batch_index": true, "length": true }, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [ 1, 1 ] }, { "id": 105, "type": "FaceFilterNode", "pos": [ 1560, -2580 ], "size": [ 240, 360 ], "flags": {}, "order": 21, "mode": 0, "inputs": [ { "name": "ref_images", "type": "IMAGE", "link": 227 }, { "name": "candidate_images", "type": "IMAGE", "link": 228 } ], "outputs": [ { "name": "MATCHING", "type": "IMAGE", "links": [ 229 ] }, { "name": "REJECTED", "type": "IMAGE", "links": null }, { "name": "DEBUG", "type": "STRING", "links": null } ], "properties": { "cnr_id": "comfyui-facefilter", "ver": "eea179ed67e06bc0e702dbbcde3e3a8f8a7d7c4a", "Node name for S&R": "FaceFilterNode", "aux_id": "Kidev/ComfyUI-FaceFilter", "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": [ 0.3, "black_512", "black_512", false, "antelopev2", "auto(cuda+cpu)", 256, "fit_min_side" ] }, { "id": 77, "type": "ImageBatch", "pos": [ 2160, -2760 ], "size": [ 140, 46 ], "flags": {}, "order": 27, "mode": 0, "inputs": [ { "name": "image1", "type": "IMAGE", "link": 154 }, { "name": "image2", "type": "IMAGE", "link": 187 } ], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 189 ] } ], "properties": { "cnr_id": "comfy-core", "ver": "0.3.59", "Node name for S&R": "ImageBatch", "ue_properties": { "widget_ue_connectable": {}, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [] }, { "id": 109, "type": "Note", "pos": [ 840, -3000 ], "size": [ 210, 88 ], "flags": {}, "order": 0, "mode": 0, "inputs": [], "outputs": [], "properties": { "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": [ "Source face 1:\nWill be swapped with this one (Hank)" ], "color": "#323", "bgcolor": "#535" }, { "id": 110, "type": "Note", "pos": [ 600, -2400 ], "size": [ 210, 88 ], "flags": {}, "order": 1, "mode": 0, "inputs": [], "outputs": [], "properties": { "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": [ "Input face 2:\nThe faces who look like this one (Jesus)" ], "color": "#323", "bgcolor": "#535" }, { "id": 111, "type": "Note", "pos": [ 840, -2400 ], "size": [ 210, 88 ], "flags": {}, "order": 2, "mode": 0, "inputs": [], "outputs": [], "properties": { "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": [ "Source face 2:\nWill be swapped with this one (Mr Bean)" ], "color": "#323", "bgcolor": "#535" }, { "id": 115, "type": "Note", "pos": [ 2160, -3480 ], "size": [ 300, 360 ], "flags": {}, "order": 3, "mode": 0, "inputs": [], "outputs": [], "properties": { "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": [ "After we are done, we have two batches of images: one batch of 2 images from the filters of input 1, and one batch of 2 images from the filters of input 2. Each batch have at least one black image in it, and we want to merge those two batches to create only one batch of 2 images. To do this, we use 'Merge image batches' that will squash the batches together by keeping the images at their current index, but replacing the black squares of one batch by the real images of the other (with X images and 0 black squares):\n|X| |0| |X|\n|0| + |X| = |X|\n\nFinally we send back that batch, with the faceswapped faces, that will get warped back into the input picture, creating the desired output." ], "color": "#432", "bgcolor": "#653" }, { "id": 89, "type": "MergeImageBatches", "pos": [ 2160, -3060 ], "size": [ 270, 78 ], "flags": {}, "order": 28, "mode": 0, "inputs": [ { "name": "batch1", "type": "IMAGE", "link": 188 }, { "name": "batch2", "type": "IMAGE", "link": 189 } ], "outputs": [ { "name": "MERGED", "type": "IMAGE", "links": [ 193 ] } ], "properties": { "cnr_id": "comfyui-facefilter", "ver": "eea179ed67e06bc0e702dbbcde3e3a8f8a7d7c4a", "Node name for S&R": "MergeImageBatches", "aux_id": "Kidev/ComfyUI-FaceFilter", "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": [ "batch1" ] }, { "id": 108, "type": "Note", "pos": [ 600, -3000 ], "size": [ 210, 88 ], "flags": {}, "order": 4, "mode": 0, "inputs": [], "outputs": [], "properties": { "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": [ "Input face 1:\nThe faces who look like this one (Jesus' partner)" ], "color": "#323", "bgcolor": "#535" }, { "id": 13, "type": "WarpFacesBack", "pos": [ 2100, -2100 ], "size": [ 300, 180 ], "flags": {}, "order": 29, "mode": 0, "inputs": [ { "name": "images", "type": "IMAGE", "link": 241 }, { "name": "face", "type": "FACE", "link": 234 }, { "name": "crop", "type": "IMAGE", "link": 193 }, { "name": "mask", "type": "MASK", "link": 91 }, { "name": "warp", "type": "WARP", "link": 17 } ], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 239 ] } ], "properties": { "cnr_id": "comfyui_facetools", "ver": "9292be419adaf6bed05b1fbd449c6a27dcf7b1ee", "Node name for S&R": "WarpFacesBack", "ue_properties": { "widget_ue_connectable": {}, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [] }, { "id": 114, "type": "Note", "pos": [ 1200, -2820 ], "size": [ 300, 300 ], "flags": {}, "order": 5, "mode": 0, "inputs": [], "outputs": [], "properties": { "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": [ "Here, each face from input, after being cropped, is placed in a batch of images. Then each image of that batch is sent to each filter. If it goes through the filter, then it is the right face, and is then faceswapped with the corresponding source. If not, a black square is outputed for the next step." ], "color": "#432", "bgcolor": "#653" }, { "id": 116, "type": "VHS_VideoCombine", "pos": [ 1200, -1740 ], "size": [ 218.8280487060547, 310 ], "flags": {}, "order": 30, "mode": 0, "inputs": [ { "name": "images", "type": "IMAGE", "link": 239 }, { "name": "audio", "shape": 7, "type": "AUDIO", "link": 240 }, { "name": "meta_batch", "shape": 7, "type": "VHS_BatchManager", "link": 236 }, { "name": "vae", "shape": 7, "type": "VAE", "link": null } ], "outputs": [ { "name": "Filenames", "type": "VHS_FILENAMES", "links": null } ], "properties": { "cnr_id": "comfyui-videohelpersuite", "ver": "dabda5423a9df2d17940e619ba9bd6a6344453c7", "Node name for S&R": "VHS_VideoCombine", "ue_properties": { "widget_ue_connectable": { "frame_rate": true, "loop_count": true, "filename_prefix": true, "format": true, "pingpong": true, "save_output": true, "pix_fmt": true, "crf": true, "save_metadata": true }, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": { "frame_rate": 30, "loop_count": 0, "filename_prefix": "swapped_", "format": "video/h265-mp4", "pix_fmt": "yuv420p10le", "crf": 16, "save_metadata": true, "pingpong": false, "save_output": true, "videopreview": { "hidden": true, "paused": false, "params": { "filename": "", "subfolder": "", "type": "output", "format": "video/h265-mp4", "frame_rate": 30, "workflow": "", "fullpath": "" } } } }, { "id": 48, "type": "FeatherMask", "pos": [ 1800, -2100 ], "size": [ 240, 180 ], "flags": {}, "order": 17, "mode": 0, "inputs": [ { "name": "mask", "type": "MASK", "link": 90 } ], "outputs": [ { "name": "MASK", "type": "MASK", "links": [ 91 ] } ], "properties": { "cnr_id": "comfy-core", "ver": "0.3.59", "Node name for S&R": "FeatherMask", "ue_properties": { "widget_ue_connectable": { "left": true, "top": true, "right": true, "bottom": true }, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [ 32, 32, 32, 32 ] }, { "id": 12, "type": "CropFaces", "pos": [ 1500, -2100 ], "size": [ 240, 180 ], "flags": {}, "order": 14, "mode": 0, "inputs": [ { "name": "faces", "type": "FACE", "link": 233 } ], "outputs": [ { "name": "crops", "type": "IMAGE", "links": [ 56, 131 ] }, { "name": "masks", "type": "MASK", "links": [ 90 ] }, { "name": "warps", "type": "WARP", "links": [ 17 ] } ], "title": "CropFaces (inputs)", "properties": { "cnr_id": "comfyui_facetools", "ver": "9292be419adaf6bed05b1fbd449c6a27dcf7b1ee", "Node name for S&R": "CropFaces", "ue_properties": { "widget_ue_connectable": { "crop_size": true, "crop_factor": true, "mask_type": true }, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [ 512, 1.1, "BiSeNet" ] }, { "id": 5, "type": "DetectFaces", "pos": [ 1200, -2100 ], "size": [ 240, 180 ], "flags": {}, "order": 13, "mode": 0, "inputs": [ { "name": "image", "type": "IMAGE", "link": 237 }, { "name": "mask", "shape": 7, "type": "MASK", "link": null } ], "outputs": [ { "name": "faces", "type": "FACE", "links": [ 233, 234 ] } ], "properties": { "cnr_id": "comfyui_facetools", "ver": "9292be419adaf6bed05b1fbd449c6a27dcf7b1ee", "Node name for S&R": "DetectFaces", "ue_properties": { "widget_ue_connectable": { "threshold": true, "min_size": true, "max_size": true }, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [ 0.6, 64, 2048 ] }, { "id": 65, "type": "LoadImage", "pos": [ 600, -2280 ], "size": [ 214.080078125, 326 ], "flags": {}, "order": 6, "mode": 0, "inputs": [], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "slot_index": 0, "links": [ 210, 227 ] }, { "name": "MASK", "type": "MASK", "links": null } ], "title": "Load Image (source 0)", "properties": { "cnr_id": "comfy-core", "ver": "0.3.43", "Node name for S&R": "LoadImage", "ue_properties": { "widget_ue_connectable": {}, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [ "", "image" ] }, { "id": 85, "type": "LoadImage", "pos": [ 840, -2280 ], "size": [ 214.080078125, 326 ], "flags": {}, "order": 7, "mode": 0, "inputs": [], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "slot_index": 0, "links": [ 169, 170 ] }, { "name": "MASK", "type": "MASK", "links": null } ], "title": "Load Image (source 0)", "properties": { "cnr_id": "comfy-core", "ver": "0.3.43", "Node name for S&R": "LoadImage", "ue_properties": { "widget_ue_connectable": {}, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [ "", "image" ] }, { "id": 75, "type": "LoadImage", "pos": [ 600, -2880 ], "size": [ 214.080078125, 326 ], "flags": {}, "order": 8, "mode": 0, "inputs": [], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "slot_index": 0, "links": [ 219, 223 ] }, { "name": "MASK", "type": "MASK", "links": null } ], "title": "Load Image (source 0)", "properties": { "cnr_id": "comfy-core", "ver": "0.3.43", "Node name for S&R": "LoadImage", "ue_properties": { "widget_ue_connectable": {}, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [ "", "image" ] }, { "id": 86, "type": "LoadImage", "pos": [ 840, -2880 ], "size": [ 214.080078125, 326 ], "flags": {}, "order": 9, "mode": 0, "inputs": [], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "slot_index": 0, "links": [ 171, 172 ] }, { "name": "MASK", "type": "MASK", "links": null } ], "title": "Load Image (source 0)", "properties": { "cnr_id": "comfy-core", "ver": "0.3.43", "Node name for S&R": "LoadImage", "ue_properties": { "widget_ue_connectable": {}, "version": "7.1", "input_ue_unconnectable": {} } }, "widgets_values": [ "", "image" ] }, { "id": 59, "type": "ReActorFaceSwap", "pos": [ 1860, -3000 ], "size": [ 240, 360 ], "flags": {}, "order": 22, "mode": 0, "inputs": [ { "name": "input_image", "type": "IMAGE", "link": 201 }, { "name": "source_image", "shape": 7, "type": "IMAGE", "link": 169 }, { "name": "face_model", "shape": 7, "type": "FACE_MODEL", "link": null }, { "name": "face_boost", "shape": 7, "type": "FACE_BOOST", "link": null } ], "outputs": [ { "name": "SWAPPED_IMAGE", "type": "IMAGE", "links": [ 154 ] }, { "name": "FACE_MODEL", "type": "FACE_MODEL", "links": null }, { "name": "ORIGINAL_IMAGE", "type": "IMAGE", "links": null } ], "properties": { "cnr_id": "comfyui-reactor", "ver": "a2ad854a096e8e60967ed3c2a87cc8e79a1f414c", "Node name for S&R": "ReActorFaceSwap", "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": [ true, "inswapper_128.onnx", "retinaface_resnet50", "GPEN-BFR-512.onnx", 1, 0.5, "no", "no", "0", "0", 1 ] }, { "id": 66, "type": "ReActorFaceSwap", "pos": [ 1860, -2580 ], "size": [ 225.287109375, 360 ], "flags": {}, "order": 25, "mode": 0, "inputs": [ { "name": "input_image", "type": "IMAGE", "link": 229 }, { "name": "source_image", "shape": 7, "type": "IMAGE", "link": 170 }, { "name": "face_model", "shape": 7, "type": "FACE_MODEL", "link": null }, { "name": "face_boost", "shape": 7, "type": "FACE_BOOST", "link": null } ], "outputs": [ { "name": "SWAPPED_IMAGE", "type": "IMAGE", "links": [ 187 ] }, { "name": "FACE_MODEL", "type": "FACE_MODEL", "links": null }, { "name": "ORIGINAL_IMAGE", "type": "IMAGE", "links": null } ], "properties": { "cnr_id": "comfyui-reactor", "ver": "a2ad854a096e8e60967ed3c2a87cc8e79a1f414c", "Node name for S&R": "ReActorFaceSwap", "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": [ true, "inswapper_128.onnx", "retinaface_resnet50", "GPEN-BFR-512.onnx", 1, 0.5, "no", "no", "0", "0", 1 ] }, { "id": 79, "type": "ReActorFaceSwap", "pos": [ 1860, -3480 ], "size": [ 240, 360 ], "flags": {}, "order": 24, "mode": 0, "inputs": [ { "name": "input_image", "type": "IMAGE", "link": 225 }, { "name": "source_image", "shape": 7, "type": "IMAGE", "link": 172 }, { "name": "face_model", "shape": 7, "type": "FACE_MODEL", "link": null }, { "name": "face_boost", "shape": 7, "type": "FACE_BOOST", "link": null } ], "outputs": [ { "name": "SWAPPED_IMAGE", "type": "IMAGE", "links": [ 162 ] }, { "name": "FACE_MODEL", "type": "FACE_MODEL", "links": null }, { "name": "ORIGINAL_IMAGE", "type": "IMAGE", "links": null } ], "properties": { "cnr_id": "comfyui-reactor", "ver": "a2ad854a096e8e60967ed3c2a87cc8e79a1f414c", "Node name for S&R": "ReActorFaceSwap", "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": [ true, "inswapper_128.onnx", "retinaface_resnet50", "GPEN-BFR-512.onnx", 1, 0.5, "no", "no", "0", "0", 1 ] }, { "id": 78, "type": "ReActorFaceSwap", "pos": [ 1860, -3900 ], "size": [ 240, 358 ], "flags": {}, "order": 23, "mode": 0, "inputs": [ { "name": "input_image", "type": "IMAGE", "link": 221 }, { "name": "source_image", "shape": 7, "type": "IMAGE", "link": 171 }, { "name": "face_model", "shape": 7, "type": "FACE_MODEL", "link": null }, { "name": "face_boost", "shape": 7, "type": "FACE_BOOST", "link": null } ], "outputs": [ { "name": "SWAPPED_IMAGE", "type": "IMAGE", "links": [ 161 ] }, { "name": "FACE_MODEL", "type": "FACE_MODEL", "links": null }, { "name": "ORIGINAL_IMAGE", "type": "IMAGE", "links": null } ], "properties": { "cnr_id": "comfyui-reactor", "ver": "a2ad854a096e8e60967ed3c2a87cc8e79a1f414c", "Node name for S&R": "ReActorFaceSwap", "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": [ true, "inswapper_128.onnx", "retinaface_resnet50", "GPEN-BFR-512.onnx", 1, 0.5, "no", "no", "0", "0", 1 ] }, { "id": 121, "type": "VHS_LoadVideo", "pos": [ 780, -1780 ], "size": [ 251.5243377685547, 454.51373291015625 ], "flags": {}, "order": 12, "mode": 0, "inputs": [ { "name": "meta_batch", "shape": 7, "type": "VHS_BatchManager", "link": 238 }, { "name": "vae", "shape": 7, "type": "VAE", "link": null } ], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 237, 241 ] }, { "name": "frame_count", "type": "INT", "links": null }, { "name": "audio", "type": "AUDIO", "links": [ 240 ] }, { "name": "video_info", "type": "VHS_VIDEOINFO", "links": null } ], "properties": { "cnr_id": "comfyui-videohelpersuite", "ver": "08e8df15db24da292d4b7f943c460dc2ab442b24", "Node name for S&R": "VHS_LoadVideo", "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": { "video": "", "force_rate": 30, "custom_width": 0, "custom_height": 0, "frame_load_cap": 0, "skip_first_frames": 0, "select_every_nth": 1, "format": "None", "choose video to upload": "image", "videopreview": { "hidden": false, "paused": true, "params": { "filename": "", "type": "input", "format": "video/mp4", "force_rate": 30, "custom_width": 0, "custom_height": 0, "frame_load_cap": 0, "skip_first_frames": 0, "select_every_nth": 1 }, "muted": true } } }, { "id": 120, "type": "VHS_BatchManager", "pos": [ 780, -1280 ], "size": [ 253.3153533935547, 58 ], "flags": {}, "order": 10, "mode": 0, "inputs": [], "outputs": [ { "name": "meta_batch", "type": "VHS_BatchManager", "links": [ 236, 238 ] } ], "properties": { "cnr_id": "comfyui-videohelpersuite", "ver": "08e8df15db24da292d4b7f943c460dc2ab442b24", "Node name for S&R": "VHS_BatchManager", "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": { "frames_per_batch": 1, "count": 2 } }, { "id": 122, "type": "Note", "pos": [ 1620, -1800 ], "size": [ 720, 420 ], "flags": {}, "order": 11, "mode": 0, "inputs": [], "outputs": [], "title": "Pro tips, debug, fixes", "properties": { "ue_properties": { "widget_ue_connectable": {}, "version": "7.2.1", "input_ue_unconnectable": {} } }, "widgets_values": [ "- The result can be quite high quality by using GPEN-BFR-1024 or GPEN-BFR-2048 as face restore models. However I found that GPEN-BFR-2048 can produce less visually pleasing resulsts, and sometimes GPEN-BFR-1024 is just better. Experiment.\n- I recommend testing on images before starting the video render.\n- You may want to tweak the `FeatherMask` values: bigger faces render better with higher values (64-128). - If it fails to find faces, you can tweak the `threshold` in DetectFaces, or the `crop_factor` inside CropFaces. Also, `BiSeNet` seems to be the best mask type, but sometimes others work better (you have to try for your special case).\n- It will also work quite well with low VRAM even on huge images (8k+) because all the work is done after cropping and filtering. For videos here, it will work perfectly as well for huge videos (VR 8K is fine on 8Gb VRAM, though I recommended 30fps otherwise it'll take ages... but if you are patient enough go for it) AS LONG AS YOU set `frames_per_batch` low enough (I use 1 on my RTX 4060 8Gb VRAM).\n- It takes around 1h of work for it to generate 25s of VR 8K video with a two faces to swap (the same, left eye and right eye) but it does NOT OOEM VRAM. For regular RAM, I did not really pay attention because I have 128Gb. But from memory it was fine and not using much at all.\n- You MUST have `onnxruntime` corretly setup, otherwise ReActor won't be able to perform the faceswaps on large faces without the attention improved feature. If you OOEM consistently, that's surely the reason, as ComfyUI will still be useable without it." ], "color": "#432", "bgcolor": "#653" } ], "links": [ [ 17, 12, 2, 13, 4, "WARP" ], [ 56, 12, 0, 28, 0, "IMAGE" ], [ 90, 12, 1, 48, 0, "MASK" ], [ 91, 48, 0, 13, 3, "MASK" ], [ 131, 12, 0, 61, 0, "IMAGE" ], [ 154, 59, 0, 77, 0, "IMAGE" ], [ 161, 78, 0, 80, 0, "IMAGE" ], [ 162, 79, 0, 80, 1, "IMAGE" ], [ 169, 85, 0, 59, 1, "IMAGE" ], [ 170, 85, 0, 66, 1, "IMAGE" ], [ 171, 86, 0, 78, 1, "IMAGE" ], [ 172, 86, 0, 79, 1, "IMAGE" ], [ 187, 66, 0, 77, 1, "IMAGE" ], [ 188, 80, 0, 89, 0, "IMAGE" ], [ 189, 77, 0, 89, 1, "IMAGE" ], [ 193, 89, 0, 13, 2, "IMAGE" ], [ 201, 96, 0, 59, 0, "IMAGE" ], [ 202, 28, 0, 96, 1, "IMAGE" ], [ 210, 65, 0, 96, 0, "IMAGE" ], [ 219, 75, 0, 103, 0, "IMAGE" ], [ 220, 28, 0, 103, 1, "IMAGE" ], [ 221, 103, 0, 78, 0, "IMAGE" ], [ 223, 75, 0, 104, 0, "IMAGE" ], [ 224, 61, 0, 104, 1, "IMAGE" ], [ 225, 104, 0, 79, 0, "IMAGE" ], [ 227, 65, 0, 105, 0, "IMAGE" ], [ 228, 61, 0, 105, 1, "IMAGE" ], [ 229, 105, 0, 66, 0, "IMAGE" ], [ 233, 5, 0, 12, 0, "FACE" ], [ 234, 5, 0, 13, 1, "FACE" ], [ 236, 120, 0, 116, 2, "VHS_BatchManager" ], [ 237, 121, 0, 5, 0, "IMAGE" ], [ 238, 120, 0, 121, 0, "VHS_BatchManager" ], [ 239, 13, 0, 116, 0, "IMAGE" ], [ 240, 121, 2, 116, 1, "AUDIO" ], [ 241, 121, 0, 13, 0, "IMAGE" ] ], "groups": [ { "id": 1, "title": "Face filtering and swapping", "bounding": [ 1140, -3960, 1320, 1800 ], "color": "#b58b2a", "font_size": 24, "flags": {} }, { "id": 2, "title": "Faceswap target 2", "bounding": [ 600, -2460, 480, 540 ], "color": "#8A8", "font_size": 24, "flags": {} }, { "id": 3, "title": "Faceswap target 1", "bounding": [ 600, -3060, 480, 540 ], "color": "#8A8", "font_size": 24, "flags": {} }, { "id": 4, "title": "Faces detection, cropping, masking, warping", "bounding": [ 1140, -2160, 1320, 240 ], "color": "#b58b2a", "font_size": 24, "flags": {} }, { "id": 5, "title": "Input video", "bounding": [ 720, -1860, 360, 660 ], "color": "#8A8", "font_size": 24, "flags": {} }, { "id": 6, "title": "Result video", "bounding": [ 1140, -1860, 340, 660 ], "color": "#8A8", "font_size": 24, "flags": {} } ], "config": {}, "extra": { "ds": { "scale": 0.6115909044841469, "offset": [ 591.141714286603, 3065.1954449859545 ] }, "frontendVersion": "1.27.7", "ue_links": [], "links_added_by_ue": [], "VHS_latentpreview": false, "VHS_latentpreviewrate": 0, "VHS_MetadataImage": true, "VHS_KeepIntermediate": true }, "version": 0.4 }