Nodes/MW-ComfyUI_OneButtonPrompt/Load Image And Prompt From URL
ComfyUI Node

Load Image And Prompt From URL

Browse the pack's bundled prompt library, with search

By billwuhao·Created 2 years ago·Updated about a year ago· 24
Load Image And Prompt From URL
    • Image
    • Prompt
    • Imgurl
    json_1
    json_2
    in_orderfalse
    load_time2.0
    proxyhttp://127.0.0.1:None
    on_searchfalse
    search_forcat
    seed0

    Where LoadImageInfoFromCivitai reaches out live to Civitai on every run, this node pulls from JSON files the pack ships with you - pre-collected batches of image-and-prompt pairs, apparently gathered from Civitai scrapes at various points (the filenames literally carry scrape dates, like civit_imgs-prompts-20250329-01.json). Think of it as browsing a curated local cache rather than hitting the network cold each time, with a keyword search bolted on so you're not just picking blind.

    How it works

    You point it at one or two of the bundled JSON libraries, and it pulls an entry - an image URL, a prompt, and whatever else the JSON carries. The README calls this feature out directly: the prompts-images files support searching by word, so typing "cat" or "dog" returns entries whose prompts contain that word. That's not a guess - it's the pack's own stated behavior for exactly this file format.

    The inputs and outputs that matter

    • json_1 and json_2 - pick which bundled library (or two) to draw from. json_2 can be set to None if you only want one. The sample filenames span both a general SFW batch (250430-imgs-prompts-sfw.json) and several dated Civitai scrapes.
    • on_search / search_for - the keyword search the README describes. Set on_search=true and put your term in search_for (defaults to "cat") to filter down to entries whose prompts contain that word, instead of drawing randomly from the whole library.
    • in_order - off by default, meaning entries come out in a randomized order (driven by seed); turn it on to step through sequentially instead.
    • load_time - a delay of 0–10 seconds (half-second steps) on the fetch, most likely a timeout/pacing control for pulling the image over the network. Worth raising if you're on a slow or proxied connection.
    • proxy - same story as the Civitai-fetching node in this pack: only matters when you're actually downloading the image, and the default value is a placeholder you're meant to replace with a real proxy address if the source is unreachable directly.
    • seed - controls the random pick when in_order is off.

    Outputs: Image (the fetched picture), Prompt (the matching text), and Imgurl - the source URL of the image it picked, handy if you want to go look at the original post or grab it at full resolution.

    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. The README doesn't list a formal dependency file; if it fails to import, check the console for a missing package (image-fetching nodes typically need requests or Pillow) and install into ComfyUI's own environment.

    Common issues

    search_for seems to be ignored. It only takes effect when on_search=true - leaving that off means you're drawing randomly from the whole library regardless of what's in search_for.

    Image fetch is slow or fails outright. Check proxy first - same access issue as this pack's Civitai node, since the images live behind URLs baked into the JSON files rather than shipped locally. If it's consistently timing out, bump load_time up.

    Same result every run. If in_order is off, that's controlled by seed; change it to get a different draw.

    Category🎤MW/MW-OneButtonPrompt

    Inputs (8)

    NameTypeDefaultDescription
    json_1COMBO4 options: 250430-imgs-prompts-sfw.json, civit_imgs-prompts-20250329-03.json, civit_imgs-prompts-20250329-01.json, civit_imgs-prompts-20250329-02.json
    json_2COMBO5 options: 250430-imgs-prompts-sfw.json, civit_imgs-prompts-20250329-03.json, civit_imgs-prompts-20250329-01.json, civit_imgs-prompts-20250329-02.json, None
    in_orderoptBOOLEANfalse
    load_timeoptFLOAT2.00–10
    proxyoptSTRINGhttp://127.0.0.1:None
    on_searchoptBOOLEANfalse
    search_foroptSTRINGcat
    seedoptINT00–18446744073709550000

    Outputs (3)

    NameTypeDescription
    ImageIMAGE
    PromptSTRING
    ImgurlSTRING