Nodes/KIE.ai Nodes Next/KIE • Persistent Preview Image
ComfyUI Node

KIE • Persistent Preview Image

Preview Image that survives a workflow reload (yes, really)

By felipederosilva·Created about a month ago·Updated about 22 hours ago· 3
KIE • Persistent Preview Image
  • images
  • images
  • saved_files_json
◄filename_prefixKIE-Previews/KIE►

The problem this solves

Close a ComfyUI tab, reopen the workflow, and every Preview Image node is a grey rectangle again. Normally that's fine - you re-run and the picture comes back. Once KIE Nodes Next is in the graph it stops being fine, because re-running means paying KIE again. A 10-second video job or a 4K image is not something you want to regenerate just to remind yourself what the last run produced.

KIE • Persistent Preview Image saves the images to your output folder and writes the file reference into the workflow, so when you reopen the graph the thumbnail is still there. It's a small utility, but in a graph that spends credits per execute it pays for itself the first time you come back to a project a day later.

How it works

Under the hood it isn't a custom writer at all - the node borrows ComfyUI's own SaveImage node and calls it, so your files land in the normal ComfyUI/output tree and behave like anything else Save Image wrote. Then it returns both the standard preview payload and an extra record of what it saved, which the pack's frontend JavaScript (js/persistent_preview.js) reads when the workflow loads to restore the preview panel. That's the whole trick: the image is on disk, and the graph remembers where.

It's registered as an output node, which is the ComfyUI detail that matters most. Output nodes always run - ComfyUI walks backwards from them to decide what needs re-executing. So this node fires every time you hit Queue, even if its upstream hasn't changed.

Inputs and outputs

Two inputs, and you only really think about the second one.

  • images (IMAGE) - the batch you want saved and shown. Wire it from whatever produced the image: a Nano Banana node, a Qwen node, an upscaler, a decode.
  • filename_prefix (STRING, default KIE-Previews/KIE) - saved below ComfyUI's output directory; the slash creates a subfolder. Set it per project (ClientA/hero-shots) instead of leaving everything in one folder.

Outputs:

  • images (IMAGE) - a pass-through. Handy if you want to keep chaining after the preview: preview and feed the same image into a Qwen edit node.
  • saved_files_json (STRING) - the records of what was written, as JSON. Useful if you're logging runs or driving something downstream with a file path.

Install

ComfyUI Manager: open it, search KIE-Nodes-Next, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next

Then restart ComfyUI. requirements.txt here is light - requests, Pillow, numpy, PyYAML - so there's no torch rebuild or 4GB wheel to sit through. On Windows there's also a one-click .vbs installer in the repo's dist/ folder that detects Desktop/Portable/manual installs and uses ComfyUI's own Python. It's worth using: an older release stored backups inside custom_nodes, where ComfyUI could import them as live nodes; the v0.3.1+ installer quarantines them outside the node directory instead.

Where people get burned

It actually writes files. Preview Image writes to a temp folder; this writes to output. Run a 200-image batch through it and you've got 200 PNGs on disk. Set filename_prefix to something you can delete in one go, and clear old runs occasionally.

Deleting the output file kills the preview. The restored thumbnail is a reference to a real file. Move or clean up output/KIE-Previews/ and the next reload shows nothing, because there's nothing to load. If a preview matters long term, keep the file.

Registered as an output node means it runs every queue. That's usually what you want from a preview, just know it's not cache-friendly - see the caching notes in docs/knowledge/comfyui-node-plumbing.md for why output nodes behave that way.

And the pack-wide one: this node needs no API key, but it ships in the same pack as nodes that do. Nothing here will ever call KIE, so a missing key won't break your previews.

CategoryKIE Next/Utility/Media

Inputs (2)

NameTypeDefaultDescription
imagesIMAGEImages to save and display persistently.
filename_prefixSTRINGKIE-Previews/KIESaved below ComfyUI's output directory. Use a subfolder/prefix to organize previews.

Outputs (2)

NameTypeDescription
imagesIMAGE—
saved_files_jsonSTRING—