Nodes/ComfyUI_Lam/提示词选择工具
ComfyUI Node

提示词选择工具

EasyPromptSelecto and the lam tag library

By yanlang0123·Created 2 years ago·Updated 11 days ago· 77
提示词选择工具
    • 提示词
    text
    prompt_type

    EasyPromptSelecto (提示词选择工具, "prompt selection tool") is the lam pack's take on the Danbooru-style tag picker. You pick a category from a dropdown, click tags in a panel, and out comes a ready-to-encode prompt. If you've used the tag-gallery nodes from packs like ComfyUI-Easy-Use or the tag autocomplete extensions, you know the genre - this one is bundled, Chinese-first, and reasonably slick.

    It's aimed at a specific audience: people who build prompts from organized tag libraries instead of freehand typing. If you're an English-only flux prompt writer who types a sentence and moves on, this node isn't for you and you shouldn't force it. If you work with tag-based models (Illustrious-style checkpoints) and want a human-readable catalog of choices instead of memorizing danbooru syntax, it's genuinely nice.

    How it works

    The node reads YAML files from the pack's tags/ folder at the moment you add it to the graph - each .yml file becomes an entry in the prompt_type dropdown. The stock pack ships seventeen of them: 人物 (characters), 人物_五官 (facial features), 人物_头发 (hair), 环境 (environment), 魔法系 (magic), 负面 (negative), 艺术风格 (art style), and more.

    Open one of those files and you'll see the structure: each category is a section of Chinese labels mapping to their English tags, e.g. 一个女孩: 1girl, 年龄: teen / adult / loli. The frontend renders those sections as clickable buttons. Every tag you click is collected and arrives at the node through a hidden tags input; the node's output is simply text + tags.

    That last part is the whole trick, and it's why the node is a one-liner internally: translate() returns (text + tags,). Your base prompt in text gets the selected tags appended verbatim, and out pops a single STRING.

    Inputs and output

    • text - your starting prompt; can be empty.
    • prompt_type - the category dropdown, populated from tags/*.yml.
    • Output: 提示词 (prompt), a STRING → straight into a CLIP Text Encode.

    You can also add your own category: drop a mystuff.yml into ComfyUI/custom_nodes/ComfyUI_Lam/tags/, reload the node, and it appears as a new dropdown option. That's the part that makes it more than a toy.

    Install

    It's part of yanlang0123/ComfyUI_Lam, so install via Manager (search "ComfyUI_Lam") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yanlang0123/ComfyUI_Lam
    

    then restart. The tag files ship with the pack, so it works out of the box - no model downloads, no API keys. Note the pack README's install.bat step installs a huge requirements list you don't need for this node; the node itself is pure Python plus the YAML files.

    Gotchas

    The prompt_type dropdown is scanned at node-creation time. Add a YAML file while the graph is already loaded and it won't show until you add a fresh copy of the node. Also, don't expect English UI anywhere - every label is in Chinese, so non-Chinese readers will want to rename or edit the YAML files before this becomes ergonomic. It's a niche tool, but for its niche - organized tag-based prompting in Chinese - it's one of the better pickers in the ecosystem.

    Categorylam

    Inputs (2)

    NameTypeDefaultDescription
    textSTRING
    prompt_typeCOMBO17 options: 负面, 人物_角色, 人物_头发, 艺术风格, 人物_鞋袜帽, 画质和视角, +11

    Outputs (1)

    NameTypeDescription
    提示词STRING