Nodes/Zako-Prompt-Tools/Zako-Random-Prompt
ComfyUI Node

Zako-Random-Prompt

The Random-Prompt Node That Doesn't Phone Home

By xiaoshengyvlin·Created 3 months ago·Updated 16 days ago· 1
Zako-Random-Prompt
    • prompt
    enable_randomtrue
    主题全部
    普通true
    敏感true
    可疑true
    露骨true

    Every anime-prompt workflow has a blank-canvas moment. You know you want to draw something, and the second you sit down to type the tags your brain goes flat. Random-prompt nodes exist for exactly that, and most of them call out to an API or an online library to do it. ZakoRandomPrompt, from the Zako-Prompt-Tools pack, does something rarer in 2026: it's fully offline, with zero setup, and it works the second it's installed.

    What it actually is

    The node holds a bundled library of 200,000+ real prompts - comma-joined, Danbooru-style tag strings harvested from actual posts. Each one starts with artist, series, and character tags before the general ones, so what you draw is real art you've seen before, not a random pile of words. The prompts ship as JSON organized into four rating tiers - G (普通, "normal"), S (敏感, "sensitive"), Q (可疑, "questionable"), E (露骨, "explicit") - each broken into topic files. The first time you draw, the node builds a local SQLite database from those JSON files; after that every card is a single ORDER BY RANDOM() LIMIT 1 query.

    No model download, no API key, no network. The only dependency in the whole pack is requests.

    The inputs that matter

    • 主题 (Topic) - a dropdown of 20 curated themes: 全部 (all), plus 中式服装 (Chinese dress), 修女 (nun), 偶像 (idol), 兽耳 (animal ears), 吊带袜 (thighhighs), 哥特萝莉 (gothic lolita), 天使 (angel), 女仆 (maid), 婚纱 (wedding dress), 巫女 (shrine maiden), 恶魔 (demon), and eight more.
    • 普通 / 敏感 / 可疑 / 露骨 - four booleans, one per rating tier, all on by default. Turn off the tiers you don't want to draw. With everything off you get the blunt [ERROR: 至少勾选一个分级] (check at least one tier).
    • enable_random - the flip that makes this node usable. On, it draws a new card every run; off, it locks the previous result. The backend implements it the proper ComfyUI way: IS_CHANGED returns NaN when random is on, so the graph always re-runs it, and 0 when off, so it stays cached and nothing downstream re-fires. The frontend wraps that boolean into a single button reading 🎲 随机模式 / 📌 固定模式, so you flip between draw and lock without digging into a checkbox.

    One output, prompt (STRING). Wire it straight into a CLIP Text Encode positive - or, since this pack is built to chain, run it through Tag-Translate and Prompt-Enhance first.

    Installing it

    The pack is on the ComfyUI registry, so Manager works:

    ComfyUI Manager → Install Custom Nodes → search "Zako-Prompt-Tools"
    

    or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/xiaoshengyvlin/Zako-Prompt-Tools.git
    

    Restart ComfyUI and you're done. No checkpoint, no embedding, nothing to fetch from HuggingFace. The first random draw takes a beat longer while it builds prompts.db (a lock file keeps two runs from colliding mid-build), then it's instant.

    Where people get burned

    The pack is brand new - 1.0.0 shipped in late August 2026, and the Chinese topic filenames broke in the registry archive until 1.0.1 - so expect the UI labels to stay Chinese-first, and don't expect a pile of community writeups yet. If you flip to 固定模式 before ever drawing a card, you get [未抽过卡,请先开启随机] (no card drawn yet). And know what you're getting: because artist and copyright tags are baked into every string, you're not drawing a random scene - you're drawing a random piece of existing art to riff on. Some people love that, some find it too steery. Either way it kills the blank page in ten seconds, offline, which is hard to beat.

    CategoryZako-Prompt-Tools

    Inputs (6)

    NameTypeDefaultDescription
    enable_randomBOOLEANtrue
    主题COMBO全部32 options: 全部, 【优质】二创同人, 【优质】原创精选, 【优质】古风东方, 【优质】奇幻魔法, 【优质】战斗特效, +26
    普通optBOOLEANtrue
    敏感optBOOLEANtrue
    可疑optBOOLEANtrue
    露骨optBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    promptSTRING