🔥Image Request Node
This Node Retrieves Images From a Server Only Its Author Can Reach
- IMAGE
The name is a lie, sort of. 🔥Image Request Node doesn't generate an image from your prompt, and it doesn't call some public search API. It's a thin client for one specific private server - the kind of internal tool someone wires up for their own pipeline, then dumps on GitHub without any of the server side. If you found this by googling "ComfyUI image request node" hoping for a way to pull pictures from somewhere, stop here: you almost certainly want something else.
Here's what it actually does. You type a text query, the node POSTs it as JSON to a hardcoded endpoint, a backend retrieves images that match, and the top hit comes back into your graph as a normal IMAGE tensor. That's it. One request in, one image out.
How it works
The whole node is about 70 lines in ragpapi.py. fetch_image builds a JSON payload of {"query", "n", "bm25_n", "retrieve_n"} and POSTs it to:
http://10.0.100.224:58000/rag_proxy/vl_result_fix
The vl in that path is your clue: this is a vision-language retrieval service, likely a hybrid BM25-plus-vector search over an image library (the default query is Chinese - 美女 车 雪山, "beautiful woman, car, snow mountain" - so the underlying corpus is presumably Chinese-captioned). The response comes back as a list of image URLs; the node grabs the first one, downloads it, converts it to a tensor with PIL, and returns it.
There's no requirements.txt in the repo, and there doesn't need to be. It imports requests, torch, numpy, and Pillow - every one of which a stock ComfyUI install already has. This is about as dependency-free as a custom node gets.
The inputs that matter
- query - a free-text search string, multiline. The one thing you'll actually touch.
- n (1–10, default 1) - how many results you ask the server for. Here's a trap: the node sends
nto the backend but then unconditionally returnsdata[0]. You always get exactly one image out. Settingnto 10 changes nothing client-side; whether the server returns more is moot, because the node throws the rest away. - bm25_n (default 500) and retrieve_n (default 10) - retrieval depth knobs for the backend's lexical and vector passes. The exact semantics live on the server, which you don't have. Leave them alone.
Output is a single IMAGE tensor, which you'd wire into anything downstream - VAE decode, a second pass, whatever. Fine.
The thing nobody tells you
That endpoint is a private IP on the author's network (10.x is RFC 1918 space). The URL is hardcoded with no config, no env var, no way to override it, and the repo ships no server code. So unless you happen to be on a LAN where that exact address answers on port 58000 - and you almost certainly aren't - every run dies with a connection error before it does anything. This node is a leftover from an internal retrieval pipeline (the repo has a grand total of one commit, "Add Python"), not a tool built for other people.
Install
If you really want to try it: ComfyUI Manager → search "ComfyUI-IMG_Query", or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/chandlergis/ComfyUI-IMG_Query
Then restart ComfyUI. No models to download, no heavy dependencies.
One more thing worth saying, given how this ecosystem works: every custom node runs arbitrary Python on import, and this one phones home to a hardcoded endpoint. I'm not accusing it of anything - but it's also a node you can't use, so there's no reason to have it in your graph. Skip it.
When you'd actually use this
Only if you're building your own RAG image-search backend and want a working reference for the "query in, tensor out" pattern - the tensor2pil/pil2tensor helpers are copy-pasteable, and the request shape is a fine spec to implement against. For actual image sourcing in a workflow, use LoadImage on your own files, or a proper local CLIP-based search. This one's a curiosity, and an honest article should say so.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| query | STRING | 美女 车 雪山 | — |
| n | INT | 11–10 | — |
| bm25_n | INT | 5001–1000 | — |
| retrieve_n | INT | 101–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |