RekogniFlow π Face Compare
Does this face actually look like them? AWS Rekognition, minus the AWS headache
- image_source
- image_target
- similarity_score
- detail_json
You've got a reference photo of a face, you've rendered twenty candidates, and now you want an actual number for "how close is this to the person?" That's the entire job of RekogniFlow_FaceCompare. It's the measurement half of a face-consistency workflow - the thing you run after generation, not the thing that steers it.
If you're used to IP-Adapter FaceID or InstantID, those generate a likeness by conditioning the sampler. This node does the opposite: it takes two finished images and asks a face-recognition model how similar they are. Same obsession with identity, completely different side of the pipe. Most of the ecosystem's likeness tooling (InsightFace ArcFace embeddings, deepface, CompreFace) wants to live outside ComfyUI; this one is a node that calls AWS Rekognition and hands you a clean 0.0β100.0 score.
How it works
The node packs both images into JPEG bytes (compressing at your chosen image_quality, and auto-shrinking anything over AWS's 4096px / 5MB limits) and fires them at Rekognition's CompareFaces API. Rekognition detects the faces, embeds them, and returns a similarity percentage plus bounding boxes and confidence values. The node takes the highest-scoring match, hands you the number, and stashes the raw response in detail_json so you can see exactly what it saw.
The name is not a lie: this genuinely calls AWS - it needs an account, network access, and an API key. But there's no GPU cost and no model download, which is the real pitch for it.
The inputs that matter
Only two of these are yours to think about:
image_source- your reference face. This is the "who" you're comparing against.image_target- the image you're checking. Either will accept a batch tensor and just use the first frame.
Then two knobs:
face_match_threshold(default 80) - the minimum score Rekognition has to hit before it even reports a match. Below it you getNO_MATCH. It doesn't clamp the score; it just decides whether a match "counts."image_quality(default 95, 50β100) - JPEG quality sent to AWS. Lower it to cut upload size; 95 is fine.
The three aws_* fields stay blank - credentials load from a .env file, see below.
Outputs
similarity_score(FLOAT) - the number, full precision. Feed it into the pack'sRekogniFlow_ScoreDisplayto get a readable "98.4% - EXCELLENT" label, or wire it into any FLOAT slot.detail_json(STRING) - bounding boxes, per-face confidence, total matches, and thestatusfield. This is your debugging window.
Installing
Through ComfyUI Manager, search comfyui-rekogniflow. Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/Aiconomist/comfyui-rekogniflow
cd comfyui-rekogniflow
pip install -r requirements.txt
Dependencies are just boto3, botocore, Pillow and numpy - nothing heavy, no model files. Then credentials:
cp .env.example .env
# fill in AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION (default eu-west-1)
Create an IAM user with the AmazonRekognitionReadOnlyAccess policy and an access key. Restart ComfyUI and you'll find it under RekogniFlow (or image/face/aws).
Gotchas
Where people get burned: the .env file lives inside the custom_nodes/comfyui-rekogniflow folder, not your ComfyUI root - put it in the wrong place and the node silently falls back to your machine's AWS credentials, which probably don't exist. And this is a paid cloud call: 1,000/month free for your first year, then about a cent per comparison. You're also sending face images to AWS, which matters if privacy is your thing. If something fails, you won't get a crash - you'll get similarity_score: 0.0 and an AWS_ERROR code sitting in detail_json. That JSON is the first place to look, every time.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image_source | IMAGE | β | |
| image_target | IMAGE | β | |
| aws_region | STRING | β | |
| aws_access_key | STRING | β | |
| aws_secret_key | STRING | β | |
| face_match_thresholdopt | FLOAT | 80.00β100 | β |
| image_qualityopt | INT | 9550β100 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| similarity_score | FLOAT | β |
| detail_json | STRING | β |