PromptDBSave(TJ)
PromptDBSave (TJ)
- images
- images
Somewhere between a save node and a lab notebook lives PromptDBSave (TJ): it takes an image batch and appends one row per image to an Excel workbook, with the prompt, the sampler settings, the seed, a thumbnail, and a free-text note. Run it every generation and you slowly build a searchable record of everything you've ever made - the "which prompt was that again" problem, solved with xlsx.
How it works
Each image in the incoming batch becomes a row: positive/negative prompt, model, seed, steps, CFG, extra settings, thumbnail, note, sampler, scheduler. Workbooks live in a promptDB/ folder inside the custom node directory (the pack ships Anime Style.xlsx and Photography.xlsx as examples). One workbook = one category; each row gets an auto-incrementing ID, and thumbnails are embedded in the sheet plus kept as sidecar files so the gallery can display them fast.
The feature that makes this genuinely useful is auto_extract (on by default). Instead of making you wire every field in by hand, the node walks your workflow graph backward from the images input and figures out the sampler settings itself - it even distinguishes your main sampler (the one starting from an EmptyLatentImage at denoise 1.0) from a refiner, logging the main config into the main columns and the refiner as a summary in extra_settings. Any field you connect manually always overrides the auto-extracted value. It's the rare automation that actually matches how people build these graphs, and it means you can drop the node in, connect images, and get useful rows on the first run.
There's also a SAVE / BYPASS toggle (the mode input) - flip to BYPASS and the node stops logging and just passes images through, without you ripping it out of the graph. And a thumbnail_size control so your workbook doesn't balloon to 100 MB after a few hundred rows (the embedded images are capped at 128 px for file-size reasons; the gallery's on-disk thumbnails are separate and can be bigger).
Inputs and outputs
Required: images (the batch), positive_prompt, excel_path, thumbnail_size, mode, auto_extract. Optional: negative_prompt, model_name, seed, steps, cfg, sampler_name, scheduler, extra_settings, source_path - all the manual overrides, plus get_name / setnode_name for wireless. Output: images, passed straight through, so you can chain a save node after it.
Installing it
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/designloves2/ComfyUI-TJ_NODE
or ComfyUI Manager → ComfyUI-TJ_NODE → restart. Needs openpyxl - auto-installed.
Common issues
If a save fails, the node retries a few times before erroring (file-lock handling for when Excel has the workbook open - close it). One quirk to know: rows use the pack's fixed column layout, and the workbook is the single source of truth shared with the Loader, so don't reorder columns manually in Excel and expect the Loader to stay sane. If you want a repeatable compare loop, pair it with Queue Loop so each iteration lands as its own row - that's the intended workflow.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| positive_prompt | STRING | — | |
| excel_path | STRING | — | |
| thumbnail_size | INT | 25616–512 | — |
| mode | BOOLEAN | true | — |
| auto_extract | BOOLEAN | true | — |
| negative_promptopt | STRING | — | |
| model_nameopt | STRING | — | |
| seedopt | INT | 00–18446744073709550000 | — |
| stepsopt | INT | 80–10000 | — |
| cfgopt | FLOAT | 1.00–100 | — |
| sampler_nameopt | STRING | euler | — |
| scheduleropt | STRING | simple | — |
| extra_settingsopt | STRING | — | |
| noteopt | STRING | — | |
| get_nameopt | COMBO | (none) | 1 options: (none) |
| setnode_nameopt | STRING | PromptDB | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |