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.
SameFace Measure
- before
- after
- before_mask
- after_mask
- drift
- report
- similarity_median
- affine_median
- before_mask
- after_mask
- points
◄earstrue►
CategorySameFace
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| before | IMAGE | The image before the edit. | |
| after | IMAGE | The edited image, or a batch of them. | |
| ears | BOOLEAN | true | Count the points on the ears as well as the face. |
| before_maskopt | MASK | A 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_maskopt | MASK | A face mask for the after, as for the before: one mask, or one per after. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| drift | SAMEFACE_DRIFT | Everything measured: for Repair, and for the nodes that draw it. |
| report | STRING | The figures in words. |
| similarity_median | FLOAT | Median drift after a similarity fit, % of face size (first pair). |
| affine_median | FLOAT | Median drift after an affine fit, % of face size (first pair). |
| before_mask | MASK | The face mask on the before image. |
| after_mask | MASK | The face mask on the after image. |
| points | STRING | Every 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. |