Nodes/ReActor Node for ComfyUI/ReActor 🌌 Options
ComfyUI Node Runs on cloud

ReActor 🌌 Options

The face-order and index config node

By GourieffΒ·Created 3 years agoΒ·Updated 2 years agoΒ· 1,747
ReActor 🌌 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β–Ί

    This one doesn't swap anything. ReActor Options (class ReActorOptions) is a pure settings node - it produces an OPTIONS bundle that you wire into the options input of ReActorFaceSwapOpt, and that's its entire job. On its own it does nothing. Think of it as the config panel that ReActor's [OPTIONS] node reaches into for the answer to one question: when there are several faces in an image, which one is which?

    You reach for it the moment "swap the face" becomes "swap these faces, in this order." A single portrait doesn't need it. A group photo, a two-shot, or a video where face detection has to stay consistent frame to frame - that's where controlling detection order and index mapping stops being optional and starts being the difference between the right face landing on the right person and a scrambled mess.

    How it works

    There's no model and no image here. The node just packages your ordering preferences into an OPTIONS object and passes it downstream. The reason it exists as a separate node at all: in ReActor 0.5.0 the author split these controls out so you could set source and input face order independently. By default ReActor detects faces "large to small" - the biggest face in the frame is index 0. That's fine until the biggest face isn't the one you care about, or until you're processing frames where the "biggest" face keeps changing. Switch the order to a spatial mode like left-to-right and index 0 becomes stable and predictable.

    The inputs and outputs that matter

    The node is all inputs, one output. The ones that actually matter:

    • input_faces_order / source_faces_order - how faces get sorted before indexing. Default is large-small; the useful alternatives are left-right and right-left (spatial, position-based) and top-bottom / bottom-top. For a group shot, left-right makes indexes line up with where people physically stand, which is far easier to reason about than face size.
    • input_faces_index / source_faces_index - which face(s) to use on each side, 0-based. This is the mapping. Say source 0,1,2 and input 1,0,2: the second face in the input (index 1) gets the first source face (index 0), and so on. That's how you swap multiple people in one pass without them getting crossed.
    • detect_gender_input / detect_gender_source - restrict detection to male or female (default no). Cheap way to skip faces you don't want swapped in a mixed crowd.

    The last input, console_log_level, is just how chatty ReActor is in the terminal - leave it.

    The single output is OPTIONS. It goes into exactly one place: the options input of a ReActorFaceSwapOpt node. It doesn't connect to anything else.

    How to install it

    It's part of the ReActor pack, not a standalone thing, so installing ReActor installs this. ComfyUI Manager: search ReActor, install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Gourieff/comfyui-reactor-node
    

    then run install.bat / install.py and restart. Nothing extra to download for this node specifically - it carries no models. The heavy dependencies (InsightFace, the swap and face-restoration models) belong to the swap nodes it feeds, not to this one.

    Common issues & troubleshooting

    My settings here aren't taking effect. The overwhelmingly common one. This node changes nothing until its OPTIONS output is connected to a ReActorFaceSwapOpt node's options input. Also note the plain ReActorFaceSwap node has no options socket at all - the ordering knobs are baked into that node directly, so ReActorOptions only pairs with the Opt variant.

    The wrong face got swapped, or two people got crossed. This is an indexing problem, and it's exactly what this node is for. Remember indexes start at 0 and the order they're assigned in depends on input_faces_order. If you're on the large-small default and results feel random across a batch, switch to left-right so the indexes stop moving around.

    The node won't load / the whole ReActor menu is missing. That's not this node, it's the pack's InsightFace dependency failing to build - one of the more painful installs in ComfyUI, historically needing Visual Studio C++ Build Tools. Fix it at the pack level with the prebuilt Insightface wheel the README links for your Python version, then restart.

    One worth keeping in mind: everything the ReActor pack does rides on InsightFace's non-commercial weights, so anything you build with this chain is personal/research use, not something to sell.

    Category🌌 ReActor

    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β€”