Nodes/SameFace/SameFace Measure
ComfyUI Node

SameFace Measure

How far an edit moved the face: where every part of the before face went in the after (RAFT optical flow inside a Grounded SAM 2 face mask), with the move, scale and turn of the whole face taken out. What is left is drift, as % of face size.

By fixed-42·Created 7 days ago·Updated 2 days ago· 8
SameFace Measure
  • before
  • after
  • before_mask
  • after_mask
  • drift
  • report
  • similarity_median
  • affine_median
  • before_mask
  • after_mask
  • points
◄earstrue►
CategorySameFace

Inputs (5)

NameTypeDefaultDescription
beforeIMAGEThe image before the edit.
afterIMAGEThe edited image, or a batch of them.
earsBOOLEANtrueCount the points on the ears as well as the face.
before_maskoptMASKA face mask for the before, in place of the one found here - from SameFace Face Mask to choose one of several people, or any other node. All of it is measured as face. One mask, or one per image.
after_maskoptMASKA face mask for the after, as for the before: one mask, or one per after.

Outputs (7)

NameTypeDescription
driftSAMEFACE_DRIFTEverything measured: for Repair, and for the nodes that draw it.
reportSTRINGThe figures in words.
similarity_medianFLOATMedian drift after a similarity fit, % of face size (first pair).
affine_medianFLOATMedian drift after an affine fit, % of face size (first pair).
before_maskMASKThe face mask on the before image.
after_maskMASKThe face mask on the after image.
pointsSTRINGEvery measured point as JSON, one list per column: where it is on the before (x, y, pixels), how far each fit leaves it (dx, dy in pixels; drift in % of face size), confidence and part. A pair column numbers the pairs in a batch.