WFEN Face Restore
A tiny, fast face cleaner — if you mind the 128x128
- src_img
- res_img
Blurry faces are the most common "almost great" failure in AI generation - the model nails the pose and the light, then the face comes out soft and mushy. The classic fix is a face-detailer: detect the face, restore or redraw it, paste it back. WFEN is the "restore" half of that, and the important thing to know up front is that it works at a fixed, small resolution: your input gets resized to 128x128 internally and the output comes back at 128x128. That's not a bug, it's the design - WFEN is a face crop cleaner, meant to sit between a face-crop node and a paste-back node, not to process your full 1K canvas.
How it works
WFEN is the Wavelet-based Feature Enhancement Network for Efficient Face Super-Resolution (PRIS-CV, 2021). The idea: instead of processing the face as one flat image, it decomposes it with Haar wavelets and enhances features across the frequency bands - the wavelet decomposition is woven into the encoder-decoder, so the network learns to recover high-frequency face detail (the texture that makes a face look like a face) without needing a big transformer stack. It's a small, fast model, which is exactly what you want for a per-face pass.
The wrapper resizes whatever you feed it to 128x128, runs the net, and hands back a 128x128 IMAGE. So the workflow shape matters: crop the face first, run WFEN, then scale and paste the cleaned face back over the original - the author's bundled workflow does exactly this with an Image Crop Face → WFEN → Image Paste Face chain.
The single input
src_img- the face (or image) to restore. Only input there is, and it's just IMAGE in, IMAGE out (res_img).
Installing it
FM_nodes via ComfyUI Manager (search FM_nodes) or:
cd ComfyUI/custom_nodes
git clone https://github.com/FuouM/FM_nodes
then restart. Requirements are just torch and einops. The model WFEN.pth comes from the WFEN repo's getting-started section and goes to custom_nodes/FM_nodes/models/wfen/WFEN.pth. Manual download, as with everything in this pack - a file-not-found on queue means it isn't in that exact spot.
Where people get burned
The 128x128 output catches everyone. If you drop a 1024x1024 render straight into WFEN expecting a restored version of the same size, you'll get back a tiny face and wonder what happened. The fix is the crop-then-paste pattern - and honestly, that's a feature, because at 128x128 it runs in a blink, so you can restore every face in a batch cheaply before upscaling the result. The other honest caveat: this is face restoration in the "sharpen what's there" sense, not identity replacement - it will tighten up a soft face and add texture, but it won't invent detail that isn't in the frame, and it won't fix a fundamentally broken face. For that you want a generative detailer. For "the face is soft, everything else is fine," WFEN is the fast, deterministic option.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| src_img | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| res_img | IMAGE | — |