Nodes/ComfyUI_CivitaiPromptPicker/Civitai Prompt Picker
ComfyUI Node

Civitai Prompt Picker

Mine Civitai's gallery for prompts — without leaving ComfyUI

By Aca233·Created 4 months ago·Updated 4 months ago· 0
Civitai Prompt Picker
    • prompt
    • negative_prompt
    • width
    • height
    • image
    limit12
    selected_prompt
    selected_negative_prompt
    selected_width_text
    selected_height_text
    selected_image_id
    next_page
    selected_image_url

    You know the loop. You're stuck on a prompt, tab over to Civitai, scroll until something clicks, copy the prompt and negative prompt by hand, squint at the resolution, paste it all back into ComfyUI, and hope the screenshot you're looking at kept the whole metadata block. The Civitai Prompt Picker exists to kill that loop. It embeds Civitai's image feed directly inside a node, and one click on a thumbnail dumps that image's prompt, negative prompt, width, and height into your graph - plus the actual image as a tensor, ready to wire somewhere.

    And the API-key field isn't a trap: basic use needs no key, no account, no model downloads, no GPU - just a read-only window into Civitai's public image API.

    How it works

    The pack is two pieces. The node you actually drop on the canvas is nearly a pass-through. All those inputs you see - selected_prompt, selected_negative_prompt, selected_width_text, selected_height_text, selected_image_id, next_page, selected_image_url - are hidden state. The embedded browser widget fills them in when you click a thumbnail, and on every run the node just echoes that state back out as the outputs. Its one bit of real work: when you wire the image output, it downloads the selected image from Civitai's CDN, fixes EXIF rotation, and hands you a tensor (cached, so re-runs are cheap). Leave the output unconnected and it skips the download entirely.

    The heavy lifting lives in the pack's own server routes and frontend JS. It adds a /civitai-prompt-picker/images endpoint to ComfyUI's web server that proxies Civitai's api/v1/images API, so the browser widget gets thumbnails with infinite scroll, plus filter dropdowns for time range, sort order, NSFW level, aspect ratio, and resolution. A "metadata-only" toggle is on by default - it prefers images that actually carry prompt data, which is the point. Double-click a thumbnail to jump to the page on Civitai; a star button saves favorites.

    This is a node that reaches the network by design, so it earns the once-over every API-touching pack gets in this ecosystem. Here the surface is small and honest: the only host it talks to is Civitai, image proxies are allowlisted to .civitai.com, and the whole thing is a handful of files you can skim in a minute. The optional key goes to Civitai as a header and lives in the browser's localStorage, not in your workflow - which means clearing site data wipes it, and don't paste it into someone else's shared graph.

    The inputs and outputs that matter

    Only one input you'll ever touch directly: limit (an INT, default 12, 1–60) controls how many thumbnails load per page. The rest of the fields are state the UI manages for you.

    • prompt and negative_prompt (STRING) - wire straight into your positive and negative CLIP Text Encode.
    • width and height (INT) - feed Empty Latent Image, so you reproduce the original aspect ratio without squinting.
    • image (IMAGE) - preview it, or use it as a reference in an IPAdapter or ControlNet. This is the sleeper feature: you're not just copying text, you're grabbing the source image itself.

    The gotcha that bites everyone once: until you click, the outputs are empty - empty prompt, 0×0 dimensions, blank image. It's a picker, not a generator; click first, run after.

    Install

    ComfyUI Manager is the easy path - search "Civitai Prompt Picker". Or clone it:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Aca233/ComfyUI_CivitaiPromptPicker.git
    

    Then restart ComfyUI. There's no requirements.txt and nothing heavy to pull: it runs on requests, aiohttp, PIL, numpy, and torch, all of which ship with stock ComfyUI. The repo includes an example workflow (workflows/civitai-prompt-picker-example.json) you can drag straight in.

    Common issues

    • Blank thumbnails. Civitai's CDN is flaky, and the pack knows it - it retries fetches (3 attempts), prefills the first screen in the background, and falls back to a local image proxy when upstream times out. Still seeing blank tiles? Refresh the feed before blaming your setup.
    • Fewer NSFW results than the site shows. Civitai's API returns mixed NSFW even when you filter, so the node re-filters locally to stay exact. And with no API key, logged-in-only or NSFW-visible images won't appear at all. Paste a key and you might still see fewer than the site - Civitai gates NSFW on your account's own visibility settings, not just the API key. That's the "where people get burned" one.
    • Offline is empty. It's a browser, not a local cache. No network, no gallery.

    One honest expectation: copying a prompt verbatim rarely reproduces an image - model, sampler, seed, and LoRAs all matter, and the metadata block only carries some of them. Use this as grounding, not a replication button: grab the prompt style and dims, grab the image for style reference, and build the rest yourself.

    Categorytext/Civitai

    Inputs (8)

    NameTypeDefaultDescription
    limitINT121–60
    selected_promptSTRING
    selected_negative_promptSTRING
    selected_width_textSTRING
    selected_height_textSTRING
    selected_image_idSTRING
    next_pageSTRING
    selected_image_urlSTRING

    Outputs (5)

    NameTypeDescription
    promptSTRING
    negative_promptSTRING
    widthINT
    heightINT
    imageIMAGE