LoRA Preview Saver
Your LoRA's Next Thumbnail Is One Click Away
- images
- images
LoRA Preview Saver is the one-click answer to a problem you've probably stopped noticing: half your LoRAs have no preview image, so your loader is a wall of gray placeholders and you're identifying models by filename memory. Every Civitai download ships with a thumbnail; your self-trained or long-ago-forgotten LoRAs don't, and nobody wants to crack open an image editor to fix that. This node closes the loop - when you generate an image you actually like with a LoRA, you save that very image as the LoRA's thumbnail. No new tool, no manual file juggling.
It's the newest node in the LoRA Txt Loader pack (kwokkakiu233's "optimized fork"), and it only makes sense as a companion to the pack's own loaders. Those loaders - LoRA Txt Loader and LoRA Txt Loader (From Path) - expose a lora_path output that points at the loaded .safetensors. That output is the handshake this node needs: it tells the saver which LoRA the image was made with. The same trigger-word-from-a-.txt philosophy carries over - everything is local, offline, and lives right next to the model file.
How it works
At the surface it's just an output node: you feed it images, it saves the batch to ComfyUI/output/ with your filename_prefix (default LoraPreview). The interesting part is the button on its face. Run the workflow once and the wired LoRA paths auto-fill into an editable lora_paths text area - the pack deliberately doesn't clobber your manual edits, it only fills paths you've actually connected. Then click 💾 Save as LoRA Previews. That button posts to the pack's /lora_txt_loader/save_lora_previews API, which for each path checks the file is really a model (.safetensors, .ckpt, etc. - it rejects .txt/.png paths so you can't accidentally overwrite something), checks whether a preview already exists, and if not, copies the saved image to {lora_name}.png sitting next to the model file.
That "skip if a preview exists" behavior is worth knowing: it will never overwrite a thumbnail you already have. LoRA with a preview gets skipped, LoRA without one gets saved, none present means all saved, both present means both skipped. Non-model paths come back as errors rather than silently writing junk.
The inputs that matter
images- connect from VAE Decode. The node still passes the tensor through as itsimagesoutput, so it behaves like a Save Image you can keep inline.filename_prefix- the output filename prefix, exactly like Save Image. DefaultLoraPreview.lora_paths- the auto-filled, editable text area the button reads. This is the one you actually interact with.lora_path_1…lora_path_8- optional inputs (up to eight) that accept thelora_pathoutput of the pack's loaders. They'reforceInput, so you wire them rather than type.
The workflow is: wire a LoRA Txt Loader's lora_path into lora_path_1 (and so on), wire VAE Decode into images, run, then delete any bypassed/muted LoRA lines from the text area before clicking save. If you leave a bypassed LoRA in the list, the saver happily writes your image as its preview even though it wasn't in the image - that's the one footgun, and it's why the README hammers "remove the ones you didn't use."
Install
Via ComfyUI Manager, search LoRA Txt Loader. Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/kwokkakiu233/comfyui-lora-txt-loader
Then restart ComfyUI. There are no extra dependencies - just Python stdlib plus the Pillow/numpy/torch that ship with ComfyUI. The saved {lora_name}.png is the same sidecar convention the pack's cascade browser hover reads, and anything else that honors Civitai-style previews will pick it up too. Thirty seconds of setup, and your LoRA folder finally stops looking like a missed connection ad.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| filename_prefix | STRING | LoraPreview | — |
| lora_paths | STRING | — | |
| lora_path_1opt | STRING | — | |
| lora_path_2opt | STRING | — | |
| lora_path_3opt | STRING | — | |
| lora_path_4opt | STRING | — | |
| lora_path_5opt | STRING | — | |
| lora_path_6opt | STRING | — | |
| lora_path_7opt | STRING | — | |
| lora_path_8opt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |