Load Image Info From Civitai
Pull a real prompt straight off Civitai
- Image
- Mask
- Prompt
Most of the nodes in this pack draw from a bundled offline library of prompts. This one doesn't - it reaches out live to Civitai and pulls back a real image and the prompt that made it. If you've ever seen an image you liked on Civitai and wished you could just grab its prompt into your workflow without alt-tabbing and copy-pasting, this is that, as a node.
How it works
It's a fetch-and-return node: it goes and gets an entry from Civitai, and depending on how you've configured output_type, gives you back the image, the prompt text, or both. There's no complex pipeline here - the value is entirely in not leaving ComfyUI to do it manually.
The inputs and outputs that matter
output_type-OnlyPrompt(default),Img+Prompt, orImg.OnlyPromptis the cheap option: no image download, just the text, which is what most people actually want when they're prompt-hunting.nsfw- a boolean switch to pull from Civitai's NSFW content instead. The tooltip is explicit that it doesn't work out of the box: it needs a file calledcivit_nsfw.jsonsitting in the pack'stxtfilesfolder, and the tooltip's own words are "otherwise it is invalid." The pack doesn't ship that file for you - you have to supply it yourself.proxy- only matters if you're fetching an actual image (ImgorImg+Prompt). The default value,http://127.0.0.1:None, is a placeholder, not a working address; if Civitai is unreachable from where you're running ComfyUI, this is where you'd point at a real proxy.seed- picks which entry you get back.
Outputs are Image (IMAGE), Mask (MASK), and Prompt (STRING). The mask output is there for wiring convenience - most people pulling prompts off Civitai can safely ignore it and just take Prompt.
How to install it
ComfyUI Manager: search "ComfyUI_OneButtonPrompt", install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/billwuhao/ComfyUI_OneButtonPrompt_Flux
Restart ComfyUI afterward. No formal dependency list is given in the README; if it fails to import, check ComfyUI's console for a missing package (network-fetch nodes like this typically need requests or similar) and install into your ComfyUI environment.
Common issues
Image fetches hang or time out, but prompt-only works fine. That's the proxy field. Civitai isn't reachable from everywhere without one, and the node's default value is not a real address - it's a stand-in you're expected to replace with your own working proxy if you hit this. If you only ever need OnlyPrompt, you can ignore this entirely, since it never touches the network for an image.
nsfw=true doesn't seem to do anything. By design, per the tooltip - it silently does nothing useful unless you've dropped civit_nsfw.json into the pack's txtfiles folder yourself. There's no error, it just falls back to invalid/default behavior.
Getting the same result every time. Change seed - it's what selects which entry comes back from the pool.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| output_type | COMBO | OnlyPrompt | 3 options: Img, Img+Prompt, OnlyPrompt |
| nsfw | BOOLEAN | false | When True, need `civit_nsfw.json` in the `txtfiles` folder, otherwise it is invalid |
| proxy | STRING | http://127.0.0.1:None | When load Img, if unable to access Civitai site, proxy needs to be filled in |
| seed | INT | 00–18446744073709550000 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| Image | IMAGE | — |
| Mask | MASK | — |
| Prompt | STRING | — |