ComfyUI Node

I'm Feeling Lucky

I'm Feeling Lucky (DPFeelingLucky)

By adieyal·Created 3 years ago·Updated 2 years ago· 430
I'm Feeling Lucky
    • STRING
    text
    seed0
    autorefreshNo

    I'm Feeling Lucky is the wildcard of the wildcard pack - the one you run when you don't know what you want and you'd rather be surprised. You give it a rough idea, and it goes out to Lexica.art, finds a real prompt somebody actually used for a related image, and hands that back to you. It's less a tool and more a slot machine for prompt ideas.

    To set expectations honestly: this is the least serious node in the pack, and that's kind of the point. The most-shared example of it in the wild is somebody typing something innocent and getting back "Thomas the Tank Engine in Mad Max: Fury Road." It's great for breaking out of a rut, mining phrasing you'd never write yourself, or just goofing off. It is not a node you build a reliable pipeline on.

    How it works

    It's a search-and-borrow, not a generator. Your input text becomes a query against Lexica's index of Stable Diffusion prompts, and the node pulls a matching prompt back down and passes it along as if you'd typed it. Because the prompts on Lexica were written by real people for real generations, what you get is often more detailed and more idiomatic than your one-liner - and sometimes gloriously off the rails. The upside over Magic Prompt is that these are human prompts, not model-generated filler; the downside is you have no control over what comes back beyond your query.

    Two things follow from "it phones a website." It needs an internet connection at generation time. And it's only as reliable as Lexica's public API - if that service is down, rate-limiting, or has changed, the node has nothing to return. Keep that in mind before you wire it into anything you care about.

    Inputs and outputs

    • text - your query, the seed idea you want a related prompt for. Multiline.
    • seed - factors into which result you get.
    • autorefresh - Yes/No. This one matters here: with No, the node fetches a prompt once and reuses it for later runs; with Yes, it fetches a fresh one every iteration. If you want a new surprise each generation, set it to Yes - otherwise you'll get the same borrowed prompt over and over and wonder why.

    Output is a STRING you feed into a CLIP Text Encode node, same as every other node in the pack.

    Installing it

    Comes bundled with the DynamicPrompts pack. ComfyUI Manager → search dynamicprompts → install → restart. Manual:

    git clone https://github.com/adieyal/comfyui-dynamicprompts custom_nodes/comfyui-dynamicprompts
    python -m pip install -r custom_nodes/comfyui-dynamicprompts/requirements.txt
    python custom_nodes/comfyui-dynamicprompts/install.py
    mkdir custom_nodes/comfyui-dynamicprompts/wildcards
    

    Restart after. No model download for this one - it's just a network call.

    Where people get burned

    "It stopped giving me new prompts." Almost always the autorefresh toggle. Left on No, the node caches the first fetch and reuses it. Flip it to Yes for a fresh pull each run.

    Nothing comes back, or the run errors. This node depends entirely on Lexica being reachable and its API behaving. No internet, a firewalled machine, or a change on Lexica's end and there's nothing for the node to hand you. That's the inherent fragility of a node that reaches out to a third-party site - it's not something you can fix locally beyond checking your connection. If you need something dependable and offline, use Random Prompts with your own wildcards instead.

    You get something weird. That's the node working as intended. Borrowed prompts skew toward whatever's popular and well-tagged on Lexica, and "related" is doing a lot of lifting. Treat the output as a jumping-off point, not a finished prompt - read it (pipe it into OutputString to see it), keep the good bits, toss the tank engine.

    CategoryDynamic Prompts

    Inputs (3)

    NameTypeDefaultDescription
    textSTRING
    seedINT0
    autorefreshCOMBONo2 options: Yes, No

    Outputs (1)

    NameTypeDescription
    STRINGSTRING