Nodes/ComfyUI-TJ_NODE/PromptDBLoader(TJ)
ComfyUI Node

PromptDBLoader(TJ)

Browsing runs with PromptDBLoader (TJ)

By designloves2·Created 4 months ago·Updated 3 days ago· 13
PromptDBLoader(TJ)
    • positive_prompt
    • pipe
    excel_path
    selected_id-1
    auto_setfalse

    PromptDBLoader (TJ) is the read side of the TJ PromptDB system: a gallery browser that turns your Excel prompt log into something you can actually look at. Where PromptDBSave appends one row per generated image to a workbook, this node displays those rows as a thumbnail grid - like a photo library app - and lets you click a card to load that run's full settings back into your workflow.

    How it works

    Point it at a workbook with excel_path (everything lives under the pack's promptDB/ folder) and the node renders the saved thumbnails as a grid. Interactions:

    • Click a thumbnail - that row becomes the selected entry, and its values flow out on the node's outputs for the next run.
    • Double-click - opens a detail popup where you can edit values and save them back (that row only gets updated) or delete the row outright.
    • The grid has search, sort toggle, and per-library management (add/import/backup via the 📚 and ⚙ buttons) so you can keep separate workbooks for e.g. Anime Style.xlsx vs Photography.xlsx.

    The outputs mirror the row's columns: positive_prompt, negative_prompt (STRING), model_name (STRING), seed (INT), steps (INT), cfg (FLOAT), extra_settings and source_path (STRING), sampler_name and scheduler (STRING). There's also a selected_id optional input if you want to pick a row programmatically instead of by clicking. Everything also comes out bundled as a pipe (TJ_PROMPT_PIPE), which is the recommended way to move a whole row - run that pipe to a PromptDBBridge and unfold the fields where you actually use them.

    With auto_set on, every output publishes itself as a wireless provider (PDB_* names), so other TJ nodes can receive the values without a single wire on the canvas.

    Installing it

    Part of the pack, nothing exotic:

    cd ComfyUI/custom_nodes
    git clone https://github.com/designloves2/ComfyUI-TJ_NODE
    

    or ComfyUI Manager → ComfyUI-TJ_NODE → restart. It needs openpyxl, which the pack installs automatically.

    The honest take

    This node only makes sense once you're actually logging runs with PromptDBSave - a loader with no logger is a button that opens an empty folder. If you're the type who keeps a notebook of "that prompt that worked last Tuesday," the pair replaces it with something searchable and reusable. The workflow loop it enables is the good kind of repeatable: log a batch, browse the grid, click the winner, resample with its exact settings. If you're not doing that kind of iterative saving, the whole PromptDB family is more infrastructure than you need - but if you are, this is the nicest way to get the settings back out.

    Category ✨ TJ_Node/Utility

    Inputs (3)

    NameTypeDefaultDescription
    excel_pathSTRING
    selected_idoptINT-1-1–2147483647
    auto_setoptBOOLEANfalse

    Outputs (2)

    NameTypeDescription
    positive_promptSTRING
    pipeTJ_PROMPT_PIPE