ComfyUI Node
VR Face Rectify
Undistort VR faces for swapping. For each VR180-SBS frame, detects faces in each eye, selects the target face(s) (ReActor-style order/index/gender), and rectifies each selected face to a flat patch a face swapper can handle. Outputs the patch batch (feed to ReActor) and a VR_RECTIFY_MAP for un-rectify. Selection happens HERE, at the frame level, where ranking ("largest", "rightmost") is meaningful -- ReActor only ever sees one-face patches, so its own order/index options can't isolate a character once we've sliced. Defaults ('0' / 'large-small') emit just the dominant face per eye: the usual one-character-per-job case. A wired OPTIONS input overrides the widgets.
VR Face Rectify
- image
- options
- patches
- rectify_map
- count
◄input_layout▾►
◄projection▾►
◄patch_fov80►
◄patch_size768►
◄fisheye_fov135►
◄input_faces_orderlarge-small►
◄input_faces_index0►
◄detect_gender_inputno►
CategoryStash/VR
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | VR180-SBS frame(s); a batch is allowed | |
| input_layoutopt | COMBO | mono = whole frame is one eye (per-eye pipelines); sbs = left|right halves; tb = top|bottom halves | |
| projectionopt | COMBO | Source VR projection of each eye | |
| patch_fovopt | INT | 8020–150 | Field of view (deg) of the flat patch; ~75-80 suits ReActor |
| patch_sizeopt | INT | 768128–2048 | Square patch edge in pixels |
| fisheye_fovopt | FLOAT | 13590–220 | Full fisheye FOV (deg); only used for fisheye projection |
| input_faces_orderopt | COMBO | large-small | How to rank faces in each eye before picking by index (matches ReActor). Ignored if an OPTIONS input is wired. |
| input_faces_indexopt | STRING | 0 | Which ranked face(s) to swap: "0" (default = dominant face), "0,1", or "all". Selection is frame-level -> one patch per selected face. Ignored if an OPTIONS input is wired. |
| detect_gender_inputopt | COMBO | no | Only rectify faces of this gender (insightface). "no" = any. Ignored if an OPTIONS input is wired. |
| optionsopt | OPTIONS | Optional ReActor-compatible OPTIONS dict; when wired it overrides the three selection widgets above. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| patches | IMAGE | — |
| rectify_map | VR_RECTIFY_MAP | — |
| count | INT | — |