Nodes/ComfyUI-EZ-AF-Nodes/EZ Prompt Loader
ComfyUI Node

EZ Prompt Loader

Wildcards you can actually see, with thumbnails

By ez-af·Created 2 years ago·Updated 3 months ago· 28
EZ Prompt Loader
    • STRING
    • OPT_DIRECTORY
    • BATCH_SELECTED
    prompt_directory
    selection_modesingle
    opt_seed0
    filter_text
    selected_files

    This is the flagship node of the EZ-AF pack, and it exists because its author (who posted the pack to r/comfyui as artemyfast) got tired of wildcard systems. Traditional wildcards - __character__ style placeholders that a processor randomly fills - give you almost no visibility. EZ Prompt Loader is the opposite: it's a file loader with a proper UI that shows you the prompt files, filters them, shows thumbnails, and hands the content over as a string. The author's words from the launch thread: "Prompts with thumbnails feel so good honestly."

    How it works

    It scans ComfyUI/custom_nodes/ComfyUI-EZ-AF-Nodes/data/PROMPTS/ recursively - every subdirectory becomes a choice in the prompt_directory dropdown, and every .txt file inside becomes a selectable item. Thumbnails appear only if a .png with the same name as the .txt sits in the matching folder under data/THUMBNAILS/ (the relative folder structure has to mirror the prompts folder). No png, no thumbnail, no error - it just shows the filename.

    Three outputs make it useful beyond "pick one prompt":

    • STRING - the content of the selected file(s), comma-delimited if you picked several.
    • OPT_DIRECTORY - the path of the current directory, handy for feeding other tooling.
    • BATCH_SELECTED - a list of all selected items, which lets downstream nodes iterate a batch of prompts instead of just one. If nothing (or one item) is selected, this outputs all visible/filtered items - a sneaky way to run "all prompts in this folder."

    The selection modes

    • single - one item at a time, one output.
    • multiple - tick several; they come out comma-joined.
    • random - picks one at queue time. This is the wildcard replacement, and it's where the seed input matters: connect opt_seed and it's deterministic and stable; leave it unconnected and the node re-executes every queue so you get a new pick each run.

    filter_text narrows the visible list by substring, and the node remembers your selections across workflow save/load - a nice quality-of-life touch you don't get from most custom loaders.

    The real-world gotcha

    From the actual community thread: one user reported the prompt_directory selector showing nothing and being uneditable even after a fresh reinstall. The usual cause with this pack is the data folder - if data/PROMPTS/ is empty or the install path isn't a normal custom_nodes checkout, the enum comes back empty and the widget looks dead. Put a .txt file in data/PROMPTS/, restart ComfyUI, and the dropdown should populate. This is a scan-at-load node, so it only picks up new files on restart.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/ez-af/ComfyUI-EZ-AF-Nodes.git
    

    restart, or ComfyUI Manager → search ez-af. The pack's only deps are aiohttp and Pillow (Pillow does the thumbnail handling), and there are no model downloads. If you're coming from wildcards, the mental model is: your __folder__ is the directory dropdown, your __item__ is the file, and your randomness is the seed.

    CategoryEZ NODES

    Inputs (5)

    NameTypeDefaultDescription
    prompt_directoryCOMBODirectory to search for prompt files. Searches recursively through all subdirectories.
    selection_modeCOMBOsingle- single: Allows selection of one item at a time. - multiple: Allows selection of multiple items. Output will be comma-separated. - random: Allows selection of multiple items. Randomly outputs one of the selected items on each prompt queue. Will select from all visible (filtered) items if none or single item is selected. Uses seed if opt_seed is connected. Always re-executes node if opt_seed is not connected
    opt_seedoptINT00–18446744073709550000Control SEED, used only in 'random' selection mode. If not connected, always re-executes node on prompt
    filter_textoptSTRINGFilter items based on a text string
    selected_filesoptSTRING

    Outputs (3)

    NameTypeDescription
    STRINGSTRINGContent of selected prompt file(s). Delimited by comma if multiple
    OPT_DIRECTORYSTRINGPath to currently selected directory.
    BATCH_SELECTEDSTRINGList of all selected items. Will output all visible (filtered) items if none or single item is selected.