Nodes/ComfyUI-ASV-Nodes Node/ASV Prompt Generator
ComfyUI Node

ASV Prompt Generator

One line in, a paragraph out

By zubenelakrab·Created 2 years ago·Updated 2 years ago· 1
ASV Prompt Generator
    • STRING
    seed825628174325066
    enabledtrue
    prompt
    samplingtrue
    temperature1.20
    top_k50
    top_p0.90
    notesREADME: * Sampling: Enables random sampling, allowing the model to generate more varied and creative outputs by choosing from a range of probable tokens instead of only the most likely one. * Temperature: Controls the randomness of predictions by scaling the logits before applying softmax. Higher values (e.g., 0.8 to 1.5) result in more randomness, while values closer to 0 make the output more deterministic. * Top_k: Limits the sample pool to the top k highest-probability next tokens, adding randomness by only sampling from this subset. * Top_p: Implements 'nucleus sampling', which includes tokens with a cumulative probability above a threshold (e.g., 0.9), allowing for dynamic vocabulary selection based on the context. Important: This textbox serves as a README and a personal note-taking space. It is solely for reference and will not impact image generation in any way. https://github.com/zubenelakrab/ComfyUI-ASV-Nodes

    You've got a vague idea - "a knight on a foggy battlefield" - and you know a fuller prompt would render it better. You could type 200 words by hand, or you could hand three words to the ASV Prompt Generator and let a local model do the writing. That's the whole job here: it takes your short prompt, feeds it to a T5 model called superprompt-v1, and hands back a long, detailed description you wire straight into your positive prompt.

    Prompt expansion is a genuinely useful pre-generation step for CLIP-encoded models, which is why this niche keeps growing - corpus chatter about "prompt enhancer" tools went from a dozen mentions in 2023 to a couple hundred a year in 2025-26. What makes this one interesting is that it's not calling some API and it needs no key: a 77-million-parameter T5 runs the whole expansion on your machine.

    How it works

    Under the hood this is a thin wrapper around roborovski/superprompt-v1, a T5 model fine-tuned specifically to "upsample" short prompts into long ones. The node loads the tokenizer and model at import time, so the first time ComfyUI starts after install it downloads roughly 300 MB into your HuggingFace cache and pauses there. Each run, your prompt text is tokenized, sent to the model, and up to 1000 new tokens are generated before the result is returned as a single STRING.

    One honest quirk: the model card says it's important to use the exact task prefix Expand the following prompt to add more detail: - and this node never adds it. It also generates up to 1000 tokens instead of the 77 the model was tuned around. The expansion still works, but it's working without its cue card. If your results feel off, type the prefix yourself:

    Expand the following prompt to add more detail: a knight on a foggy battlefield
    

    Inputs that matter

    The notes textbox is a README the author pasted into the node - it does nothing to your generation, which the tooltip itself tells you. The rest are sampler controls you've seen before:

    • prompt - the short seed text to expand. The whole point of the node.
    • enabled - the escape hatch. Flip this off and the node passes your text through untouched, so you can keep it in the graph while A/B testing expanded vs. raw prompts.
    • sampling - random sampling on (varied output) or off (greedy, more deterministic).
    • temperature (0–1.5, default 1.2), top_k (default 50), top_p (default 0.9) - the usual creativity dials. Start at defaults and only touch temperature.
    • seed - here's a trap: it's a required input, but the code never actually passes it to generation. The randomizer it seeds is never used. Don't expect same-seed reproducibility from this node; it doesn't deliver it.

    The single STRING output wires into a CLIP Text Encode node's positive prompt, just like your normal prompt box.

    Installing it

    Either search "ComfyUI-ASV-Nodes" in ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/zubenelakrab/ComfyUI-ASV-Nodes
    

    then restart ComfyUI. The pack pins transformers==4.43.2 in requirements.txt, which Manager installs for you. That pinned version is the one thing to watch: it's an old release, and ComfyUI custom nodes all share one Python environment, so a strict pin like this is exactly the kind of thing that quietly breaks a node that wants newer Transformers. If you start seeing Transformer import errors elsewhere, this pin is the likely suspect.

    Where people get burned

    • CPU-only setups crash. The node hardcodes .to("cuda") - no CPU fallback. The model is tiny and would run fine on CPU, but this wrapper won't let it.
    • Slow first startup - model download and load happen at ComfyUI boot, not when you add the node, and it holds a slice of VRAM for the whole session.
    • Don't trust the seed - as above, it's cosmetic.
    • It's aimed at SDXL-era prompting. A long, florid expansion genuinely helps CLIP-encoded checkpoints. On the newer LLM-encoded models (Z-Image, Anima, Flux 2 Klein), prompt behavior is a different game entirely, and a T5-flavored expansion isn't necessarily the win it used to be.

    For a small, free, offline way to turn a sketch of an idea into a full prompt, it does the job - just know the three caveats above before you reach for it.

    CategoryPrompt

    Inputs (8)

    NameTypeDefaultDescription
    seedINT8256281743250660–999999999999999
    enabledBOOLEANtrue
    promptSTRING
    samplingBOOLEANtrue
    temperatureFLOAT1.200–1.5
    top_kINT501–100
    top_pFLOAT0.900–1
    notesSTRINGREADME: * Sampling: Enables random sampling, allowing the model to generate more varied and creative outputs by choosing from a range of probable tokens instead of only the most likely one. * Temperature: Controls the randomness of predictions by scaling the logits before applying softmax. Higher values (e.g., 0.8 to 1.5) result in more randomness, while values closer to 0 make the output more deterministic. * Top_k: Limits the sample pool to the top k highest-probability next tokens, adding randomness by only sampling from this subset. * Top_p: Implements 'nucleus sampling', which includes tokens with a cumulative probability above a threshold (e.g., 0.9), allowing for dynamic vocabulary selection based on the context. Important: This textbox serves as a README and a personal note-taking space. It is solely for reference and will not impact image generation in any way. https://github.com/zubenelakrab/ComfyUI-ASV-Nodes

    Outputs (1)

    NameTypeDescription
    STRINGSTRING