3 Commits
9 changed files with 2125 additions and 20 deletions
+20 -2
View File
@@ -9,6 +9,9 @@ Two nodes for ComfyUI (face based filtering and batch merge).
## Install
You can install it directly from the manager.
Otherwise, manually:
1) Install the node manually by going to `ComfyUI/custom_nodes/` and running `git clone git@github.com:Kidev/ComfyUI-FaceFilter.git`
2) Install Python deps: `pip install -r ComfyUI-FaceFilter/requirements.txt`
@@ -36,7 +39,7 @@ This only ensures the two model folders exist and prints where to drop packs.
* `ref_images` (IMAGE) reference images that define the target identity set
* `candidate_images` (IMAGE) images to test and filter
* `threshold` (FLOAT) cosine similarity threshold (default `0.30`)
* `on_empty_matching` (CHOICE) behavior when matching is empty (`return_empty` or `black_51`2 or `pass_through`)
* `on_empty_matching` (CHOICE) behavior when matching is empty (`black_512` or `return_empty` or `pass_through`)
* `on_empty_rejected` (CHOICE) behavior when rejected is empty (same choices)
* `debug` (BOOLEAN) return a debug string with counts and scores
* `model_name` (CHOICE) an auto discovered InsightFace pack name (example `antelopev2`)
@@ -75,6 +78,13 @@ This only ensures the two model folders exist and prints where to drop packs.
* If both valid pick according to `prefer`
## Examples
### Required nodes well installed to use the example workflows
- [FaceFilter](https://github.com/Kidev/ComfyUI-FaceFilter) (of course)
- [ReActor](https://github.com/Gourieff/ComfyUI-ReActor)
- [Facetools](https://github.com/dchatel/comfyui_facetools)
- [VideoHelperSuite](https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite) (only for video workflow)
### A simple filter
Workflow avaiable here: ([FaceFilter-simple.json](https://raw.githubusercontent.com/Kidev/ComfyUI-FaceFilter/refs/heads/main/examples/FaceFilter-simple.json))
@@ -84,11 +94,19 @@ A simple usage of the FaceFilter node: the images in the candidates that have pi
### Face matching faceswap using FaceFilter and [ReActor](https://github.com/Gourieff/comfyui-reactor)
Workflow avaiable here: ([FaceFilter-Faceswap.json](https://raw.githubusercontent.com/Kidev/ComfyUI-FaceFilter/refs/heads/main/examples/FaceFilter-Faceswap.json))
Workflow avaiable here:
- Picture to picture: ([FaceFilter-Faceswap.json](https://raw.githubusercontent.com/Kidev/ComfyUI-FaceFilter/refs/heads/main/examples/FaceFilter-Faceswap.json))
- Video to video: ([FaceFilter-Faceswap-Video.json](https://raw.githubusercontent.com/Kidev/ComfyUI-FaceFilter/refs/heads/main/examples/FaceFilter-Faceswap-Video.json))
A simple faceswap tool that will swap the faces of particular persons with another. It does not uses indices or face position, only the face of the target using the FaceFilter node.
![FaceFilter-Faceswap](https://raw.githubusercontent.com/Kidev/ComfyUI-FaceFilter/refs/heads/main/examples/FaceFilter-Faceswap.png)
Here is a view of the most important blocks in the architecture:
![FaceFilter-previews](https://raw.githubusercontent.com/Kidev/ComfyUI-FaceFilter/refs/heads/main/examples/FaceFilter-clean.png)
Here is a simplified view for you to see the evolution of the image batches across all the nodes and understand the logic:
![FaceFilter-previews](https://raw.githubusercontent.com/Kidev/ComfyUI-FaceFilter/refs/heads/main/examples/FaceFilter-previews.png)
## Performance tips
* Use `providers=auto(cuda+cpu)` on machines with CUDA
+1 -1
View File
@@ -1,6 +1,6 @@
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
__version__ = "1.0.0"
__version__ = "1.0.2"
NODE_CLASS_MAPPINGS = NODE_CLASS_MAPPINGS
NODE_DISPLAY_NAME_MAPPINGS = NODE_DISPLAY_NAME_MAPPINGS
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -47,7 +47,7 @@
}
},
"widgets_values": [
"2025-10-03_15-00.png",
"",
"image"
]
},
@@ -94,7 +94,7 @@
}
},
"widgets_values": [
"2025-10-03_15-06.png",
"",
"image"
]
},
@@ -141,7 +141,7 @@
}
},
"widgets_values": [
"2025-10-03_15-11.png",
"",
"image"
]
},
@@ -188,7 +188,7 @@
}
},
"widgets_values": [
"2025-10-03_15-01_1.png",
"",
"image"
]
},
@@ -239,7 +239,7 @@
}
},
"widgets_values": [
"2025-10-03_15-16.png",
"",
"image"
]
},
@@ -1863,4 +1863,4 @@
"VHS_KeepIntermediate": true
},
"version": 0.4
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

+8 -8
View File
@@ -189,7 +189,7 @@
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"2025-10-03_16-23.png",
"",
"image"
]
},
@@ -228,7 +228,7 @@
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"2025-10-03_15-00.png",
"",
"image"
]
},
@@ -267,7 +267,7 @@
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"2025-10-03_15-01_1.png",
"",
"image"
]
},
@@ -306,7 +306,7 @@
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"2025-10-03_16-10.png",
"",
"image"
]
},
@@ -345,7 +345,7 @@
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"2025-10-03_15-06.png",
"",
"image"
]
},
@@ -384,7 +384,7 @@
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"2025-10-03_15-16.png",
"",
"image"
]
},
@@ -549,7 +549,7 @@
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"2025-10-03_16-34.png",
"",
"image"
]
}
@@ -735,4 +735,4 @@
"VHS_KeepIntermediate": true
},
"version": 0.4
}
}
+2 -2
View File
@@ -1,8 +1,8 @@
from face_filter_node import (
from .face_filter_node import (
NODE_CLASS_MAPPINGS as FF_CLASSES,
NODE_DISPLAY_NAME_MAPPINGS as FF_NAMES,
)
from merge_batches_node import (
from .merge_batches_node import (
NODE_CLASS_MAPPINGS as MB_CLASSES,
NODE_DISPLAY_NAME_MAPPINGS as MB_NAMES,
)
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "comfyui-facefilter"
version = "1.0.0"
version = "1.0.2"
description = "ComfyUI nodes for face based filtering plus image batch merging"
readme = "README.md"
requires-python = ">=3.10"