Nodes/ComfyUI-Leputen-Utils/Load Image (Leputen)
ComfyUI Node

Load Image (Leputen)

Load Image, but with subfolders, EXR, and alpha bleeding

By lilquail·Created 9 months ago·Updated 9 months ago· 1
Load Image (Leputen)
    • image
    • mask
    • filename
    • path
    image
    alpha_bleedtrue
    blur_radius0.0
    invert_maskfalse
    exr_tone_mapfalse

    ComfyUI's stock Load Image is fine until it isn't: it only lists files in the top level of the input folder, it can't open EXR/HDR, and it does nothing about the halo problem on transparent textures. Load Image (Leputen) is the upgraded version that fixes all three.

    For anyone working with game assets, the alpha part alone earns its keep. Transparent textures - decals, foliage, particles - have premultiplied alpha issues that produce dark fringes at the edges, and this loader runs alpha bleeding to stop that before the image ever reaches your pipeline.

    How it works

    The node scans your ComfyUI input folder recursively, so subfolder-nested textures show up in the dropdown (the stock loader won't list them). It accepts .png, .jpg, .jpeg, .webp, .bmp, .tif, .tiff, .gif, and .exr. The path output preserves the relative subfolder path of the file, which the description notes is the thing that makes mirroring input folder structure in a batch save possible.

    The alpha controls:

    • alpha_bleed (default on) - un-premultiplies alpha to prevent halo artifacts around transparency. "Essential for game assets," per the tooltip, and it's right.
    • blur_radius (0–10, default 0) - blurs the RGB during bleeding for smoother transitions; only active when bleeding is on.
    • invert_mask - flips the output mask (white↔black).
    • exr_tone_map - for EXR files: apply Reinhard tone mapping for a viewable result, or leave off to keep raw HDR values (clamped to 0–1).

    Inputs and outputs

    Required: image (the dropdown) and alpha_bleed. Optional: blur_radius, invert_mask, exr_tone_map.

    Outputs: image, mask, filename, path - the path being the subfolder-aware string.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/lilquail/ComfyUI-Leputen-Utils
    

    Restart ComfyUI, find it under Leputen-Utils → Image. No Windows-only dependency for this one; EXR loading works cross-platform.

    Troubleshooting

    • File doesn't appear in the dropdown - it's not under the ComfyUI input directory (or its subfolders). The loader reads from there and nowhere else.
    • Halo fringes persist - alpha_bleed is on but blur_radius is 0. The pack suggests 1.0–3.0 for the blur to soften the transition; that's the knob that actually fixes visible fringes.
    • EXR looks blown out or dark - toggle exr_tone_map. On = Reinhard-mapped for display; off = raw HDR clamped to 0–1. Pick based on whether you're looking or shipping.
    • Batch save doesn't mirror my folders - use the path output from this loader (it carries the relative subfolder string) rather than reconstructing names from filename.

    It's not a flashy node, but it quietly removes three paper cuts from the game-texture workflow: subfolders, HDR, and alpha. If any of those are on your list, this loader will feel like an upgrade the first time you use it.

    CategoryLeputen-Utils/Image

    Inputs (5)

    NameTypeDefaultDescription
    imageCOMBOSelect an image file to load. Supports files in subfolders and EXR (HDR) format.
    alpha_bleedBOOLEANtrueEnable alpha bleeding (un-premultiply alpha) to prevent halo artifacts around transparent areas. Essential for game assets.
    blur_radiusoptFLOAT0.00–10Apply a blur to the RGB channels during alpha bleeding for smoother transitions. Only active if Alpha Bleed is enabled.
    invert_maskoptBOOLEANfalseIf enabled, the output MASK will be inverted (white becomes black, and vice-versa).
    exr_tone_mapoptBOOLEANfalseFor EXR files: Apply Reinhard tone mapping for HDR content. If disabled, values are clamped to [0,1].

    Outputs (4)

    NameTypeDescription
    imageIMAGE
    maskMASK
    filenameSTRING
    pathSTRING