Nodes/ComfyUI_RopeWrapper/RopeWrapper_FaceRestore
ComfyUI Node

RopeWrapper_FaceRestore

Clean up faces without swapping them

By fssorc·Created 2 years ago·Updated 2 years ago· 26
RopeWrapper_FaceRestore
  • models
  • vm
  • input_image
  • audio
  • ROPE_Options
  • SwappedImage
  • fileName
  • fileNameAndPath
detection_threshold0.50
combineVideofalse
frame_rate30.00
filenamePrefixRopeFaceRestore
saveOutputfalse

RopeWrapper_FaceRestore is the same machinery as the SwapNode with the swapping part removed. It detects every face in a video and runs a face-restorer - GFPGAN, CodeFormer, or GPEN - over each one, leaving identity untouched. It's the "restore only" mode of the old Rope GUI, and it's genuinely useful for a couple of jobs: rescuing faces in low-res or compressed footage, or polishing a video you already generated where the faces came out soft or waxy.

That distinction matters. The generative identity tools (IP-Adapter FaceID, InstantID, PuLID) steer the model toward a face during generation; the restore pass is a pixel-level cleanup after the fact. This node is the after-the-fact kind.

The inputs

  • models and vm - from LoadModels.
  • input_image - your frames as an IMAGE batch.
  • detection_threshold (default 0.5) - how confident the RetinaFace detector must be before it treats a region as a face. Lower it to catch smaller or partially occluded faces.
  • combineVideo, frame_rate, filenamePrefix, saveOutput - the same mp4-combining setup as the SwapNode, including the "no preview under the node, check History" behavior.
  • audio (optional) - muxed into the output.
  • ROPE_Options (optional) - the settings blob from OptionNode. The restorer fields here are the ones that matter.

How it works

There's no detectResult input, unlike the swap node - it re-detects faces fresh on every run (using RetinaFace, capped at 50 per frame), then calls Rope's core_withoutSwap on each detected face. And it force-flips the restorer on no matter what your OptionNode says - the code literally sets RestorerSwitch = True internally. That means you must have a restorer model in the plugin's models/ folder, or the run dies on a missing ONNX file.

Which restorer? The OptionNode's RestorerTypeTextSel picks between CF (CodeFormer), GFPGAN, GPEN256, and GPEN512. Community consensus in the wider ecosystem: GFPGAN for general cleanup, CodeFormer for badly degraded input, GPEN if you want speed. RestorerSlider sets strength, RestorerDetTypeTextSel (Blend / Original / Reference) controls how the restored face blends back into the frame.

Outputs and gotchas

Same three outputs as the SwapNode: SwappedImage, fileName, fileNameAndPath. When combining it also returns preview metadata instead of a frame stack.

Two things to plan around: because there's no saved detection map, long clips re-run detection every time - if you're iterating on restorer settings, that gets old fast. And since it forces the restorer on, the very first thing to check on a failure is whether GFPGANv1.4.onnx (or whichever variant you picked) actually exists in ComfyUI/custom_nodes/ComfyUI_RopeWrapper/models/.

Install

Whole pack, one install - ComfyUI Manager → search "ComfyUI_RopeWrapper", or:

cd ComfyUI/custom_nodes
git clone https://github.com/fssorc/ComfyUI_RopeWrapper

Restart. The README requires ComfyUI-VideoHelperSuite and ComfyUI-KJNodes, and you'll need the restorer model files on top of the base swap models.

CategoryRopeWrapper

Inputs (10)

NameTypeDefaultDescription
modelsROPE_MODEL
vmROPE_VM
input_imageIMAGE
detection_thresholdFLOAT0.500–1
combineVideoBOOLEANfalse
frame_rateFLOAT30.00
filenamePrefixSTRINGRopeFaceRestore
saveOutputBOOLEANfalse
audiooptAUDIO
ROPE_OptionsoptROPE_OPTION

Outputs (3)

NameTypeDescription
SwappedImageIMAGE
fileNameSTRING
fileNameAndPathSTRING