LLM Preset Loader
System prompts as a dropdown, not copy-paste
- text
LLM Preset Loader is the pack's answer to "I have four standing system prompts and I'm sick of pasting them." It lists the .txt files in the pack's own presets/ directory as a dropdown, and outputs the chosen file's contents as a STRING you can wire into a generation node's system_prompt (or prompt). It's the sibling of LLM Load Text File - same job, different home folder: that one reads ComfyUI's input directory, this one reads the pack's presets folder.
The mechanism is a plain sorted directory scan plus a file read. On node load, it lists every *.txt in <ComfyUI>/custom_nodes/comfyui-llm-bikeshed/presets/ (a README.txt there is deliberately excluded so it doesn't pollute the list), sorts them, and populates the preset dropdown. Pick one and the node returns its contents as a single STRING on the text output. No files present, and the dropdown shows "(no presets found)" while the output is an empty string instead of an error - so the node is safe to drop into a graph before you've added any presets.
What you'd use it for
Long-lived role instructions are the natural fit: "You are a prompt engineer for Flux. Turn rough ideas into detailed prompts.", style guides, NSFW-tolerance framing, output-format rules. In the pack's own examples, presets are exactly this - reusable system-prompt chunks you swap by changing one dropdown instead of rewriting a widget. It's the "LLM as a tool in the graph" pattern from llm-in-comfyui.md applied to the boring-but-real part: keeping your model's instructions as editable files rather than buried in workflow JSON, which also means you can version them, diff them, and share a whole workflow without dragging instruction text around.
The node re-reads the file on every run (its IS_CHANGED returns NaN, the always-rerun idiom from comfyui-node-plumbing.md), so editing a preset file takes effect immediately - no node refresh.
The practical bits
- Add presets by dropping
.txtfiles into<ComfyUI>/custom_nodes/comfyui-llm-bikeshed/presets/, then restart ComfyUI or refresh the node so the dropdown sees them. - There's a path guard (the node resolves and verifies the file stays inside the presets directory) - a small security-conscious touch for a node that reads user-named files.
- Because it outputs plain STRING, you can also chain it: wire a preset into a text-concat or switch node, or feed it anywhere else a string is accepted - it doesn't have to be a system prompt.
- One minor trap: the preset lives in the pack's directory, which a ComfyUI update or reinstall could clobber. If a preset is precious, keep the canonical copy somewhere safe and treat the presets folder as a working area. LLM Load Text File is the alternative if you'd rather keep files in the input folder.
Install
Pack standard: ComfyUI Manager search "comfyui-llm-bikeshed", or clone into custom_nodes/ and pip install -r requirements.txt. Only pyyaml and requests (already in ComfyUI core), no model downloads, and it doesn't need a backend or config - it's pure file I/O, so it works before you've even pointed a provider at LM Studio.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| preset | COMBO | llamacpp_oai_system.txt | 1 options: llamacpp_oai_system.txt |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |