π― Masterphub Random
Out of ideas? Let a database roll the dice
- prompt_text
- title
Staring at a blank prompt box is a real problem, and Masterphub Random is the laziest possible solution to it: it asks Masterphub's 160,000+ prompt library for one random prompt and hands it to you as text. For creative exploration - the "roll the dice and see what happens" workflow - it's actually the most fun node in the pack. It's one of four in masterphub-comfyui (Search, Load by ID, Random, Trending), a small new pack whose only real community footprint so far is the author's own announcement thread on r/comfyui.
How it works
No models, no inference. The node makes an HTTPS call to the Supabase backend behind masterphub.io and asks for a single row with order=random(), so the randomness happens server-side. It uses an anon key baked into the source - you don't need an account or API key. Python standard library only, no requirements.txt, no model downloads.
Inputs and outputs
Two inputs:
- category -
all, image, video, writing, marketing, business, coding, agents, audio, 3d. For image generation, setimage; withallyou'll regularly draw a writing or marketing prompt that's worthless to a diffusion encoder. - curated_only - a BOOLEAN, default
true. On the backend this filters tocurated=eq.true, i.e. human-screened prompts. Leave it on; curated prompts are consistently more usable than the uncurated tail of a public catalog.
Two outputs, both STRING:
- prompt_text - the random prompt, wired to CLIP Text Encode.
- title - the prompt's title, so you know what you're looking at.
The one real gotcha: it's random, except when it isn't
Here's the thing nobody tells you about random pickers in ComfyUI: the engine caches node outputs aggressively, and it treats a node as changed only if its inputs changed or it opts out of the cache with the "always rerun" trick. Masterphub Random does neither. So on back-to-back queues with nothing else changing, ComfyUI can hand you the same "random" prompt twice in a row - the cache served you the previous result.
The workaround is to nudge it: toggle curated_only off and on, flip the category, or change any widget on the node to invalidate the cache before you run again. It's a little annoying, but it's also the expected behavior for a random node that forgot its IS_CHANGED - same class of bug as the seed you lose to control_after_generate, just in a different corner of the graph.
One more: if the chosen category has no prompts that match the filters, you get No prompts found for this category. as a string, not an error. And every run needs network - offline, you'll see Error: ... in the text output.
Install
ComfyUI Manager β Install Custom Nodes β search Masterphub β Install β restart ComfyUI. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/stavjadam-collab/masterphub-comfyui
then restart and find the π― nodes under the Masterphub menu. Minor trap: the README's manual clone URL points at a different GitHub org (masterphub/...) than the real repo (stavjadam-collab/...). Copy-paste that and it may fail - use the URL above, or just let Manager fetch it correctly. It's a fresh, low-traffic pack, so enjoy it as a prompt-idea generator rather than something to bet your pipeline on.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| category | COMBO | 10 options: all, image, video, writing, marketing, business, +4 | |
| curated_only | BOOLEAN | true | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| prompt_text | STRING | β |
| title | STRING | β |