Nui.FeelingLuckyTextGen
Pull a real prompt from lexica.art instead of writing one
- STRING
This one's a fun idea: instead of writing a prompt, you describe roughly what you want, and Feeling Lucky Text Gen searches lexica.art - a big indexed archive of real Stable Diffusion generations and the prompts behind them - and hands you back one of the matching prompts to actually use. It's the "I'm Feeling Lucky" button, but for prompt engineering: you give it a topic, it gives you a prompt someone else already got a good result with.
Same caveat as its sibling node in this pack: despite the README calling it "Feeling Lucky Text Encode," this node only outputs a STRING, not CONDITIONING. It fetches and hands you back text - you still wire that string into a normal CLIP Text Encode to actually condition your generation.
Where this is useful (and where it isn't)
Lexica was a genuinely popular tool back in the SD 1.x days for exactly this - people used it to reverse-engineer prompts from images they liked, and browsing it for inspiration was a common workflow before dedicated prompt-writing LLM nodes became the norm. This node automates that browsing step: type a rough idea, get back real prompt text that produced a real image somewhere in their index. Worth knowing going in - chatter about lexica.art has thinned out a lot since 2022, so treat this as a nice-to-have curiosity from an earlier era of the ecosystem, not a load-bearing part of a modern workflow.
How it works
You put your search query into the text field - same multiline STRING input as Dynamic Prompts Text Gen, and the README notes this node also supports Dynamic Prompts {a|b|c} syntax, so you can bracket-vary your search terms the same way. Under the hood it queries lexica.art's search based on that text and returns one of the matching prompts as a plain string. The seed controls which match you land on, same mechanic as the sibling node - change it to get a different pull from the search results, hold it steady to get the same one back.
The important operational detail: this node makes a live network call. Every other node in this pack (and most ComfyUI nodes generally) just run local Python against local data. This one reaches out to a third-party website at execution time. That means it needs outbound internet access from wherever ComfyUI is actually running, and it's only as reliable as lexica.art's uptime and rate limits on any given day - neither of which the node controls.
The inputs and outputs that matter
text(required,STRING, multiline) - your search query, describing what you want a prompt for. Supports the same{a|b|c}bracket syntax as Dynamic Prompts Text Gen.seed(required,INT, default0, range0to roughly 1.8×10¹⁹) - picks which matching result you get back.
Output: a single STRING - a prompt pulled from lexica's index. Feed it to a CLIP Text Encode to actually generate with it, or route it through this pack's Output String node first to see exactly what it fetched before committing GPU time to it - genuinely worth doing here, since unlike the pure-local Dynamic Prompts node, you can't predict what a network call is going to hand you.
How to install it
Part of the small nui-suite pack, alongside Dynamic Prompts Text Gen and Output String.
- ComfyUI Manager - search nui suite, install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/space-nuko/nui-suite, then restart ComfyUI.
The README doesn't list a separate Python dependency for the HTTP call, so it's presumably using something already in ComfyUI's environment (Python's own request handling) - no extra pip install step called out. No model files either; there's nothing local to download here, the "model" is lexica's own hosted index.
Common issues & troubleshooting
The node hangs or times out. This is the one node in the pack where that's expected behavior under the wrong conditions, not a bug - it's waiting on a live HTTP response from lexica.art. If you're running ComfyUI somewhere without outbound internet access (an isolated container, a locked-down network, certain serverless/sandboxed execution environments), this node simply can't reach out and will fail or stall. Confirm the machine running ComfyUI can actually hit the open internet before assuming the node itself is broken.
You get back an empty or unrelated prompt, or it worked before and doesn't now. Search-based, not deterministic-by-design, so a vague query gets a loosely related match - tighten text and try a different seed first. But because this depends on a third-party site's API rather than anything bundled in the pack, if lexica.art changes its endpoint or search behavior on their end, there's nothing local to reinstall or update that fixes it. That's the honest tradeoff of a node built around querying someone else's live service instead of running self-contained.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| seed | INT | 00–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |