Nodes/comfyui-lumi-tools/Lumi Save Image
ComfyUI Node

Lumi Save Image

A Save Image that refuses to hand you a 30MB PNG

By illuminatianon·Created 9 months ago·Updated 4 months ago· 0
Lumi Save Image
  • images
    directory%year%-%month%-%day%
    filenameComfyUI
    jpg_quality100

    Lumi Save Image is ComfyUI's Save Image with two quality-of-life upgrades that stop mattering right up until the moment they save you. First, it splits the output path into separate directory and filename widgets with ComfyUI's token replacement. Second, if the PNG it writes comes out larger than 4MB - which 2K and 4K renders absolutely will - it also writes a JPG copy at a quality you control. That "also saves a JPG" is the feature that quietly changed how one 4K batch got shared over a chat app that caps uploads.

    The inputs that matter

    • images - any IMAGE tensor. Batches are handled per-frame, like core Save Image.
    • directory - the output subfolder, default %year%-%month%-%day%. Tokens like %year%, %month%, %day% get expanded into real dates, so your output folder self-organizes by day without you touching it. Put my_project/renders in there and it nests under ComfyUI/output/.
    • filename - the base name prefix, default ComfyUI. The node appends its usual _00001_-style counter and handles collisions, and %batch_num% works if you want per-frame names.
    • jpg_quality (optional) - 1–100, default 100. Only used when the JPG fallback kicks in.

    It's an output node - no outputs, just files. The PNG always gets written with full workflow metadata embedded (the prompt and workflow info, so the graph is recoverable from the image), and the JPG is a sidecar that appears only when the PNG trips the 4MB threshold.

    Installing

    cd ComfyUI/custom_nodes
    git clone https://github.com/illuminatianon/comfyui-lumi-tools
    cd comfyui-lumi-tools
    uv sync
    

    Restart ComfyUI (or search "Lumi Tools" in ComfyUI Manager). Nothing extra to install - it's pure Pillow + the pack's standard dependencies.

    Where people get caught

    Three small things. First, the directory field is relative to ComfyUI/output/ - %year%-%month%-%day% lands in output/2026-08-16/, not in your home folder, and there's no absolute-path widget to fight. Second, quality 100 JPGs are barely smaller than the PNG, which defeats the fallback's purpose; if you're saving 4K renders for upload, drop jpg_quality to 90 or so and actually gain the size win. Third, the JPG appears alongside the PNG - the node deliberately never drops the lossless file, so a "fallback" isn't "replacement." You'll get two files per image when you cross 4MB. If that's not what you want, that's what the quality slider is for: keep your PNGs small enough to stay under the threshold.

    CategoryLumi/image

    Inputs (4)

    NameTypeDefaultDescription
    imagesIMAGE
    directorySTRING%year%-%month%-%day%Output subfolder (e.g., 'my_project/renders')
    filenameSTRINGComfyUIBase filename prefix for the saved images
    jpg_qualityoptINT1001–100JPEG quality (1-100) when PNG exceeds 4MB

    Outputs (0)

    No outputs