Nodes/ComfyUI-FirstOrderMM/FOMM Seg5 Chooser
ComfyUI Node

FOMM Seg5 Chooser

The five-segment face-part picker for FOMM Partswap

By FuouM·Created 2 years ago·Updated about a year ago· 9
FOMM Seg5 Chooser
    • chosen_seg_indices
    m_0_backgroundfalse
    m_1_chintrue
    m_2_frnt_facetrue
    m_3_shouldertrue
    m_4_hairtrue
    m_5_fr_headtrue

    FOMM_Seg5Chooser is the coarsest of the three segment-picker helpers in this pack. It's a set of six checkboxes that generate the chosen_seg_indices string for FOMM_Partswap, and it exists to match the vox-5segments model - the model that chops a face into just six regions instead of ten or fifteen.

    Those regions are m_0_background, m_1_chin, m_2_frnt_face, m_3_shoulder, m_4_hair, and m_5_fr_head. Background is off by default; the other five are on. Because there are only six segments, there's no subtlety to it: the face is basically chin, central face, forehead, hair, and shoulders, plus the background. You're choosing between "swap the whole head" and "leave the hair alone" - not fine-grained control.

    How it works

    Exactly like its siblings: collect the booleans, keep the indices of the ones that are true, serialize them as an underscore-joined string, and hand that to FOMM_Partswap's chosen_seg_indices input. "2_4" means central face + hair. No model loads, no inference - it's a pure plumbing node that converts checkboxes into a string.

    There's a genuine niche for this one: the 5-segment model is the quickest and most forgiving of the Partswap checkpoints, and its coarser regions are less likely to misfire on edge cases than the fine-grained 15-segment model. If you just want "the face follows the driver, leave background and hair alone," the 5-segment setup is the least fiddly way to get it.

    Wiring it up

    • Output chosen_seg_indices → FOMM_Partswap's chosen_seg_indices input.
    • Use this chooser only with vox-5segments. Hook it up to a 10- or 15-segment model and the indices mean the wrong things - the node filters out-of-range values, so a mismatch usually swaps nothing rather than crashing, which is somehow worse.

    You don't strictly need this node - chosen_seg_indices is just a string, and "1_2_3_4_5" typed by hand does the same thing - but the checkboxes are self-documenting and it's one less thing to remember.

    Install and gotchas

    No install beyond the pack: ComfyUI Manager (search "FirstOrderMM") or git clone + pip install -r requirements.txt into custom_nodes/, then restart. No model files belong to this node; the model it feeds (vox-5segments.pth.tar in checkpoints/) is a manual download, like everything in this pack.

    The gotcha is the defaults. Everything except background ships checked, so drop this node into a fresh graph and you get a full swap - chin, face, hair, shoulders, all of it. If you want to keep the hair or the background, untick those. And when you're debugging "why did nothing swap," check that this node's output is actually connected and that the model selected in FOMM_Partswap really is the 5-segment one.

    CategoryFirstOrderMM

    Inputs (6)

    NameTypeDefaultDescription
    m_0_backgroundBOOLEANfalse
    m_1_chinBOOLEANtrue
    m_2_frnt_faceBOOLEANtrue
    m_3_shoulderBOOLEANtrue
    m_4_hairBOOLEANtrue
    m_5_fr_headBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    chosen_seg_indicesSTRING