Nodes/ComfyUI-AtlasUtils/Prompt Title Selector (JSON)
ComfyUI Node

Prompt Title Selector (JSON)

Turn a JSON file into ON/OFF prompt toggles, so you stop editing your mega-prompt

By Yoon999·Created 3 months ago·Updated 21 days ago· 0
Prompt Title Selector (JSON)
    • title_list
    • prompt_list
    • combined_prompt
    • selected_prompt_count
    • random_seed_list
    json_file
    index_modefalse
    index0
    selected_indices[]
    join_separator

    You know the workflow. You keep the same character tags and keep editing the composition tags, one run at a time, deleting "long hair" to try "short hair" and hoping you didn't butcher the rest. This node is the antidote. You give it a JSON file of named prompt groups, and it renders one ON/OFF toggle per group. Flip a toggle, get that group's prompts. No editing between runs.

    It comes from ComfyUI-AtlasUtils, a small Korean-authored utility pack, and it's the pack's star - the other three nodes are video-loop helpers. There's no API, no model download, nothing heavier than the torch that ComfyUI already ships. Just a JSON file and some toggles.

    How it works

    Drop a .json file into ComfyUI/input and pick it in the json_file dropdown. The pack's frontend extension then fetches the parsed groups through its own /prompt_title_selector/json endpoint and draws one toggle per title (not per prompt - that trips people up). Your picks are stored in a hidden selected_indices string widget, so they're saved inside the workflow like any other widget. On run, the backend filters the groups by those indices and hands you the output.

    Two small touches make it behave well. VALIDATE_INPUTS catches malformed JSON before anything runs, and IS_CHANGED hashes the file contents, so if you edit the JSON in place it re-runs even though the filename didn't change. One honest caveat: editing the file doesn't rebuild the toggles - those update when you reselect the file in the dropdown.

    The inputs that matter

    • json_file - a dropdown of every .json under ComfyUI/input, including subfolders. This is the one you actually touch.
    • join_separator - only used for the combined_prompt output, default is a blank line.
    • index_mode + index - leave both alone. Flip index_mode on and instead of the whole selection you get one prompt (and one title), picked by index from the selected set. Handy for stepping through options one at a time; the docs hide it for good reason.
    • selected_indices - internal workflow state, hidden from the node's UI. Don't edit it.

    The JSON format

    The README's own example is anime-flavored and honestly the clearest spec there is:

    [
      { "인물_여성": ["1girl, solo, long hair", "1girl, solo, short hair"] },
      { "구도_전신": ["full body, standing pose"] }
    ]
    

    Each object is {"Title": "prompt"} or {"Title": ["prompt1", "prompt2"]}. The node also accepts a flat {"Title": [...]} object and an {"items": [...]} wrapper, and each entry can use "title"/"prompts" keys instead. Any string groups work - don't let the 1girl example make you think this is anime-only.

    Outputs

    • title_list (list) - the names of the groups you switched on.
    • prompt_list (list) - every prompt in those groups, flattened. Feed it to anything that wants a string list, or batch over it.
    • combined_prompt (string) - the same prompts joined with join_separator. This is what you wire into a CLIP Text Encode / prompt box for a normal single generation.

    Install

    Via ComfyUI Manager, search for ComfyUI-AtlasUtils (the pack title) and install. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Yoon999/ComfyUI-AtlasUtils
    

    Restart ComfyUI, then put your JSON in ComfyUI/input.

    Where people get burned

    • New JSON file won't show in the dropdown - the README's own fix: refresh the browser, or restart ComfyUI. The file list is built when the node loads.
    • The README says to copy the folder into custom_nodes/ComfyUI-PromptTitleSelector/ - that's the pack's old name, from before it became AtlasUtils. Cloning as ComfyUI-AtlasUtils is cleaner and matches what Manager expects; the node registers from __init__.py either way.
    • You toggled a group on and nothing changed - check whether you wired combined_prompt (single string, what most prompt nodes want) rather than prompt_list. They're different outputs for a reason.
    • JSON syntax errors surface as a message during validation, before the run, so at least you'll know.
    Categoryprompt/selection

    Inputs (5)

    NameTypeDefaultDescription
    json_fileCOMBOJSON file placed under ComfyUI/input. Selecting a file creates one ON/OFF toggle for every title.
    index_modeBOOLEANfalse
    indexINT0
    selected_indicesSTRING[]Internal workflow state. Managed by title toggles.
    join_separatorSTRING Separator used only for combined_prompt.

    Outputs (5)

    NameTypeDescription
    title_listSTRING
    prompt_listSTRING
    combined_promptSTRING
    selected_prompt_countINT
    random_seed_listINT