ComfyUI extension for FLUX FaceIR face restoration. It supports both:
Main training/inference repository: cosmicrealm/flux-restoration
This extension ships with two workflows:
workflows/aligned_face_restore.jsonworkflows/full_image_restore.jsonaligned_face_restore.json is for already aligned face crops.
full_image_restore.json is the whole-image workflow:
The detect-and-align node returns both:
align_params: structured affine/paste-back parameters for downstream nodesalign_params_json: readable JSON text for debugging or exportAligned workflow:

Whole-image workflow:

Clone this repository into ComfyUI/custom_nodes, then install dependencies:
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/cosmicrealm/ComfyUI-Flux-FaceIR.git ComfyUI-Flux-FaceIR
cd ComfyUI-Flux-FaceIR
python install.py
If you downloaded a zip or received this extension bundled with another package, extract or copy it so the final directory is:
ComfyUI/custom_nodes/ComfyUI-Flux-FaceIR
Do not leave the directory named ComfyUI-Flux-FaceIR-main. Fully restart ComfyUI
after installation.
Recommended model layout:
ComfyUI/models/
diffusion_models/
FLUX.2-klein-base-4B/
flux-2-klein-base-4b.safetensors
text_encoders/
qwen_3_4b.safetensors
vae/
flux2-vae.safetensors
loras/
lora_weights.safetensors
face_detectors/
retinaface_r34.pth
Download links:
flux-2-klein-base-4b.safetensorsqwen_3_4b.safetensorsflux2-vae.safetensorslora_weights.safetensorsretinaface_r34.pthExample download commands:
mkdir -p ComfyUI/models/face_detectors
wget -O ComfyUI/models/face_detectors/retinaface_r34.pth \
https://github.com/yakhyo/retinaface-pytorch/releases/download/v0.0.1/retinaface_r34.pth
mkdir -p ComfyUI/models/loras
wget -O ComfyUI/models/loras/lora_weights.safetensors \
https://huggingface.co/zhangjinyang/flux-restoration/resolve/main/pretrained_models/lora_weights.safetensors
Core nodes:
Flux FaceIR Apply LoRAFlux FaceIR Load RetinaFaceFlux FaceIR Detect And Align FaceFlux FaceIR Restore FaceFlux FaceIR Paste Restored FaceRecommended graph:
UNETLoader, CLIPLoader, and VAELoader.lora_weights.safetensors with Flux FaceIR Apply LoRA.Flux FaceIR Restore Face directly.Flux FaceIR Load RetinaFace -> Flux FaceIR Detect And Align Face -> Flux FaceIR Restore Face -> Flux FaceIR Paste Restored Face.The bundled whole-image workflow is configured for:
retinaface_r34.pthflux-2-klein-base-4b.safetensors, not the FP8 variant.Flux FaceIR Restore Face supports blind restoration and reference-guided restoration with up to three references.crop_scale, crop_shift_y, detector thresholds, and resize settings are exposed on the detect-and-align node, so you can widen the crop to include more forehead, chin, or shoulder context when needed.$ claude mcp add ComfyUI-Flux-FaceIR \
-- python -m otcore.mcp_server <graph>