Extensions/comfyui-prompt-shelf
ComfyUI Extension

comfyui-prompt-shelf

Prompt Shelf is a small ComfyUI custom node pack for reusable prompt text, named prompt fragments, resolution presets, and simple string combining.

By timonknispel·Created 3 months ago·Updated 3 months ago· 0
timonknispel/comfyui-prompt-shelf
Nodes
On cloudLocal install
Stars0
Updated3 months ago
Readme

ComfyUI Prompt Shelf

Prompt Shelf is a small ComfyUI custom node pack for reusable prompt text, named prompt fragments, resolution presets, and simple string combining.

It is designed for workflows where you often switch between model families, prompt presets, character fragments, styles, scenes, or other reusable strings without editing the same values again and again.

Nodes

Prompt Shelf currently provides these main nodes:

| Node | Purpose | | --- | --- | | Resolution Shelf | Select a saved resolution by key and output width, height, and key. | | Resolution Shelf Editor | Add, update, or remove resolution presets. | | String Shelf | Select a saved string by key and output the string plus its key. | | String Shelf Editor | Add, update, or remove named multiline strings. | | String Shelf Connector | Combine any number of string inputs with a custom delimiter. | | List Shelf Keys | Output and preview all available keys from the String or Resolution shelf. |

An example workflow is included at:

example_workflows/Shelf example.json

Installation

Clone or copy this repository into your ComfyUI custom_nodes folder:

cd ComfyUI/custom_nodes
git clone <this-repository-url> comfyui-prompt-shelf

Then restart ComfyUI and refresh your browser.

All nodes appear in the Prompt Shelf category.

Resolution Shelf

Use Resolution Shelf when you want to select common image or video dimensions from a saved list.

Inputs

| Input | Description | | --- | --- | | key | The resolution group to use, for example FLUX.1, SDXL / Pony XL, or Wan2.1 720p. | | resolution | Dropdown with the saved resolutions for the selected key. | | width / height | Manual values used when Custom input is selected. | | flip_width_height | Swaps width and height when enabled. | | resolution_index | Optional connected integer input. 0 selects the first saved resolution, 1 the second, and so on. |

Outputs

| Output | Description | | --- | --- | | width | Selected width. | | height | Selected height. | | key | The selected resolution key. |

Notes

  • The node includes an Existing keys dropdown for quick key selection.
  • If resolution_index is connected, it overrides the dropdown selection.
  • If the index is larger than the list, the last available item is used.
  • Default resolution presets are loaded from defaults/resolutions.json.

Resolution Shelf Editor

Use Resolution Shelf Editor to manage saved resolution presets.

How It Works

  1. Choose an existing key or type a new key.
  2. Select an existing resolution or use Custom input.
  3. Enter width and height.
  4. Use the save/update button.

The save button changes depending on the current selection:

| Button | Meaning | | --- | --- | | Save current resolution | Adds a new resolution to the current key. | | Update current resolution | Replaces the selected resolution with the current width and height. |

Use Remove selected resolution to remove the currently selected preset.

Default and User Presets

Built-in default resolutions stay in the repository. User changes are stored separately in the local user folder:

user/resolutions.json

This means users can install updates without losing their custom resolution changes. If a default resolution is removed through the editor, that removal is also remembered in the user file.

String Shelf

Use String Shelf to select reusable prompt text or any other saved multiline string.

Inputs

| Input | Description | | --- | --- | | key | The string group to use, for example character, style, or scene. | | text | The selected text, or a manual fallback value. | | saved_string_index | Optional connected integer input. 0 selects the first saved string, 1 the second, and so on. |

Outputs

| Output | Description | | --- | --- | | text | The selected or manually entered string. | | key | The current string key. |

Notes

  • The node includes an Existing keys dropdown.
  • The Saved strings dropdown shows the saved names for the current key.
  • If saved_string_index is connected, it overrides the dropdown selection.
  • The multiline text field is placed at the bottom so the active output text is easy to inspect.

String Shelf Editor

Use String Shelf Editor to create and maintain named strings.

Each saved string has:

| Field | Description | | --- | --- | | key | The group the string belongs to. | | name | A short name shown in dropdowns. | | text | The full multiline string. |

How It Works

  1. Choose an existing key or type a new key.
  2. Choose an existing saved string or select No saved string.
  3. Enter a name.
  4. Enter the multiline text.
  5. Save or update the entry.

The save button changes depending on the current selection:

| Button | Meaning | | --- | --- | | Save current string | Adds a new named string. | | Update current string | Replaces the selected string or the string with the same name under the current key. |

Use Remove selected string to delete the selected entry.

Default and User Presets

Built-in default strings are stored in the repository:

defaults/strings.json

User-created strings, updated default strings, and removed default strings are stored separately in:

user/strings.json

This keeps local user edits separate from repository defaults, so updates can add or change bundled defaults without overwriting a user's personal string shelves.

String Shelf Connector

Use String Shelf Connector to combine multiple string inputs into one output.

Inputs

| Input | Description | | --- | --- | | delimiter | Text inserted between each connected string. This is a single-line field. | | string_1, string_2, ... | Dynamic string inputs. A new empty connector appears automatically when needed. |

Output

| Output | Description | | --- | --- | | text | All connected strings joined by the delimiter. |

Example

With delimiter:

, 

And three connected strings:

masterpiece
best quality
cinematic lighting

The output becomes:

masterpiece, best quality, cinematic lighting

List Shelf Keys

Use List Shelf Keys when you want to output or inspect all available shelf keys.

Inputs

| Input | Description | | --- | --- | | shelf | Choose between String Shelf and Resolution Shelf. | | include_defaults | Includes built-in default keys when enabled. Disable it to output only user-created keys. |

Outputs

| Output | Description | | --- | --- | | keys | A ComfyUI list output containing the keys. | | keys_csv | The same keys as a comma-separated string. |

Built-In Preview

The node also shows an accordion preview directly inside the node:

  • Click a key to expand it.
  • Resolution keys show their saved dimensions.
  • String keys show their saved names and text.
  • The preview updates automatically when editor nodes save, update, or remove entries.

Included Default Resolution Keys

The repository includes default resolution groups for:

  • FLUX.1
  • SDXL / Pony XL
  • Stable Diffusion 3.5
  • Qwen-Image-2512
  • HiDream-I1
  • HunyuanImage-2.1
  • Wan2.1 480p
  • Wan2.1 720p
  • HunyuanVideo
  • HunyuanVideo 1.5
  • LTX-Video / LTXV
  • CogVideoX
  • Illustrious

You can add your own keys and resolutions with Resolution Shelf Editor.

Typical Workflow

  1. Use Resolution Shelf to choose the target size for a model family.
  2. Use one or more String Shelf nodes to select prompt fragments such as character, style, outfit, scene, or negative prompt.
  3. Use String Shelf Connector to join the selected fragments.
  4. Use List Shelf Keys when you need a quick overview of what is available.
  5. Use the editor nodes only when you want to manage saved presets.

Updating the Node Pack

Default presets live in the repository:

defaults/resolutions.json
defaults/strings.json

User changes are stored separately:

user/resolutions.json
user/strings.json

This helps protect local edits when the node pack is updated. The user folder is intended to stay local and should not be committed unless you deliberately want to share those personal presets.