ComfyUI Node

Load DDS Image

Open .dds files in ComfyUI — the thing normal LoadImage can't do

By lilquail·Created 9 months ago·Updated 9 months ago· 1
Load DDS Image
    • image
    • mask
    • filename
    • path
    • format
    • color_space
    image
    alpha_bleedtrue
    blur_radius0.0
    invert_maskfalse

    ComfyUI's built-in Load Image chokes on .dds files. That's a real problem if your game project stores its textures as DirectDraw Surfaces - the standard for most engines - because every texture you want to touch needs to be decoded before it becomes an image, and decoded properly so the compressed BC format doesn't turn into garbage. Load DDS Image is the fix.

    It's part of ComfyUI-Leputen-Utils, and it's honestly the reason most people install this pack at all. There are very few DDS-capable nodes for ComfyUI, and this one does the job with the actual DirectX texture tooling rather than a fragile pure-Python reimplementation.

    How it works

    The node decodes the DDS through the bundled texconv library (Microsoft's DirectXTex, shipped in the pack's bin/), which understands every BC format the format dropdown lists. It then hands you the image plus two extra niceties:

    • Alpha bleeding - un-premultiplies alpha so you don't get ugly halos around transparent edges. This is the "essential for game assets" checkbox, and for most game textures you want it on.
    • Blur during bleeding - blur_radius (0–10) softens the RGB bleed into the transparent regions; the pack suggests 1.0–3.0 for smoother in-engine blending.

    Inputs and outputs

    Required: image (a dropdown of .dds files in your ComfyUI input folder - the tooltip notes it has to live there) and alpha_bleed (default on). Optional: blur_radius and invert_mask (flips the output mask so white becomes black).

    Outputs:

    • image and mask - the decoded pixels and alpha mask.
    • filename and path - strings you can use to mirror naming when you re-save.
    • format and color_space - combo outputs carrying the original file's compression format and color space. The pack's smart-connection feature means these wire directly into Save DDS Image, so a load → save round-trip preserves the source format automatically.

    Install

    Same pack, same steps:

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

    Restart ComfyUI and it shows up under Leputen-Utils → DDS. Windows gets the bundled texconv.dll; macOS/Linux users need to place the matching libtexconv.* from the Texconv-Custom-DLL releases into bin/ for anything DDS to work.

    Troubleshooting

    • BC5 files crash it. This is a documented known issue, not you doing something wrong: BC5-compressed images (commonly normal maps) can be saved but not loaded, and attempting a load errors and requires restarting ComfyUI. If your normals are BC5, load them as BC1/BC3 or from a non-DDS source.
    • "File not found" - DDS files must be in the ComfyUI input directory (subfolders work, but it's the input dir, not the output dir).
    • Halo fringes on transparent decals - that's what alpha_bleed is for; turn it on and nudge blur_radius to ~2.
    • E_NOINTERFACE / RPC_E_CHANGED_MODE console warnings - ignore them. The node falls back to calling texconv.exe in a subprocess and proceeds normally.

    One habit worth building: whenever you load a DDS you plan to re-save, keep the format and color_space wires attached. It's the difference between "round-trip, format intact" and "accidentally converted my normal map to BC1".

    CategoryLeputen-Utils/DDS

    Inputs (4)

    NameTypeDefaultDescription
    imageCOMBOSelect a DDS image file to load. This should be placed in the ComfyUI input directory.
    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).

    Outputs (6)

    NameTypeDescription
    imageIMAGE
    maskMASK
    filenameSTRING
    pathSTRING
    formatBC1_UNORM,BC2_UNORM,BC3_UNORM,BC4_UNORM,BC5_UNORM,BC6H_UF16,BC6H_SF16,BC7_UNORM,R16G16B16A16_FLOAT,R32G32B32A32_FLOAT,R8G8B8A8_UNORM,B8G8R8A8_UNORM,B8G8R8X8_UNORM,R10G10B10A2_UNORM
    color_spacesRGB,Linear