Thumbnail Cycle Generator
Windows Won't Show Thumbnails for Your Generations? This Tiny Node Automates the Annoying Wait
- current_count
You just ran a 500-image batch, opened your ComfyUI output folder to cherry-pick the keepers, and got a wall of grey generic icons while the disk grinds in the background. That's Windows' lazy thumbnail cache: Explorer only generates thumbnails when you actually browse a folder, and a folder full of fresh PNGs means a long, I/O-pinned wait. Thumbnail Cycle Generator exists to make that wait happen in the background instead - every N runs, silently, so the thumbnails are already there when you go to look.
It's a one-trick pony, and honestly a niche one. The node runs WinThumbsPreloader.exe -s {path} against your ComfyUI output directory, triggering WinThumbsPreloader, a small Windows utility that force-builds the thumbnail cache for a folder without you opening it in Explorer. It's Windows-only, has zero community footprint (you won't find people raving about it on r/comfyui), and if you're not a Windows batch generator, just close this tab. If you are, it's genuinely handy - dropping it into a workflow is cheaper than manually nudging Explorer every time you want to browse results.
How it works
The mechanism is refreshingly simple once you read the source. The node keeps a class-level counter that starts at 0 and increments every time the workflow executes. Each run, it returns the current count as an output. When the counter reaches cycle_time, it builds the path from ComfyUI's output directory plus your folder_suffix, fires off WinThumbsPreloader.exe -s {path} with subprocess.Popen (so it doesn't block ComfyUI while the preloader churns), and resets the counter to 0.
The clever bit is IS_CHANGED, which always returns a fresh value. ComfyUI skips nodes whose inputs haven't changed; this node lies about that so it re-executes on every queue run. Without that, your counter would freeze after the first run and the whole thing would be dead weight.
Inputs and outputs that matter
Only two inputs, both required:
- cycle_time (INT, default 1) - how many runs before the preloader fires. Default 1 means it triggers on every run, which for a big output folder is a lot of unnecessary thumbnail rebuilding. Setting it to 10–50 batches the cost.
- folder_suffix (STRING, default "") - appended to the output path. If your Save Image node writes into a subfolder, set this to match, or the preloader points at the wrong (or empty) directory.
The single output, current_count (INT), is mostly cosmetic - there's not much to wire it into. It's a side-effect node; the output just lets you peek at progress.
Installation
Install it like any custom node. In ComfyUI Manager, search "Thumbnail Cycle Generator" (or "comfyui-thumb-generator"), or:
cd ComfyUI/custom_nodes/
git clone https://github.com/scofano/comfyui-thumb-generator
Then restart ComfyUI. The pack has zero Python dependencies - nothing to pip install. But it needs two things outside ComfyUI: Windows, and WinThumbsPreloader.exe available on your system's PATH. Grab the exe from the WinThumbsPreloader repo and drop it somewhere on PATH. If you can't (or won't) touch PATH, the README's fallback is editing thumb_generator.py to use the full absolute path to the exe.
Where people get burned
- Nothing happens when the cycle fires. Almost always the exe isn't on PATH. Check the
[ThumbGenerator] Cycle completeline in your ComfyUI console - if the Popen threw, the error prints right there. - Thumbnails still missing. Your
folder_suffixdoesn't match where Save Image actually writes, or Explorer isn't in a thumbnail-capable view (Medium/Large icons). The preloader can't fix your folder view for you. - The counter resets. It's a class variable, not persisted - restarting ComfyUI zeroes it. Also, it's global: drop two instances of this node into one graph and they share the same counter. It's a one-per-workflow utility.
Set cycle_time to something sane, keep the suffix honest, and you'll forget it's there - which is exactly the point.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| cycle_time | INT | 11–10000 | — |
| folder_suffix | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| current_count | INT | — |