Nodes/ComfyUI-NO8D-controls/NO8D-Prompt-libraries
ComfyUI Node

NO8D-Prompt-libraries

A browser, not a dropdown

By no8d·Created 2 months ago·Updated 14 days ago· 271
NO8D-Prompt-libraries
    • prompt
    style
    library
    random_modefalse
    selected_styles[]
    selection_clearedfalse
    output_allfalse
    search_query

    Type "cyberpunk" into a prompt box and you get generic cyberpunk. Open a library of curated prompt cards with preview images and you get the version someone already tested and kept. NO8D-Prompt-libraries (class NO8DKreaStyleSelector) is that second thing: a visual browser for reusable prompt libraries. You see cards with their preview images, search, favorite, and pick - single, multiple, all, or random - and the node outputs the selected prompt text, exactly as stored.

    The community loves this one. When the author shipped the Krea 2 styles update - 397 prompt cards sorted into 8 libraries, every card with its own preview - r/StableDiffusion called it one of the most useful nodes in the space ("one of my favorite nodes already"). The reason it lands is the previews: browsing a style is a visual act, and this is the rare prompt node that treats it that way.

    The catch: it starts empty

    The node ships empty, by design. Eight optional XLSX libraries are bundled in data/krea_style_libraries/ inside the repo (photography, anime illustration, digital painting, drawing/sketch, painting/fine art, comics, 3D/graphic design, cartoon animation), but you import them yourself via the node's Import Library button. The node imports TXT, CSV, XLSX, and even public Google Sheets, and it exports portable files so you can move your libraries between machines.

    The inputs, briefly

    Most of these are state the frontend manages, not things you'll hand-type:

    • style - the currently selected card's name.
    • library - which library you're browsing.
    • random_mode - output one random card from the current library/search each run.
    • selected_styles - a JSON list of the cards you've selected (multi-select).
    • output_all - dump every card in the current library/search as a list.
    • search_query - filter the library by text.
    • selection_cleared - distinguishes "user cleared the selection" from "nothing selected yet".

    Output is prompt - a STRING list. Multiple selected cards come out as multiple entries, which is why NO8D-Prompt Merge exists in this same pack: select a subject card and a style card, merge them, and the composition stays live.

    How it works and what to watch

    The heavy lifting is a small backend (it registers its own server routes) plus a gallery frontend, with openpyxl doing the XLSX import/export - which is why the README flags openpyxl as a real dependency and warns against installing it into an unrelated system Python. Favorites, history, and editing are stored in local state files. Prompts are preserved exactly as stored, so a card you wrote to say "this exact phrase" says it.

    Two things to remember: update the pack to get the newest bundled libraries (like the Krea 2 styles set), and if your XLSX imports silently fail, the openpyxl install is the first thing to check. Search, favorites, and the Arrow/PageUp/PageDown/Home/End keyboard navigation all live in the browser tab - a stale frontend after an update is the classic "the node updated but nothing changed" cause.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/no8d/ComfyUI-NO8D-controls.git
    python -m pip install -r requirements.txt
    

    ComfyUI Manager → "NO8D-controls". Dependencies: openpyxl and json-repair. No models. Restart and hard-refresh, then import the bundled libraries and start browsing.

    CategoryNO8D-control

    Inputs (7)

    NameTypeDefaultDescription
    styleSTRING
    librarySTRING
    random_modeBOOLEANfalse
    selected_stylesSTRING[]
    selection_clearedBOOLEANfalse
    output_allBOOLEANfalse
    search_querySTRING

    Outputs (1)

    NameTypeDescription
    promptSTRING