Face Fix - Create Cropped Face Video
The Bridge That Hands Your Face Fix to LTX Video
- face_video_512
- face_fix_context
- video_info
- cropped_face_video_path
- face_fix_context
- fps
- frame_count
Faces are where AI video falls apart - bodies hold, expressions morph. The fix pattern that actually works with LTX is to crop the face region, regenerate it at a stable size, and composite it back. VRGDGFaceFixCreateCropVideo is the bridge node in that pipeline: it takes the prepared 512×512 face frames from the "Prepare Video and Anchors" stage and encodes them into a silent MP4 that LTX's "Load Video (Path)" node can consume for the face-refinement pass.
It's not glamorous and it does one thing, but it's the hinge the whole face-fix workflow swings on - the source's description is exactly: "Writes the prepared 512px face sequence to a silent MP4 for LTX Load Video (Path)."
Mechanically it writes each frame as a PNG, then shells out to FFmpeg to encode them at your chosen FPS into face_video_512.mp4 with libx264, crf 10, yuv420p, and faststart flags - high quality, no audio track, wide compatibility. If FFmpeg isn't on PATH it tries imageio_ffmpeg's bundled binary, and errors out with a clear message if neither is available.
The inputs that matter
- face_video_512 - the IMAGE frames (from Prepare Video and Anchors). They're expected to be 512×512; the node resizes with Lanczos if they're not, and raises a clear error if the batch is empty.
- face_fix_context - the
VRGDG_FACE_FIX_CONTEXTfrom your current Face Fix branch. It carries the job id, so the video lands in the right unique job folder instead of colliding with other runs. - fallback_fps - 24 default, used only when
video_infoisn't connected. The tooltip is blunt: it must match the source video or repaired motion/audio timing drifts. - video_info (optional) - connect VHS Load Video's
video_infooutput. The node readsloaded_fps/source_fpsfrom it so the cropped face video matches the original timing automatically. Connect it whenever possible - that's the difference between "it works" and "it's in sync."
Outputs: cropped_face_video_path (the MP4 path, for Collect LTX Inputs), an updated face_fix_context, plus fps and frame_count for downstream sanity checks.
How it fits the workflow
Face fix in LTX is a two-branch pipeline: the main video branch, and a face branch that crops, regenerates, and re-encodes just the face at a consistent size. This node sits at the end of the prep half of the face branch - after the crop and before the LTX face regeneration that takes the video by path. That's why it's the bridge: everything before it is tensor work, everything after it is file-path work.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
Or search vrgamedev in ComfyUI Manager. It needs FFmpeg available (system install or the imageio-ffmpeg that ships with the pack's requirements) plus opencv-python for the resize/encode helpers - both covered by the pack requirements.
Common issues
- "FFmpeg is required..." error: no system ffmpeg and no imageio-ffmpeg.
pip install imageio-ffmpegor install ffmpeg for your OS. - Drift between face and main video: you didn't connect
video_info, so the fallback FPS didn't match the source. Connect it. - Wrong job folder / overwritten video: the
face_fix_contextcarries the job id; if you're not feeding it from the current Prepare/Meta Batch branch, videos can land in the wrong folder. Follow the connection in the workflow. - Empty batch error: you wired the wrong output into
face_video_512.
Honest review: it's a purpose-built pipe fitting, and it does exactly what it says. If you're hand-building a face-fix workflow without the pack's surrounding nodes, you don't need this - you'd call ffmpeg yourself. But inside VRGameDevGirl's pipeline, it's the correct, in-graph way to get a stable, correctly-timed face video into LTX, and it saves you from reinventing the same five commands.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| face_video_512 | IMAGE | Connect Prepare Video and Anchors: face_video_512. These frames are encoded into the silent 512×512 MP4 consumed by LTX Load Video (Path). | |
| face_fix_context | VRGDG_FACE_FIX_CONTEXT | Connect a Face Fix context from the current Prepare/Meta Batch branch so the video is saved inside the correct unique job folder. | |
| fallback_fps | FLOAT | 24.0001–240 | Frame rate used only when video_info is not connected or has no valid FPS. It must match the source video or repaired motion/audio timing will drift. Connect video_info whenever possible. |
| video_infoopt | VHS_VIDEOINFO | Recommended: connect VHS Load Video's video_info output. The node automatically reads loaded_fps/source_fps so the cropped face video matches the original timing. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| cropped_face_video_path | STRING | — |
| face_fix_context | VRGDG_FACE_FIX_CONTEXT | — |
| fps | FLOAT | — |
| frame_count | INT | — |