Nodes/comfyui-outfit/🧾 Male Outfit Inputs From JSON
ComfyUI Node

🧾 Male Outfit Inputs From JSON

The Inputs-From-JSON Bridge

By manifestationsΒ·Created about a year agoΒ·Updated 12 months agoΒ· 3
🧾 Male Outfit Inputs From JSON
    • preset
    • age_group
    • race
    • body_type
    • pose
    • background
    • mood
    • time_of_day
    • weather
    • color_scheme
    • description_style
    • creative_scale
    • character_name
    • custom_attributes
    • avoid_terms
    • arm
    • ear
    • eyewear
    • facial_hair
    • feet
    • fingers
    • forearm
    • forehead
    • hairstyle
    • hand
    • headgear
    • legs
    • neck
    • nose
    • torso
    • waist
    • makeup_data
    • inputs_json
    β—„merged_jsonβ–Ί

    The outfit nodes are dropdown machines, which is great in the UI and useless if you want to feed them values from anywhere else. Male Outfit Inputs From JSON (class MaleOutfitInputsFromJSONNode, in πŸ‘— Outfit/Helpers/Male) is the adapter that fixes that: it takes one JSON string and turns it into a pile of individual STRING outputs you can wire straight into MaleOutfitNode's matching inputs.

    It exists because the pack has a second life as a data pipeline, not just a clicking toy. You can feed it JSON generated by your own script or an API, or - more likely, if you're just using the pack as intended - JSON produced by the pack's own helper chain: Photo Style Helper emits a preset_patch_json, Preset Patch Applier merges it into merged_json, and this node decodes that back into individual pins.

    How it works

    It's a pure decoder with sensible defaults. You paste a JSON object into merged_json (a multiline STRING input), and it maps each known key to one output pin: preset, age_group, race, body_type, pose, background, mood, time_of_day, weather, color_scheme, description_style, creative_scale, character_name, custom_attributes, avoid_terms, then every male attire part (arm, ear, eyewear, facial_hair, feet, fingers, forearm, forehead, hairstyle, hand, headgear, legs, neck, nose, torso, waist), then makeup_data and inputs_json.

    The defaults are where the thought went in. Any key missing from your JSON comes out as random if it's a selector - so a sparse JSON object still produces a fully randomized outfit, which is exactly what you want when a preset patch only overrides a few fields. Freeform text fields (character_name, custom_attributes, avoid_terms, makeup_data) default to empty instead. And inputs_json is a pass-through: it echoes the original JSON so you can forward it on one wire and keep the raw data in the graph.

    Wiring it up

    Each output pins into the same-named input on MaleOutfitNode. The clean pattern:

    Photo Style Helper ──preset_patch_json──> Preset Patch Applier ──merged_json──> Male Outfit Inputs From JSON ──(individual pins)──> Male Outfit Node
    

    You don't have to wire every pin - leave the ones you don't care about unconnected; they'll just default to random behavior when the JSON doesn't set them. One gotcha: the male node expects facial_hair, and this node emits it; if you accidentally feed female-shaped JSON (with cheeks/lips) it won't error, those keys just won't map to a male pin and the defaults kick in.

    Install and dependencies

    Same as the whole pack - ComfyUI Manager (search "ComfyUI Outfit Selection") or git clone https://github.com/manifestations/comfyui-outfit.git into custom_nodes/, then restart. This node is pure Python stdlib JSON parsing; it adds no new dependencies and touches no models, so it's the safest part of the pack to run. If your merged JSON won't parse, the node quietly falls back to defaults and randomizes - which means the failure you're debugging can look like "nothing got applied" instead of an error. Paste the JSON into a JSON validator first if you suspect it.

    CategoryπŸ‘— Outfit/Helpers/Male

    Inputs (1)

    NameTypeDefaultDescription
    merged_jsonSTRINGβ€”

    Outputs (33)

    NameTypeDescription
    presetSTRINGβ€”
    age_groupSTRINGβ€”
    raceSTRINGβ€”
    body_typeSTRINGβ€”
    poseSTRINGβ€”
    backgroundSTRINGβ€”
    moodSTRINGβ€”
    time_of_daySTRINGβ€”
    weatherSTRINGβ€”
    color_schemeSTRINGβ€”
    description_styleSTRINGβ€”
    creative_scaleSTRINGβ€”
    character_nameSTRINGβ€”
    custom_attributesSTRINGβ€”
    avoid_termsSTRINGβ€”
    armSTRINGβ€”
    earSTRINGβ€”
    eyewearSTRINGβ€”
    facial_hairSTRINGβ€”
    feetSTRINGβ€”
    fingersSTRINGβ€”
    forearmSTRINGβ€”
    foreheadSTRINGβ€”
    hairstyleSTRINGβ€”
    handSTRINGβ€”
    headgearSTRINGβ€”
    legsSTRINGβ€”
    neckSTRINGβ€”
    noseSTRINGβ€”
    torsoSTRINGβ€”
    waistSTRINGβ€”
    makeup_dataSTRINGβ€”
    inputs_jsonSTRINGβ€”