Nodes/comfyui-rekogniflow/RekogniFlow πŸ” Face Compare
ComfyUI Node

RekogniFlow πŸ” Face Compare

Does this face actually look like them? AWS Rekognition, minus the AWS headache

By AiconomistΒ·Created 5 months agoΒ·Updated 5 months agoΒ· 7
RekogniFlow πŸ” Face Compare
  • image_source
  • image_target
  • similarity_score
  • detail_json
β—„aws_regionβ–Ί
β—„aws_access_keyβ–Ί
β—„aws_secret_keyβ–Ί
β—„face_match_threshold80.0β–Ί
β—„image_quality95β–Ί

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 get NO_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's RekogniFlow_ScoreDisplay to 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 the status field. 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.

CategoryRekogniFlow

Inputs (7)

NameTypeDefaultDescription
image_sourceIMAGEβ€”
image_targetIMAGEβ€”
aws_regionSTRINGβ€”
aws_access_keySTRINGβ€”
aws_secret_keySTRINGβ€”
face_match_thresholdoptFLOAT80.00–100β€”
image_qualityoptINT9550–100β€”

Outputs (2)

NameTypeDescription
similarity_scoreFLOATβ€”
detail_jsonSTRINGβ€”