Adaptive ReActor Face Swapper
An adaptive ComfyUI video face-swapping workflow that uses ReActor, Florence-2, frame-similarity caching, and true lazy branch selection to process easy and difficult frames differently.
Instead of applying expensive facial masking to every frame, the workflow analyzes frame difficulty and selects one of two processing paths:
Easy frames: ReActor face swap only
Hard frames: ReActor face swap with ReActor Mask Helper
Hard frames may include open mouths, visible tongues, hands or fingers near the face, facial obstructions, strong profile angles, or other situations where a basic face swap may blend poorly.
Main features
Adaptive per-frame quality routing
ReActor face swapping
ReActor Mask Helper for difficult frames
Florence-2 frame descriptions
Frame-similarity caching
Reuses decisions for visually similar frames
True lazy branch execution
Sequential video processing
Support for long videos through VHS meta-batching
Optional Flux FaceDetailer section
Low-VRAM guidance
Built-in instructions and troubleshooting notes
H.264 MP4 video output
How it works
The original video frame is sent to the AI Quality Controller.
The controller compares the current frame with the previous frame:
Similar frames reuse the previous Florence description and hard/easy decision.
Significantly changed frames are described again and receive a new decision.
The decision is sent to a lazy image selector:
False / Easyselects the ReActor-only result.True / Hardselects the ReActor + Mask Helper result.
Only the selected processing branch should execute.
Required companion workflow
This workflow uses a saved ReActor face model.
A separate Face Model Compiler is provided for building a compatible .safetensors face model from either:
image folders
a source video with sampled frames
Place the resulting face model in:
"ComfyUI/models/reactor/faces/"
Then select it through the included ReActor Load Face Model node.
Required custom nodes
The workflow uses nodes from packages including:
ComfyUI-ReActor
ComfyUI Video Helper Suite
Florence-2 nodes
ComfyUI Impact Pack / Impact Subpack
ComfyUI-GGUF for the optional FaceDetailer path
Frame Similarity Cache and Lazy Image Selector companion nodes
Use ComfyUI Manager to install missing nodes where available.
Required models
Depending on the enabled sections, you may need:
inswapper_128.onnxRetinaFace face detector
GFPGAN or another supported face-restoration model
Florence-2 model
SAM model for ReActor Mask Helper
saved ReActor face model
optional Flux, CLIP, VAE, and YOLO face detector for FaceDetailer
Important settings
Keep:
"frames_per_batch = 1"
The similarity cache compares frames sequentially and is not designed for multiple frames per meta-batch.
Match the Video Combine frame rate to the source video.
For lower-VRAM GPUs, begin with an input width of approximately 512–640.
Important preview warning
ComfyUI Preview Image nodes are output nodes.
Enabling a preview connected directly to either processing branch can force that branch to execute, defeating lazy routing.
During normal rendering, keep these previews disabled:
ReActor-only result
Mask Helper result
swapped-face preview
FaceDetailer preview
The final lazy selector should be the only processed-image output connected to the active Video Combine node.
Starting a different video
The frame-similarity cache may persist while ComfyUI remains open.
Before processing a different source video:
restart ComfyUI, or
reset the cache once and return the reset control to its normal state
This prevents the first frames of a new video from reusing a decision from the previous video.
Performance expectations
Processing speed depends heavily on the selected branch.
Easy frames should remain close to normal ReActor processing time.
Hard frames will take longer because Mask Helper performs face detection, segmentation, and blending.
FaceDetailer adds substantial additional processing time.
Optional FaceDetailer
The included FaceDetailer section is disabled by default.
It can improve small or compressed faces, but it may increase render time and cause identity drift if denoise is too high.
Recommended starting values:
Steps: 4-8
Denoise: 0.10-0.15
Seed: Fixed for video
Guide size: 384-512
Recommended use
This workflow is best suited for videos containing a mixture of:
normal front-facing frames
mouth movement
profile changes
hands near the face
partial facial obstruction
varying expressions
Limitations
The AI controller relies on Florence-2 descriptions and keyword rules. It may occasionally misclassify a frame.
Results also depend on:
the quality of the saved face model
source-video resolution
face size and visibility
motion blur
lighting
facial obstruction
selected restoration and masking settings
Responsible use
Use this workflow only with content you are authorized to modify. Obtain appropriate consent and clearly disclose synthetic or altered media when it could reasonably be mistaken for authentic footage.
Description
v1.0 - Initial Public Release
First public release of the Adaptive ReActor Face Swapper workflow.
Included features
Adaptive hard/easy frame classification
ReActor-only processing for normal frames
ReActor Mask Helper processing for difficult frames
Florence-2 frame descriptions
Frame-similarity decision caching
True lazy branch execution
Sequential VHS meta-batch processing
Long-video support
Optional Flux FaceDetailer section
Built-in setup guide and troubleshooting notes
Low-VRAM recommendations
H.264 MP4 output configuration
Important requirements
Keep
frames_per_batchset to1.Keep processed branch preview nodes disabled during normal rendering.
Reset the frame-similarity cache or restart ComfyUI before processing a different video.
A compatible ReActor
.safetensorsface model is required.The companion Face Model Compiler can create a face model from image folders or sampled video frames.
Recommended first test
Use a short video clip before attempting a full-length render. Verify that:
ordinary frames take the ReActor-only path;
difficult mouth, profile, hand, or obstruction frames use Mask Helper;
the final video contains different sequential frames;
the output frame rate matches the source video.
Known limitations
Frame classification relies on Florence-2 captions and keyword rules, so occasional misclassification is possible. Results depend heavily on the source resolution, face visibility, reference-model quality, motion blur, lighting, and obstruction.
