Nodes/Civitai Prompt Stats Node/Civitai Prompt Stats (CKPT)
ComfyUI Node

Civitai Prompt Stats (CKPT)

Read a checkpoint's most-used prompts straight off Civitai

By BAIKEMARK·Created about a year ago·Updated about a year ago· 5
Civitai Prompt Stats (CKPT)
    • positive_prompt
    • negative_prompt
    file_name
    top_n20
    max_pages3
    sortMost Reactions
    timeout10
    retries2
    force_refreshno

    You download a new checkpoint, load it, and stare at the empty prompt box wondering what the ecosystem actually does with this thing. Scrolling the model page's gallery is slow and anecdotal. Civitai Prompt Stats (CKPT) is the shortcut: pick the model file from a dropdown and it goes to Civitai, finds the exact file, and comes back with the most frequently used positive and negative prompt tags across the community images generated with it. It's a research node - a cheat sheet you read, then throw out of the graph.

    Mechanism first, because it sets honest expectations. The node computes the SHA-256 hash of your local checkpoint, looks it up against Civitai's by-hash API to get the model version ID, then fetches up to max_pages of images that used that version - 100 per page, pulled in parallel rather than one by one. It parses each image's stored prompt and negative prompt by splitting on commas and weight brackets, then tallies every tag with a counter and ranks them. Results are cached on disk keyed by hash + sort + page count, so re-runs are nearly instant; force_refresh = yes re-pulls from Civitai.

    That parsing detail matters more than it looks. A prompt like masterpiece, best quality, (detailed face:1.2), 1girl is split into its component tags, and each is counted separately. So the two outputs, positive_prompt and negative_prompt, are ranked lists of individual tags with counts - 0 : "1girl" (834) - not whole prompts you can paste. The top of the positive list will be dominated by generic quality tags, which is noise; the useful signal is the second tier where the actual style and subject vocabulary shows up. For the negative output it's genuinely gold: seeing that half the community consistently writes lowres, bad anatomy tells you what the model's weak spots are without generating a single image. Wire both into Show Text nodes to read them.

    The inputs are shared with the pack's LORA node, and only a few matter at first. file_name is a dropdown auto-filled from your checkpoints folder - no path typing. top_n (default 20, up to 200) sets how many ranked entries each output carries. max_pages (default 3, up to 50) sets the size of the census: more pages means a wider, more reliable sample, at the cost of more API calls and a slower first run. sort (Most Reactions by default, plus Most Comments and Newest) changes which images get counted - worth flipping if you want what people do now rather than what got upvoted. timeout, retries, and force_refresh are the reliability knobs.

    Install is the same for both nodes in this pack, since they ship together. In ComfyUI Manager, search "Civitai Prompt Stats"; or cd ComfyUI/custom_nodes && git clone https://github.com/BAIKEMARK/ComfyUI_Civitai_Prompt_Stats, then restart. You'll find both nodes under the Civitai category. No extra dependencies - the pack only uses requests, which ComfyUI already bundles - and no model downloads. It's a small, lightly-maintained utility from a solo author (Mark_Bai), with essentially no community chatter behind it, which is fine: zero-dependency nodes like this are about as low-risk as custom nodes get in an ecosystem where installs are the main attack surface.

    Where people get burned: the hash lookup fails silently for checkpoints whose exact bytes were never uploaded to Civitai - private uploads, heavy merges - and you get empty strings, which looks like a bug but isn't. And the first run on a multi-gigabyte checkpoint hashes the whole file, which can take a while; the hash is then cached by file size and mtime. Finally, if you scan a stack of different models in one session you may start hitting Civitai's rate limits - that's literally what timeout and retries exist for, so bump them and wait.

    CategoryCivitai

    Inputs (7)

    NameTypeDefaultDescription
    file_nameCOMBO1 options:
    top_nINT201–200
    max_pagesINT31–50
    sortCOMBOMost Reactions3 options: Most Reactions, Most Comments, Newest
    timeoutINT101–60
    retriesINT20–5
    force_refreshCOMBOno2 options: no, yes

    Outputs (2)

    NameTypeDescription
    positive_promptSTRING
    negative_promptSTRING