Nodes/comfy-intelliprompt/✨ intelliPrompt
ComfyUI Node

✨ intelliPrompt

The prompt scrubber that still works when the internet doesn't

By galpt·Created 4 months ago·Updated 4 months ago· 1
✨ intelliPrompt
    • optimized_prompt
    promptA beautiful sunset over the mountains
    optimizer_seed42
    use_apitrue
    preserve_negative_termsfalse
    quality_tagsmasterpiece, best quality, detailed

    Type "a beatiful sunset over the mountains" and the model dutifully renders a beatiful sunset. The typo is yours, and intelliPrompt is here to catch it before it ever reaches the sampler. It's a prompt-optimizer node that sits between your prompt and CLIPTextEncode: it fixes common English typos, balances dangling parentheses/brackets/braces, cleans up spacing and punctuation, and can optionally phone a free AI to enrich the prompt. The name is slightly oversold - it's not an "intelligent" agent, it's a smart text scrubber with an AI mode bolted on. But that's fine, because the thing it does, it does without ever breaking your workflow.

    Why you'd reach for it

    Prompt enhancement is a genuinely current category, not a gimmick - the KB's own counts have prompt enhancer mentions climbing from 12 in 2023 to 253 in the first half of 2026. Most of that is people letting an LLM write or polish prompts. intelliPrompt's local mode is a lighter version of that: it's instant, offline, and deterministic. If you're on SDXL-lineage anime models (Illustrious, NoobAI, Pony), the quality-tag behavior is the real draw - masterpiece, best quality is trained-in vocabulary there, so the node appending it if missing is genuinely useful.

    One honest caveat, grounded in the KB: on LLM-encoded 2026 models (Z-Image, Flux 2 Klein, Anima), masterpiece, 8k, best quality is inert vocabulary - A/B tests show it changes nothing on Z-Image. So the same feature that helps your Illustrious workflow is dead weight on a modern one. Fine if you know what model you're feeding; just don't expect magic.

    How it works

    Two modes. With use_api off (or the API unreachable), the local path does four things in order: regex typo replacement (a real list in the source - tehthe, recievereceive, definatelydefinitely, seperateseparate, and friends), delimiter balancing for () [] {}, whitespace/punctuation normalization, then quality-tag appending if none present.

    With use_api on (the default), it POSTs your prompt to text.pollinations.ai - a free, keyless text API, no account needed - with a system prompt that tells it to act as a prompt engineer: fix grammar, translate non-English to English, add sensory detail, keep it under 200 tokens. Ten-second timeout. And here's the architecture choice that makes the node hard to break: on any failure - missing requests, timeout, non-200 response - it logs a [intelliPrompt] ... using local processing warning to the console and falls back to the local scrubber instead of erroring out. Pollinations is genuinely flaky (the community calls it slow, down, or inconsistent), so that fallback isn't a hypothetical; it's the feature.

    One small detail worth knowing: the seed input is named optimizer_seed, not seed, deliberately - ComfyUI special-cases any input literally named "seed" for its own rerun logic, which would break batching. Renaming dodges that.

    Inputs and outputs

    Only a few matter, and they're all in the node's schema:

    • prompt - multiline. Write here; keep the downstream CLIPTextEncode text box blank.
    • use_api - on by default. Turn off for pure local processing.
    • preserve_negative_terms - flip this for negative prompts. Conservative local cleanup only: no quality tags, no API, no "positive-only" rewrites (like realisticphotorealistic). This is the one beginners forget and it saves you from "masterpiece" appearing in your negative.
    • quality_tags - optional, defaults to masterpiece, best quality, detailed. Only used in normal local mode.
    • optimizer_seed - controls API-mode consistency.

    Output is a single optimized_prompt string. Wire it into CLIPTextEncode's text input and you're done.

    Installing it

    Standard custom-node fare - ComfyUI Manager (search "intelliPrompt"), or:

    cd /path/to/ComfyUI/custom_nodes
    git clone https://github.com/galpt/comfy-intelliPrompt.git
    

    Then restart ComfyUI. No model downloads, no heavy deps: the pyproject declares zero Python requirements, and the code lazy-imports requests so even local-only installs work. torch is only needed by the pack's other node, the latent preset - not this one.

    Where people get burned

    • Silent fallback. If Pollinations is down, you get the local result with only a console warning - no node error. That's usually good, but if you expected the AI version and got the scrubber, check your console.
    • Quality tags on the wrong model. On a 2026 LLM-encoded checkpoint those default tags are inert tokens. Empty the quality_tags field if you don't want them.
    • Negatives through the wrong path. Feed a negative prompt in with preserve_negative_terms off and it'll happily add "masterpiece" to it. Toggle it.
    • Empty prompt returns an empty string - it won't crash, it just does nothing.

    It's a small pack with a small job, but it does that job without drama - which, in the dependency-hell world of ComfyUI custom nodes, is more of a compliment than it sounds.

    Categoryutils

    Inputs (5)

    NameTypeDefaultDescription
    promptSTRINGA beautiful sunset over the mountainsWrite the prompt in this node. The optimized output should feed into CLIPTextEncode, whose text box stays blank.
    optimizer_seedINT420–9999999999Seed used only by intelliPrompt optimization. Renamed to avoid ComfyUI special-casing of inputs literally named 'seed'.
    use_apiBOOLEANtrueUse Pollinations API for advanced optimization. Disable to use local processing only. Ignored when preserve_negative_terms is enabled.
    preserve_negative_termsBOOLEANfalseEnable for negative prompts. Uses conservative local cleanup only, preserves negative terms, and disables API and quality-tag enrichment.
    quality_tagsoptSTRINGmasterpiece, best quality, detailedOptional quality enhancement tags used only in normal local mode. Ignored when preserve_negative_terms is enabled or when API output is used.

    Outputs (1)

    NameTypeDescription
    optimized_promptSTRING