Apply Stand-In Processor
Turn one photo into the face_rgba Stand-In actually wants
- face_processor
- image
- processed_image
- face_rgba
This is the node that turns "a photo of a person" into the exact shape Stand-In's identity pipeline expects. The README's own usage tip says it straight: use a high-resolution frontal face photo, and don't worry about resolution or file extension because "our built-in preprocessing pipeline will handle them automatically." This node is that built-in pipeline.
Stand-In is WeChat Vision/Tencent's identity-preserving adapter for Wan video - small, cheap to train (Kijai, who wrote ComfyUI-WanVideoWrapper, noted only about 1% of the base model was retrained), and this preprocessor pack is the "official" way to prepare inputs for it, correcting a mismatch between the authors' original preprocessing logic and Kijai's own implementation in his wrapper. When Stand-In first launched, one of the more common reactions on r/comfyui was confusion about what it actually does - "basically face-id support in WAN... you can faceswap with it" is about as good a plain-English summary as any. ApplyFaceProcessor is the loader side of that: it's where your source identity photo gets turned into something the rest of the pipeline can use.
How it works
Feed it your face_processor (from FaceProcessorLoader) and a reference image. It runs the YOLO detector to find the face, crops around it using face_crop_scale as a multiplier on the detected box (bigger scale = more head/shoulder context included), optionally extends the crop to include the neck (with_neck), rejects or adjusts detections that sit too close to the frame edge (border_thresh), and resizes the result to resize_to. Out come two images: a processed version of your source photo, and a separate isolated face crop on its own alpha channel.
The inputs and outputs that matter
face_processorandimage- the two required inputs: your loaded detector and the photo you want identity from.resize_to(default 512) - fine to leave alone for a first run; it's the working resolution for the crop.face_crop_scale(default 1.5) - the one worth nudging if you want more of the head and shoulders in frame rather than a tight face-only crop.with_neck(default false here) - worth noting because the video nodes in this pack default it to true. If you want a consistent crop shape across your still-photo prep and your video processing, set this to match whatever you're using downstream.face_only_mode(default false) - same story: defaults differently here than on the video nodes.- Outputs:
processed_image(the adjusted source photo) andface_rgba- this second one is the actual payload. It's what plugs intoVideoInputPreprocessor'sface_rgbainput downstream.
How to install it
cd ComfyUI/custom_nodes
git clone https://github.com/WeChatCV/Stand-In_Preprocessor_ComfyUI.git
cd Stand-In_Preprocessor_ComfyUI
pip install -r requirements.txt
Restart ComfyUI, or search "Stand-In Official Preprocessor ComfyUI Nodes" in ComfyUI Manager if you'd rather not touch the terminal.
Common issues & troubleshooting
No face detected, or face_rgba comes back empty/garbage. First suspect is confidence_threshold set too aggressively - try lowering it. Second suspect is your photo itself: the README's own advice is a high-resolution frontal shot, and this detector is going to struggle on extreme angles or low-quality source images the way any single-shot face detector would.
A face near the edge of your photo gets rejected. That's border_thresh doing its job a little too eagerly - raise it if your reference photo is a tight headshot with little margin.
The pasted-in face looks too tight or too loose once it hits VideoInputPreprocessor. face_crop_scale here and face_crop_scale on the video node aren't the same value and don't have to match - but wildly different scales between the two can make the eventual blend look off. If something's not lining up downstream, this is one of the first knobs to check.
with_neck and face_only_mode silently disagree with your video-side settings. Since this node's defaults are the odd ones out in the pack, it's worth explicitly setting both here to match what you're running on VideoInputPreprocessor and VideoBackgroundRestorer - or just wire a shared FaceOnlyModeSwitch into all of them so there's one source of truth.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| face_processor | FACE_PROCESSOR | — | |
| image | IMAGE | — | |
| resize_to | INT | 51264–2048 | — |
| border_thresh | INT | 100–100 | — |
| face_crop_scale | FLOAT | 1.51–3 | — |
| confidence_threshold | FLOAT | 0.500.1–1 | — |
| with_neck | BOOLEAN | false | — |
| face_only_mode | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| processed_image | IMAGE | — |
| face_rgba | IMAGE | — |