ComfyUI Node

Set Role

Pick an LLM role system prompt from roles/*.md and output it as a STRING for an LLM node's system_prompt. Use the role widget's control_after_generate to step or randomize roles across a batch.

By bradsec·Created 2 months ago·Updated about a month ago· 1
Set Role
    • system_prompt
    • role_name
    • resolved_index
    role(no roles found)
    CategoryLLM

    Inputs (1)

    NameTypeDefaultDescription
    roleCOMBO(no roles found)The role whose Markdown becomes the system prompt. Set this widget's control_after_generate to step roles across a batch: 'fixed' holds it, 'increment wrap' advances one role per generation and wraps around, 'randomize' picks at random. The list is built from roles/*.md at startup; add a .md file and restart ComfyUI to add a role.

    Outputs (3)

    NameTypeDescription
    system_promptSTRING
    role_nameSTRING
    resolved_indexINT