Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!

ComfyUI Node: Prompt Stack

Class Name

PromptStack

Category
text
Author
ComfyNodePRs (Account age: 0days)
Extension
PR-comfy-prompt-db-9eb5fdba
Latest Updated
2025-10-22
Github Stars
0.0K

How to Install PR-comfy-prompt-db-9eb5fdba

Install this extension via the ComfyUI Manager by searching for PR-comfy-prompt-db-9eb5fdba
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter PR-comfy-prompt-db-9eb5fdba in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Prompt Stack Description

Combines enabled saved prompts in row order into one string using a customizable separator.

Prompt Stack:

Archived source: The original repository benstaniford/comfy-prompt-db is unavailable. This page documents the preserved implementation at commit 8fcd089332af. It is a historical source snapshot, not a claim that the original repository is maintained or currently installable.

PromptStack combines saved prompt text from your prompt database into one string. It looks up each selected prompt, keeps the entries that are enabled and found in the database, and joins their text in row order. This lets you build a longer prompt from reusable pieces without repeatedly copying and pasting them.

Prompt Stack Input Parameters:

separator

A STRING placed between the text of each included prompt. Its default is , (a comma followed by a space). For example, two saved prompts containing “soft lighting” and “detailed background” produce “soft lighting, detailed background” with the default separator. You can use a different string, including an empty string, to change how the pieces meet. No minimum or maximum length is specified.

preview_text

A multiline STRING with the default Preview of stacked prompts will appear here.... It is present in the node interface, but the provided implementation does not use its value when building the result. Changing it does not change the stacked prompt. No minimum or maximum length is specified.

prompt_1_category

An optional category dropdown that identifies where to look for the first selected prompt. Its options come from the category keys in your prompts.json database, so there is no fixed list. The default is the first available category; if none are available when the interface is built, the fallback option and default are default. The category must contain the selected prompt name for that prompt’s text to be included. Minimum and maximum values do not apply to this dropdown.

prompt_1_name

An optional prompt-name dropdown for the first selected prompt. Its options are gathered from names across all categories in your prompts.json database, and its default is the first name in the resulting list. If no names are available, the fallback option and default are new prompt. A name appearing in this dropdown is not necessarily present in the category you selected; only a matching category-and-name pair contributes text. Minimum and maximum values do not apply to this dropdown.

prompt_1_enabled

An optional BOOLEAN that controls whether the first selected prompt can contribute to the result. Its default is true. When set to false, that prompt is skipped even if its category and name match a saved entry. Its options are true and false; numeric minimum and maximum values do not apply.

Prompt Stack Output Parameters:

stacked_prompts

A STRING containing the text of all enabled, successfully found prompts, joined with the chosen separator in ascending row-number order. It contains the saved prompt text, not the category or prompt names. If no entries qualify—for example, because they are disabled, missing, or unavailable in the database—the output is an empty string. The separator appears only between included prompts, not before the first or after the last.

Prompt Stack Usage Tips:

  • Choose a category and a prompt name that belong together. The name dropdown draws from every category, but the lookup uses the specific category you selected.
  • Use additional frontend-added prompt_N_category, prompt_N_name, and prompt_N_enabled rows to combine more saved prompts. These are dynamic repeated rows, not additional fixed input parameters. Rows are processed by their numeric N value, so their numbering determines the order of the output.
  • Turn off a row’s enabled setting to leave it out of the result without changing its category or name. Missing enabled values on dynamic rows are treated as enabled.
  • Set separator to the punctuation or spacing you want between prompt pieces. For example, retain the default , for comma-separated phrases; use a newline when each saved prompt should begin on its own line. Check that your saved text and separator do not create unwanted duplicate punctuation.
  • Keep the saved entries in prompts.json current. PromptStack reads that file when it builds the output; changing preview_text does not edit saved prompts or affect the result.

Prompt Stack Common Errors and Solutions:

Error creating prompts.json: <details>

  • Explanation: The node attempted to create a missing prompts.json file from its default prompts, but file or folder creation failed. The text after the colon contains the underlying error.
  • Solution: Check that the prompt-database location exists or can be created and that the application has permission to write there. Use the underlying error details to identify issues such as a read-only folder or full disk.

Error loading categories for Prompt Stack INPUT_TYPES: <details>

  • Explanation: The node could not load category and prompt-name options while building its interface. Possible causes include an unreadable or invalid prompts.json file. The interface then falls back to default and new prompt if it has no categories or names.
  • Solution: Check that prompts.json can be read and contains valid JSON organized as categories with prompt names beneath them. Correct the issue shown after the colon, then refresh the node interface.

Empty stacked_prompts output

  • Explanation: This is a possible result, not a reported error message. The node returns an empty string when it finds no enabled rows with both a category and name matching nonempty saved prompt text. A missing or unreadable database during execution can also leave it with no text to combine; that read failure is not reported by this function.
  • Solution: Confirm that at least one row is enabled, its category and name match an entry in prompts.json, and that entry contains text. Also check that the database file exists and contains valid JSON.

Selected prompt name produces no text

  • Explanation: This is a possible symptom, not a reported error message. The name dropdown includes names from all categories, so a visible name may not exist under the currently selected category. The node skips that combination without reporting an error.
  • Solution: Select the category containing that name, or choose a prompt name saved under your current category.

Prompt Stack Related Nodes

Go back to the extension to check out more related nodes.
PR-comfy-prompt-db-9eb5fdba
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Prompt Stack