Silver Stock Random Image
Stock Photos in ComfyUI, No API Key Required
- image
- image_url
Sometimes you just need a pile of arbitrary photos: a reference for img2img, a background to composite over, a batch of real images to test an upscaler against. Hunting for them by hand is slow, and most stock APIs want a key. Silver Stock Random Image pulls random stock images from four free sources - Lorem Picsum, Wikimedia Commons, LoremFlickr, and Unsplash - with zero authentication, and drops the result into your graph as a normal image tensor.
What it actually does
The name undersells the mechanism. There's no API key anywhere: it hits public endpoints directly, downloads the image, converts it to RGB, caps the longest side at 2048px, and hands back a [1, H, W, 3] float tensor ready to wire into anything that takes an IMAGE. It also returns the source URL as a second string output, which matters for attribution - Wikimedia Commons content in particular has licensing expectations, and knowing where an image came from is how you stay honest about that.
It tries to avoid showing you the same picture twice: every fetched image ID is recorded in a per-source history file inside the pack's history/ folder, and that history trims itself (down from 5000 to 4000 entries) so you keep getting fresh images instead of permanently exhausting a source.
The inputs that matter
Only two of the five really need your attention:
source-lorem_picsum(default),wikimedia,lorem_flickr,unsplash_random. More on the last one below.search_term- a keyword. Wikimedia and LoremFlickr actually use it as a search term; Lorem Picsum can't search, so it uses the term to seed its shuffle order instead (same term = same stable "random" ordering, different term = different batch).widthandheight- 64 to 2048 in steps of 64. Set these to roughly what your workflow expects.seed- reproducibility if you want it. Zero means full random.
Outputs: image and image_url, as described above.
The trap: the Unsplash source is dead
Here's the thing nobody's README will tell you, and it's worth knowing up front: the unsplash_random source doesn't work. It targets source.unsplash.com, which has been retired - the endpoint returns a 503 these days. The node tries the fetch three times and then, instead of erroring, silently returns a blank 64×64 black image. So a run that "succeeds" with a black square is the tell. Stick with the other three sources; they're all alive and working (verified). Lorem Picsum is the most reliable of the bunch, Wikimedia gives you the most real-world photographic variety, and LoremFlickr is a solid middle ground that honors keywords.
Installing it
Silver Nodes is a small utility pack by SilverAndJade. Easiest via ComfyUI Manager: search "ComfyUI Silver Nodes" and install. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/SilverAndJade/comfyui-silver-nodes
Restart ComfyUI. No model downloads - this node is pure network I/O, and the only heavy dependency it drags in is Pillow, which ComfyUI already ships.
Common issues
Two worth remembering. First, the node has no change-detection override, so ComfyUI caches its output like any other node - if the inputs don't change, re-queueing gives you the same image. Randomize the seed to force a new pull. Second, this is a network node: if you're offline or a source is slow, you get the blank fallback image rather than an error, which can silently corrupt a batch. If your workflow depends on getting a real image every time, check the image_url output for an empty string - that's the failure signal.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| source | COMBO | lorem_picsum | 4 options: lorem_picsum, wikimedia, lorem_flickr, unsplash_random |
| search_term | STRING | family | — |
| width | INT | 102464–2048 | — |
| height | INT | 76864–2048 | — |
| seed | INT | 00–4294967295 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| image_url | STRING | — |