Prompt Core
Assemble reusable prompts from logs and placeholders, not copy-paste
- final_prompt
- source_prompt
- prompt_line
- outfit_line
- scene_line
- prompt_index_resolved
- outfit_index_resolved
- scene_index_resolved
- prompt_count
- outfit_count
- scene_count
- prompt_file
- outfit_file
- scene_file
If you test LoRAs for a living, you've typed some version of the same prompt two hundred times: a subject name, an outfit description, a scene, and a pile of style words. SickOllie's Prompt Core (Classic family, class SOPromptLogEngine) is the node that makes you stop doing that. It takes one source prompt plus reusable components - outfits A/B/C, a scene, a NAME, an ITEM - and assembles a final string at execution time, so the same graph can produce a hundred variations by rotating text files instead of editing a text box.
How it works
The engine reads from one of two places: manual_prompt typed directly, or a prompt_log_file picked from the .txt libraries under ComfyUI/input/SickOllieLogs/prompts/. Each component stream - prompt, three outfit streams, and scene - has its own file picker and its own mode dropdown: fixed, increment, decrement, randomize, or shuffle. That's how you build a test campaign without a single extra node: randomize the outfit, increment the scene, keep the prompt fixed.
Tokens do the substitution. The default tokens are NAME, OUTFIT_A/OUTFIT_B/OUTFIT_C, SCENE, and ITEM, each with a configurable token string and a value. NAME typically comes from your Loader Core's clean_name output; the others come from their log files. There's also an optional prefix/suffix with its own separator (default , ) and a cleanup pass that strips regex matches - the default rule removes things like [x], (y), and trailing :weight artifacts, which is exactly the junk logs accumulate.
On each run it resolves the indexes, applies the tokens, cleans up, and hands you the finished string. If a configured log file is missing, it self-heals to [None] and falls back to Manual rather than blocking the queue.
Inputs and outputs that matter
The one output you care about is final_prompt - wire it into Generation Core's positive_text. The rest of the fourteen outputs exist so Classic workflows can trace what actually ran: source_prompt, prompt_line, outfit_line, scene_line, the resolved indexes and counts (prompt_index_resolved, outfit_index_resolved, scene_index_resolved, prompt_count, outfit_count, scene_count), and the file stems (prompt_file, outfit_file, scene_file). Those feed Output Core's filenames so your saved files encode which outfit and scene made them.
Installing it
It's in the SickOllie pack:
cd ComfyUI/custom_nodes
git clone https://github.com/sickollie/SickOllie
or ComfyUI Manager → search "SickOllie". Restart and Ctrl+F5. Don't forget the starter logs: copy the SickOllieLogs folder from the pack's Starter Content into ComfyUI/input/ so the dropdowns have files to pick from.
Where people get burned
The classic trap is expecting a token to be replaced when it's not in the prompt. Prompt Core only substitutes what's there - if your manual prompt never mentions SCENE, the scene line won't insert. That's by design in Classic (Studio adds explicit placement modes); the fix is to put the tokens in your template. The other common hiccup is renaming a log file after selecting it - the selection goes stale, Prompt Core self-heals to [None], and you reselect. If a saved prompt looks wrong, check whether cleanup rules are eating something you actually wanted; that regex is powerful enough to mangle a prompt if you loosen it.
Inputs (34)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt_source | COMBO | manual | 3 options: manual, input, log |
| manual_prompt | STRING | — | |
| prompt_log_file | COMBO | [None] | 5 options: [None], prompts/Creative Library/MASTER - Ready Prompts.txt, prompts/Creative Library/MASTER - Saved Recipe Prompts.txt, prompts/Creative Library/Prompts/All Prompts.txt, prompts/Creative Library/Templates/All Templates.txt |
| prompt_mode | COMBO | increment | 5 options: fixed, increment, decrement, randomize, shuffle |
| prompt_index | INT | 0-2147483648–2147483647 | — |
| outfit_token_A | STRING | OUTFIT_A | — |
| outfit_log_file_A | COMBO | [None] | 2 options: [None], outfits/Creative Library/MASTER - Outfit Looks.txt |
| outfit_mode_A | COMBO | randomize | 5 options: fixed, increment, decrement, randomize, shuffle |
| outfit_index_A | INT | 0-2147483648–2147483647 | — |
| outfit_token_B | STRING | OUTFIT_B | — |
| outfit_log_file_B | COMBO | [None] | 2 options: [None], outfits/Creative Library/MASTER - Outfit Looks.txt |
| outfit_mode_B | COMBO | randomize | 5 options: fixed, increment, decrement, randomize, shuffle |
| outfit_index_B | INT | 0-2147483648–2147483647 | — |
| outfit_token_C | STRING | OUTFIT_C | — |
| outfit_log_file_C | COMBO | [None] | 2 options: [None], outfits/Creative Library/MASTER - Outfit Looks.txt |
| outfit_mode_C | COMBO | randomize | 5 options: fixed, increment, decrement, randomize, shuffle |
| outfit_index_C | INT | 0-2147483648–2147483647 | — |
| scene_token | STRING | SCENE | — |
| scene_log_file | COMBO | [None] | 2 options: [None], scenes/Creative Library/MASTER - Scenes.txt |
| scene_mode | COMBO | randomize | 5 options: fixed, increment, decrement, randomize, shuffle |
| scene_index | INT | 0-2147483648–2147483647 | — |
| name_token | STRING | NAME | — |
| name_value | STRING | — | |
| item_token | STRING | ITEM | — |
| item_value | STRING | — | |
| prefix_enabled | BOOLEAN | false | — |
| prefix_text | STRING | — | |
| suffix_enabled | BOOLEAN | false | — |
| suffix_text | STRING | — | |
| prefix_suffix_separator | STRING | , | — |
| cleanup_enabled | BOOLEAN | true | — |
| cleanup_rules | STRING | \?\[|\] \\?[()] :\s*[+-]?(?:\d+(?:\.\d*)?|\.\d+) | — |
| saved_prompt | STRING | — | |
| manual_prompt_inputopt | STRING | — |
Outputs (14)
| Name | Type | Description |
|---|---|---|
| final_prompt | STRING | — |
| source_prompt | STRING | — |
| prompt_line | STRING | — |
| outfit_line | STRING | — |
| scene_line | STRING | — |
| prompt_index_resolved | INT | — |
| outfit_index_resolved | INT | — |
| scene_index_resolved | INT | — |
| prompt_count | INT | — |
| outfit_count | INT | — |
| scene_count | INT | — |
| prompt_file | STRING | — |
| outfit_file | STRING | — |
| scene_file | STRING | — |