Nodes/ComfyUI_RopeWrapper/RopeWrapper_OptionNode
ComfyUI Node

RopeWrapper_OptionNode

Every fine-tune knob Rope ever had, in one tidy blob

By fssorc·Created 2 years ago·Updated 2 years ago· 26
RopeWrapper_OptionNode
    • ROPE_OPTION
    RestorerSwitchfalse
    RestorerTypeTextSel
    RestorerDetTypeTextSel
    RestorerSlider100
    OrientSwitchfalse
    OrientSlider180
    StrengthSwitchfalse
    StrengthSlider200
    BorderTopSlider10
    BorderSidesSlider10
    BorderBottomSlider10
    BorderBlurSlider10
    DiffSwitchfalse
    DiffSlider4
    OccluderSwitchfalse
    OccluderSlider0
    FaceParserSwitchfalse
    FaceParserSlider0
    MouthParserSlider0
    CLIPSwitchfalse
    CLIPTextEntry
    CLIPSlider50
    BlendSlider5
    ColorSwitchfalse
    ColorRedSlider0
    ColorGreenSlider0
    ColorBlueSlider0
    ColorGammaSlider0.00
    FaceAdjSwitchfalse
    KPSXSlider0
    KPSYSlider0
    KPSScaleSlider0
    SwapperTypeTextSel

    RopeWrapper_OptionNode is the settings bag for this whole pack. It exists for one reason: the standalone Rope GUI had an enormous panel of sliders and switches for tuning a swap, and a node graph can't hold thirty widgets on one box. So this node collects them all into a single ROPE_OPTION blob that you wire into the SwapNode or FaceRestore node's ROPE_Options input. It's a pure data node - no models, no GPU, no heavy lifting. It just packages.

    If you skip it and leave ROPE_Options disconnected, those swap nodes quietly try to load a custom_nodes/Rope/saved_parameters.json file you almost certainly don't have, and fall back to defaults. So for anything beyond a bare swap, you want one of these in your graph.

    The knobs that actually matter

    There are about thirty inputs here, and most map one-to-one to Rope's own parameters. A few are worth your attention on day one:

    • RestorerSwitch plus RestorerTypeTextSel (CF, GFPGAN, GPEN256, GPEN512) and RestorerSlider - the face-enhancement pass after the swap. GFPGAN is the community's old standby for cleaning up faces; CodeFormer (CF) tends to hold up better on badly degraded input. The slider is strength.
    • SwapperTypeTextSel (128, 256, 512) - the resolution the inswapper works at. 128 is the model's native resolution and the default; 256 and 512 look sharper but cost, and Rope's own benchmarks show 512 runs roughly six times slower than 128. Start at 128, bump only if you're happy with the swap itself.
    • BlendSlider - edge blending between the swapped face and the rest of the frame (default 5). Higher feathers the border more, which hides the swap seam.
    • OrientSwitch and OrientSlider - rotate the swap when the source face isn't upright, which fixes some misaligned swaps without re-detecting.
    • ColorSwitch with the three color sliders and ColorGammaSlider - color correction so the swapped face matches the scene's lighting instead of glaring.
    • CLIPSwitch, CLIPTextEntry, CLIPSlider - Rope's optional CLIP-guided tweak; a text hint plus a strength.

    Everything else - DiffSwitch/DiffSlider, OccluderSwitch/OccluderSlider, FaceParserSlider, MouthParserSlider, Border*, FaceAdjSwitch with the KPS* sliders - is Rope's advanced toolbox: differential motion, occlusion handling, and manual face-geometry nudging. Leave them off until you have a specific problem. Each has a master switch plus a slider, so the pattern is "flip the switch, then tune."

    How the wiring works

    Internally the node builds a Python dict keyed exactly like Rope's saved-parameters file, sets every field you touched, and fills anything you didn't expose with Rope's defaults (things like thread count and the RetinaFace detector choice are hardcoded in). The VideoManager reads vm.parameters, so once the dict reaches SwapNode, the swap runs exactly as if you'd clicked those buttons in the old GUI.

    Install

    Install once for the whole pack - ComfyUI Manager → search "ComfyUI_RopeWrapper", or:

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

    Restart ComfyUI. The README requires ComfyUI-VideoHelperSuite and ComfyUI-KJNodes as companion packs, and the model files go in ComfyUI/custom_nodes/ComfyUI_RopeWrapper/models/ (see the LoadModels article for the full list).

    Gotchas

    The one trap: this node can't tell you a model is missing. If you flip RestorerSwitch on but never downloaded GFPGANv1.4.onnx, the swap node will fail at run time, not here. And note the FaceRestore node forces the restorer on no matter what this node says - the OptionNode only recommends settings to the nodes that read it.

    CategoryRopeWrapper

    Inputs (33)

    NameTypeDefaultDescription
    RestorerSwitchBOOLEANfalse
    RestorerTypeTextSelCOMBO4 options: CF, GFPGAN, GPEN256, GPEN512
    RestorerDetTypeTextSelCOMBO3 options: Blend, Original, Reference
    RestorerSliderINT1000–100
    OrientSwitchBOOLEANfalse
    OrientSliderINT1800–270
    StrengthSwitchBOOLEANfalse
    StrengthSliderINT2000–500
    BorderTopSliderINT100–64
    BorderSidesSliderINT100–64
    BorderBottomSliderINT100–64
    BorderBlurSliderINT100–64
    DiffSwitchBOOLEANfalse
    DiffSliderINT40–100
    OccluderSwitchBOOLEANfalse
    OccluderSliderINT0-100–100
    FaceParserSwitchBOOLEANfalse
    FaceParserSliderINT0-50–50
    MouthParserSliderINT0-50–50
    CLIPSwitchBOOLEANfalse
    CLIPTextEntrySTRING
    CLIPSliderINT500–100
    BlendSliderINT50–100
    ColorSwitchBOOLEANfalse
    ColorRedSliderINT0-100–100
    ColorGreenSliderINT0-100–100
    ColorBlueSliderINT0-100–100
    ColorGammaSliderFLOAT0.000–2
    FaceAdjSwitchBOOLEANfalse
    KPSXSliderINT0-100–100
    KPSYSliderINT0-100–100
    KPSScaleSliderINT0-100–100
    SwapperTypeTextSelCOMBO3 options: 128, 256, 512

    Outputs (1)

    NameTypeDescription
    ROPE_OPTIONROPE_OPTION