ComfyUI Node

Simswap Options

Simswap's face-picking options, kept out of the swap node's way

By TaiTair·Created 2 years ago·Updated 2 years ago· 14
Simswap Options
    • OPTIONS
    input_faces_orderlarge-small
    input_faces_index0
    detect_gender_inputno
    source_faces_orderlarge-small
    source_faces_index0
    detect_gender_sourceno
    console_log_level1

    Simswap Options is a bundle node: it collects a handful of face-selection settings into one OPTIONS output and feeds them into the swap node's "[OPTIONS]" variant (SimswapFaceSwapOpt). Every field here is a knob the plain Simswap - Fast Face Swap node already exposes inline - this node just lets you hoist them out into a clean, reusable block. If you're using the plain swap node, you don't need this at all. If you're using the options variant, it's how you control which faces get swapped.

    What the knobs do

    There are only four things it actually controls, for two images:

    • input_faces_order / source_faces_order - how faces in a multi-face image get sorted before picking. left-right, right-left, top-bottom, bottom-top, small-large, large-small (the default). Large-small is the right call when you want "the main face" and it's the biggest one.
    • input_faces_index / source_faces_index - which face, by that ordering, to use. Default "0", i.e. the first. It's a string, and it accepts comma-separated values if you want to grab several faces.
    • detect_gender_input / detect_gender_source - filter faces by detected gender (no / female / male). A blunt instrument, but it's how you skip the wrong face in a group photo without knowing its index.
    • console_log_level - 0, 1, or 2; how chatty the swap node gets in the console. 1 is the default and usually right.

    Everything flows through one OPTIONS output, which you plug into the options input on SimswapFaceSwapOpt.

    When you'd bother

    Honestly? Mostly for tidiness. If you keep tweaking which face gets swapped, having the index and ordering controls off to the side in one Options node beats reaching into a twelve-input swap node each time. It also makes it easy to reuse the same face-picking config across several swap nodes in one workflow - build the options once, wire it to all of them. The one genuinely useful feature is the gender filter, which the plain node also has but which is easier to reason about here, away from everything else.

    Installing it

    Same drill as the whole pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/TaiTair/comfyui-simswap
    # or: ComfyUI Manager → search "simswap" → install
    # then restart ComfyUI
    

    No models, no extra dependencies beyond what the pack's install.py already pulls in (insightface==0.7.3, onnxruntime, onnx, opencv-python, numpy, segment_anything). This node is pure plumbing.

    Gotchas

    • It only works with the [OPTIONS] swap node variant - the plain one won't take an OPTIONS input, and there's no way to tell that from the node name alone. Check the output type of your swap node.
    • Face ordering is by bounding-box position/size, so "left-right" means literally leftmost-first in pixel space, not "the person who is left in the photo's framing." Fine for photos, weird for weird crops.
    • Defaults copied from ReActor, since that's what this pack is forked from - they're sensible, and the author left most Simswap internals on their defaults anyway. The pack is unmaintained; don't hold your breath for new options.
    CategorySimswap

    Inputs (7)

    NameTypeDefaultDescription
    input_faces_orderCOMBOlarge-small6 options: left-right, right-left, top-bottom, bottom-top, small-large, large-small
    input_faces_indexSTRING0
    detect_gender_inputCOMBOno3 options: no, female, male
    source_faces_orderCOMBOlarge-small6 options: left-right, right-left, top-bottom, bottom-top, small-large, large-small
    source_faces_indexSTRING0
    detect_gender_sourceCOMBOno3 options: no, female, male
    console_log_levelCOMBO13 options: 0, 1, 2

    Outputs (1)

    NameTypeDescription
    OPTIONSOPTIONS