Nodes/ComfyUI-Role-Master/Role Loader (Time)
ComfyUI Node

Role Loader (Time)

Role Loader (Time)

By laolaoruqin·Created 9 months ago·Updated 9 months ago· 0
Role Loader (Time)
    • final_prompt
    • role_content
    • user_input
    role
    user_input

    Role Loader (Time) is the sibling of the A-Z loader, and the honest description is that it's the same node with the sorting removed. Where Role Loader (A-Z) alphabetizes your saved roles, this one lists them in the order you saved them - first in, first shown. That's the entire mechanical difference, and it's worth knowing because it tells you exactly when to reach for it.

    Let's be real about the code: both loaders read the same roles.json, both have a role dropdown and a user_input box, and both return the same three outputs - final_prompt (role plus your input, joined with a blank line), role_content (the raw saved text), and user_input (passed through untouched). final_prompt is the one you wire to CLIP Text Encode. The only difference is that A-Z runs sorted() over the keys and Time just keeps the file's insertion order. So if your library is small or your naming is consistent, these two are interchangeable and you'd never notice which you picked.

    When does insertion order actually beat alphabetical? When your role names are a mess. If you've named things "no_bg_full", "Full body v3", "full body FINAL", and "ffb2", alphabetical ordering groups them into nonsense - everything you're actively using scatters across the alphabet. Insertion order puts your newest saves at the bottom, which reads as "the one I added last," which is usually the one you're testing right now. That's the real use case: a "recently added" view that alphabetical sorting actively hides. It's also handy if you keep a stable set and want the dropdown to match the order you think about them, instead of the order a dictionary does.

    Both inputs are the ones you'd expect - role is the dropdown, user_input is the multiline box for the per-generation text. Nothing else to configure, which is the charm of this pack in general.

    Install is identical to every node in ComfyUI-Role-Master:

    cd ComfyUI/custom_nodes
    git clone https://github.com/laolaoruqin/ComfyUI-Role-Master.git
    

    Then restart ComfyUI, or search "Role Master" in ComfyUI Manager. No dependencies, no models, no API keys - it's a string node reading one JSON file, offline and free.

    The gotchas carry over from the A-Z loader too. The dropdown is populated when the node loads, so newly saved roles need a workflow refresh before they appear. The roles live in roles.json inside the pack folder, which is tracked by git - back the file up before you pull an update. And since your roles sit on disk rather than in the workflow, they don't travel with a shared PNG. For a quick-try-it-out node, that's a fair price: it's the same library as its sibling, just presented in the order that matches how you actually created it.

    CategoryRole Master

    Inputs (2)

    NameTypeDefaultDescription
    roleCOMBO1 options: Example Role
    user_inputSTRING

    Outputs (3)

    NameTypeDescription
    final_promptSTRING
    role_contentSTRING
    user_inputSTRING