Nodes/ComfyUI_NYJY/CivitaiPrompt(NYJY)
ComfyUI Node

CivitaiPrompt(NYJY)

Pull real positive/negative prompts off Civitai for inspiration

By aidenli·Created 2 years ago·Updated 4 months ago· 146
CivitaiPrompt(NYJY)
    • positive
    • negative
    • image
    • image_id
    fixed_prompttrue
    preview_imagetrue
    mirror_sitesfalse
    sort_typeMost Reactions

    Writer's block in a diffusion workflow is a weird thing to have, but it's real: you've got a model loaded, a sampler ready, and no idea what to actually ask for. This node solves that in the most direct way possible - it pulls a random image from Civitai's top images, reads that image's stored metadata, and hands you the positive prompt, the negative prompt, and the image itself. Plug the STRING outputs into your CLIP Text Encode nodes and you're generating from a real, community-upvoted prompt instead of staring at a blank box.

    How it works

    CivitaiPrompt hits Civitai's internal image.getInfinite endpoint (the same one the browse pages use) and scrolls the top images for the sort mode you pick. For each candidate it filters to images that actually carry metadata (hasMeta), then returns the stored prompt pair. The image output is the fetched preview, so you can see what that prompt actually produced before you commit to it. Everything the node fetches is also saved under output/civitai_prompt for later reference.

    The inputs that matter

    • sort_type - how the top list is ordered: Most Reactions (default), Most Comments, Most Collected, or Oldest. Most Reactions is the "what's the community loving today" mode; Oldest is a fun time machine.
    • fixed_prompt - the important one. On (default), the node grabs an image once and then stays put - same prompt every re-run until you change something - which is what you want while you tune the sampler around a prompt you like. Turn it off and every run rolls a new random image.
    • preview_image - off if the fetch is slow; the image download is the biggest time sink, and if you only care about the prompts you can kill it.
    • mirror_sites - off uses civitai.com directly (needs a working connection to it), on switches to the civitai.work mirror. The author's own advice: if you can reach Civitai normally keep it off, because the mirror is noticeably slower.

    Four outputs: positive (STRING), negative (STRING), image (IMAGE), and image_id (STRING - the Civitai image ID, useful for finding the source post).

    Installing

    Pack install, same as every NYJY node: ComfyUI Manager → Install via Git URL → https://github.com/aidenli/ComfyUI_NYJY, restart. No model downloads. The fake_useragent dependency handles the request headers.

    Common issues & honest caveats

    Node returns nothing. Per the author this usually means the API request timed out - just re-run it. If you're getting consistently nothing, check that you can actually reach the host in a browser; blocked or slow connections (especially if you rely on a proxy) will do it. On Windows the node can read your system proxy automatically; elsewhere set Google.proxy in the pack's config.json if you need one.

    Expect the prompt quality to vary a lot. You're sampling community metadata, which means the occasional masterpiece and the occasional Danbooru-tag soup or A1111-style negative wall. That's the nature of the source, not a bug. It's an inspiration scraper - treat its output as a starting point, run it through a prompt-cleanup pass if you care, and remember that many Civitai posts these days carry sparse or one-line metadata because more and more creators generate with settings that don't embed full prompts. When the well runs dry, flip the sort or roll again.

    CategoryNYJY/text

    Inputs (4)

    NameTypeDefaultDescription
    fixed_promptBOOLEANtrue
    preview_imageBOOLEANtrue
    mirror_sitesBOOLEANfalse
    sort_typeCOMBOMost Reactions4 options: Most Reactions, Most Comments, Most Collected, Oldest

    Outputs (4)

    NameTypeDescription
    positiveSTRING
    negativeSTRING
    imageIMAGE
    image_idSTRING