Nodes/comfy_Pond_Nodes/🐳Prompt管理器
ComfyUI Node

🐳Prompt管理器

Your whole prompt bank as JSON, split into positive and negative

By Pondowner857·Created about a year ago·Updated 21 days ago· 45
🐳Prompt管理器
    • positive_prompt
    • negative_prompt
    prompts_json[]
    separator,
    use_weightstrue

    By the time a ComfyUI workflow has forty prompt variants, the string plumbing becomes the problem - not the generation. 🐳Prompt管理器 (CustomPromptManagerWithNegative) is the pack's answer: keep your prompts as one JSON array, and this node sorts them into positive and negative strings, applies per-item weights, and outputs the two prompt texts your CLIP encoder actually wants. It's prompt data management disguised as a node, and once you're maintaining prompts in a file, there's no going back to hardcoding strings.

    The mechanism is simple and visible. You feed prompts_json a list of objects like:

    [
      {"text": "masterpiece, best quality", "enabled": true, "weight": 1.0, "type": "positive"},
      {"text": "blurry, lowres", "enabled": true, "weight": 1.3, "type": "negative"},
      {"text": "skipped for now", "enabled": false, "weight": 1.0, "type": "positive"}
    ]
    

    For each enabled entry the node checks the type field, wraps the text in (text:weight) when the weight isn't 1.0 and use_weights is on, and appends it to the right pile. Then it joins each pile with separator (default ", ") and hands you two strings. Disabled entries are silently skipped - that's the toggle that lets you A/B test prompts without touching the pipeline.

    The inputs

    • prompts_json - required, the array above. It's a single-line STRING field, so you'll often paste compact JSON or source it from a text loader.
    • separator - optional, default ", ".
    • use_weights - optional, default true.

    Outputs

    • positive_prompt - everything typed positive, weight-wrapped and joined.
    • negative_prompt - the negative pile, same treatment.

    Wire those into the positive and negative slots of a CLIP Text Encode. The two-string split is the whole reason this node exists - most prompt managers only output one string, and you end up bolting on a splitter.

    Install and the honest take

    From comfy_Pond_Nodes (Manager search "comfy_Pond_Nodes", or git clone https://github.com/Pondowner857/comfy_Pond_Nodes + pip install -r requirements.txt). Pure JSON/string work - no models, no deps.

    Honest take: the Enhanced sibling adds tag filtering, and if you plan to run the same prompt bank under different content rules, just start with that one. But for the plain "split my JSON into positive/negative" job, this is the leaner node and there's no reason to carry the extra inputs. One catch for newcomers: the node assumes valid JSON. A stray comma or unescaped quote trips a JSONDecodeError that the node catches - it prints the error to the console and returns empty prompt strings rather than crashing. So a broken array doesn't fail loudly; it just silently gives you blank prompts. Validate your JSON before queueing (or paste it into any JSON checker first).

    Category🐳Pond/prompt

    Inputs (3)

    NameTypeDefaultDescription
    prompts_jsonSTRING[]
    separatoroptSTRING,
    use_weightsoptBOOLEANtrue

    Outputs (2)

    NameTypeDescription
    positive_promptSTRING
    negative_promptSTRING