AIHub Meta Set Exported Lora Image
Give a published LoRA its thumbnail without re-exporting it
- image
AIHubMetaSetExportedLoraImage is the afterthought node that saves you from redoing work. In the otavanopisto ComfyUI-aihub-workflow-exposer pack, exporting a LoRA with AIHubMetaExportLora writes a JSON catalog entry and - only if you happened to feed it an image at the time - a {id}.png thumbnail. This node is the "oops, I want a picture now" fix: it sets the thumbnail of an already-exported LoRA, nothing else.
Why should you care? The thumbnail isn't decoration. In this pack's client UIs, the LoRA's image is the visual aid that shows what the LoRA does - the README describes it as "a visual aid to the effect that it applies." A LoRA in the catalog with no image is a blind pick for the end user. So this node exists so you can polish the catalog entry after the fact, without touching the JSON you carefully configured.
How it works
Two required inputs, no outputs, and it's an output node that just writes a file:
- lora - the id of the exported LoRA, picked from a dropdown populated by the
ComfyUI/aihub/lorasfolder. Note the dropdown lists ids of LoRAs that are already exported, not arbitrary lora files. - image - any
IMAGEfrom your graph. It takes the first frame, converts it to PNG, and saves it as{id}.pngin the lora's aihub folder.
The id in the dropdown must match a LoRA you've already exported; the source throws "No image specified" if you run it without an image. Same mechanism as the export node - first image tensor, saved as PNG.
The practical workflow
Run AIHubMetaExportLora once to register the LoRA. Then, whenever you've got a nicer example image, drop it into this node and run. Because the file simply overwrites, you can iterate on the thumbnail as many times as you like. Handy trick: generate a grid of the LoRA's actual effect, save it with a Save Image node, load it back, and feed it here - that's a much better catalog image than whatever placeholder you used at export time.
Gotchas
The dropdown only shows already-exported ids. If the LoRA you want isn't in the list, run the export node first (or check the file actually landed in ComfyUI/aihub/loras). And keep the filename conventions in mind: the id is what matters, and the pack's ids are alphanumeric plus _ and -. A thumbnail with a mismatched name simply won't be found by the client.
Install - same no-fuss story as the whole pack, no Python requirements:
cd ComfyUI/custom_nodes
git clone https://github.com/otavanopisto/ComfyUI-aihub-workflow-exposer
Restart ComfyUI. Realistic verdict: this is a tiny utility - one input that matters, one output that isn't a wire. If you're curating a client-facing LoRA catalog, it's exactly the kind of small node that prevents "let me re-export the whole thing just to change a picture."
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| lora | COMBO | The id of the lora to set the image for | |
| image | IMAGE | The image to set for the lora |
Outputs (0)
No outputs