ComfyUI Node

RM Styles Full

Your whole prompt library behind one dropdown and an Edit button

By Moser9815·Created 7 months ago·Updated 7 days ago· 0
RM Styles Full
    • Positive
    • Negative
    • Motion Prompt
    • Image Loras
    • Motion Loras High
    • Motion Loras Low
    • Prompt Number
    • Prompt Name
    mode
    previous_prompt1
    next_prompt1
    minimum1
    maximum100
    use_prefixfalse
    custom_json_path
    positive_modeOff
    positive_text
    negative_modeOff
    negative_text

    If you generate the same kind of thing over and over - same subject, same style, different variations - you eventually want a prompt library you can flip through instead of retyping a 300-token wall every run. RMStylesFull is that library, as a node. It loads a JSON file of named prompts, picks one based on the mode you choose, and pours out everything a generation needs: positive, negative, motion prompt, and three separate LoRA lists. It's the hub the rest of this pack orbits around.

    How it works

    The styles file (data/styles.json in the pack, or your own via custom_json_path) is an array of entries, each with number, name, positive, negative, motion, and LoRA lists (imageLoras, motionLorasHigh, motionLorasLow). The node loads it into a dict keyed by number and selects one via mode:

    • Manual - uses whatever next_prompt says.
    • Random - the server picks a number inside min/max, with an anti-repeat buffer so the last ~30 aren't immediately reused.
    • Increment / Decrement - after each run, frontend JS bumps next_prompt by one (wrapping at the range), so queueing generations walks your library in order.

    The LoRA lists get converted to <lora:path:weight> strings - the same format RM Power LoRA Loader's Style Import and RMLoraApply's lora_string inputs consume. So the natural wiring is: styles node → text embeds for prompts, styles node → Power LoRA Loader for LoRAs. The Edit Styles button opens a modal editor backed by REST routes the pack registers (/api/rmautomation/styles), letting you add, edit, delete, and import styles without touching the JSON by hand. use_prefix prepends configurable quality prefixes when enabled (empty by default in the source).

    Inputs and outputs that matter

    • mode (enum), next_prompt, minimum/maximum, use_prefix, custom_json_path - the controls. previous_prompt is a read-only JS-updated display of the last used number.
    • Outputs: Positive, Negative, Motion Prompt, Image Loras, Motion Loras High, Motion Loras Low (all STRING), Prompt Number (INT), Prompt Name (STRING).

    How to install it

    cd ComfyUI/custom_nodes
    git clone https://github.com/Moser9815/ComfyUI-RMAutomation
    

    Restart ComfyUI; it's under RMAutomation/Styles. It uses ComfyUI's server API (PromptServer, aiohttp) which is always present - no extra deps.

    Common issues

    The elephant in the room: the shipped styles.json is the author's personal library, it's adult content, and you will want to replace it. Point custom_json_path at your own file, or use Edit Styles to clear it out. If the node returns empty strings, the file didn't load - check the console for "Styles file not found," and confirm your JSON uses the exact schema ("styles": [...] with numeric number fields; anything with number <= 0 is dropped). If Increment mode picks a number with no matching style, the node snaps to the closest existing number and logs it - worth knowing if your library has gaps. And Random mode ignores next_prompt by design, so don't fight it; set the range and let it roam.

    CategoryRMAutomation/Styles

    Inputs (11)

    NameTypeDefaultDescription
    modeCOMBO4 options: Manual, Random, Increment, Decrement
    previous_promptINT11–9999The prompt number that was used in the LAST generation (read-only, updated by JS)
    next_promptINT11–9999The prompt number that WILL be used in the NEXT generation
    minimumINT11–9999Minimum prompt number for Random/Increment/Decrement modes
    maximumINT1001–9999Maximum prompt number for Random/Increment/Decrement modes
    use_prefixBOOLEANfalseAdd quality prefixes to positive/negative prompts
    custom_json_pathSTRINGPath to a custom styles JSON file. Leave empty to use the default styles.json in the node pack.
    positive_modeoptCOMBOOffOff: use the style's positive as-is. Prepend/Append: add your text around it. Replace: ignore the style library entirely and use only your text.
    positive_textoptSTRINGText applied to the positive prompt, per the mode above.
    negative_modeoptCOMBOOffOff: use the style's negative as-is. Prepend/Append: add your text around it. Replace: use only your text for the negative.
    negative_textoptSTRINGText applied to the negative prompt, per the mode above.

    Outputs (8)

    NameTypeDescription
    PositiveSTRING
    NegativeSTRING
    Motion PromptSTRING
    Image LorasSTRING
    Motion Loras HighSTRING
    Motion Loras LowSTRING
    Prompt NumberINT
    Prompt NameSTRING