ComfyUI Extension
ComfyUI-Role-Master
A set of custom nodes for ComfyUI that allows you to manage, save, and load system prompts (roles) easily.
laolaoruqin/ComfyUI-Role-Master
Nodes—
On cloudLocal install
Stars0
Updated8 months ago
Readme
ComfyUI Role Master
A set of custom nodes for ComfyUI that allows you to manage, save, and load system prompts (roles) easily.
Features
- 💾 Role Saver: Save your favorite system prompts with a custom name.
- Overwrite Protection: Prevents accidental overwrites unless explicitly enabled.
- Auto-Trim: Automatically removes leading/trailing spaces from names.
- 📂 Role Loader (A-Z): Load saved roles sorted alphabetically.
- 🕒 Role Loader (Time): Load saved roles sorted by creation time.
- Ghost Text Input: Clean UI with placeholder text.
- Flexible Outputs: Returns the combined prompt, just the role, or just the user input.
- 🗑️ Role Deleter: Delete unwanted roles directly from the node.
Installation
- Navigate to your ComfyUI
custom_nodesdirectory. - Clone this repository.
git clone https://github.com/laolaoruqin/ComfyUI-Role-Master.git - Restart ComfyUI.
Usage
-
Saving a Role:
- Add the
Role Savernode. - Enter a name and your prompt.
- Set
save_triggertoSave(default is On) and queue the prompt. - Enable
overwrite_existingif you want to update an existing role.
- Add the
-
Loading a Role:
- Add
Role Loader (A-Z)for alphabetical sorting ORRole Loader (Time)for insertion order. - Select a role from the dropdown.
- (Optional) Enter additional text in the
user_inputbox. - Connect the
final_promptoutput to your CLIP Text Encode node.
- Add
-
Deleting a Role:
- Add the
Role Deleternode. - Select the role to delete.
- Set
delete_triggertoDeleteand queue the prompt.
- Add the
File Structure
__init__.py: Entry point for ComfyUI.role_nodes.py: Core logic for the nodes.roles.json: Stores your saved roles.
License
MIT