Nodes/comfyui-primeia-prompts/🎯 PrimeIA Prompt Selector
ComfyUI Node

🎯 PrimeIA Prompt Selector

The one PrimeIA node that works without an API key

By BarbuPrime·Created 7 months ago·Updated 3 months ago· 0
🎯 PrimeIA Prompt Selector
    • positive_prompt
    • negative_prompt
    • tags
    • safety_level
    • score
    ◄prompts_json—►
    â—„selected_index0â–º

    Of the four nodes in comfyui-primeia-prompts, this is the odd one out, and the most useful for that exact reason. PrimeIAPromptSelector never touches the network and never asks for a key. No primeia_ API key, no Skool membership, no phone-home. You hand it a JSON array of prompt objects and an index, and it hands back the positive prompt, negative prompt, tags, safety level, and score of the one you pointed at. It's the pack's offline escape hatch - and in a pack whose other three nodes are all gated behind a paid API, that's the thing worth knowing about it.

    How it works

    The mechanism is embarrassingly simple, which is why it's reliable. The node calls json.loads on whatever string you feed into prompts_json, clamps selected_index to the length of the array, and reads the fields it expects off the object at that position: prompt_positive, prompt_negative, tags, safety_level, score. That's it. No caching, no state, no network. If the JSON doesn't parse, it returns empty strings with safety_level set to "error" so you at least know something went wrong.

    The schema is the catch, and it's the pack's dirty secret: the README is literally one line ("7500 prompts at Primeia"), so the exact shape of the JSON isn't documented anywhere in the repo. The shape the code expects is whatever the PrimeIA API returns - objects with those five keys plus an id. Get the keys right and everything flows; get them wrong and you get empty outputs and a quiet console error rather than a helpful message.

    The inputs and outputs that matter

    Only two required inputs, and both are plain:

    • prompts_json - a STRING holding a JSON array of prompt objects. It's multiline and forceInput, which means you can also wire a STRING socket into it instead of typing. That's the workflow-friendly move: pull the list from another node or a text file and select against it.
    • selected_index - an INT from 0 to 999. This is the dial. Drive it from an integer node if you want to step through a list programmatically.

    Outputs are the same five every PrimeIA node emits: positive_prompt, negative_prompt, tags (joined into one comma-separated string), safety_level, and score as an INT. Wire positive_prompt into your CLIP Text Encode's positive input, negative_prompt into the negative, and you've got a complete conditioning path.

    Why you'd actually use it

    Two reasons. First, it's the only node in the pack you can use with zero commitment - if a Skool friend exports you a JSON blob of prompts, you can browse and select all day without a key. Second, it's the most predictable node in the pack: no 30-second API timeout, no server hiccup, no cache to bust. If you already have the data, this is the honest, boring, dependable way to pick from it.

    Installing and troubleshooting

    Same install as the rest of the pack: in ComfyUI Manager search "comfyui-primeia-prompts", or cd ComfyUI/custom_nodes && git clone https://github.com/BarbuPrime/comfyui-primeia-prompts, then restart ComfyUI. The only dependency is requests, which ComfyUI already ships, so there's nothing heavy to download. No model files, no weights.

    The one failure mode to expect is malformed JSON - paste it into a JSON validator if your outputs come back empty, and double-check the field names match what I listed above. Out-of-range indexes don't error; the node just clamps to the last item, so a bad index gives you a wrong-but-valid-looking prompt rather than an obvious failure.

    CategoryPrimeIA/Prompts

    Inputs (2)

    NameTypeDefaultDescription
    prompts_jsonSTRING—
    selected_indexINT00–999—

    Outputs (5)

    NameTypeDescription
    positive_promptSTRING—
    negative_promptSTRING—
    tagsSTRING—
    safety_levelSTRING—
    scoreINT—