ComfyUI Node

Image Load RGB

Load an image by file path in ComfyUI

By jamesWalker55·Created 3 years ago·Updated about a year ago· 217
Image Load RGB
    • IMAGE
    path./image.png

    JWImageLoadRGB loads an image from a file path you type in, and forces it to RGB. That's the key difference from ComfyUI's built-in Load Image node: the built-in one gives you a dropdown of files in your input folder and drags along an alpha channel; this one takes a path string and strips the image down to three clean color channels.

    Why you'd want that. The path-string approach is what makes this node useful in automation. Because the filename is just a string input, you can wire it from another node - build a path dynamically, loop over a naming pattern, or drive it from an API call - instead of clicking a file out of a dropdown. And forcing RGB means you never get a surprise 4-channel tensor breaking a node downstream that expected 3. If you've ever had a node choke because an image secretly carried an alpha, this sidesteps it.

    What it actually does

    It reads the file at path, decodes it, and returns it as an RGB IMAGE - alpha discarded, always three channels. The default path is ./image.png, which is relative to wherever ComfyUI is running from, so in practice you'll replace it with the actual path to your file.

    The inputs and outputs that matter

    • path (STRING, default ./image.png) - the file path to load. Can be typed or wired from another node.

    Output is a single IMAGE in RGB. Wire it into a sampler, a preprocessor, a resize - anywhere an image goes.

    How to install it

    Pack: jamesWalker55/comfyui-various. ComfyUI Manager - search Various ComfyUI Nodes by Type, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/jamesWalker55/comfyui-various
    

    then restart. No dependencies. JWImageLoadRGB lives in comfyui_image_ops.py, and the author suggests dropping just that file into custom_nodes/ if you only want the image utilities.

    Common issues & troubleshooting

    The path is on the server, not your computer. This is the big one, especially on a hosted or serverless ComfyUI like comfy.icu. The path is resolved on the machine actually running ComfyUI - a cloud GPU worker, not your laptop. Pointing it at C:\Users\you\pic.png from your local desktop won't work in the cloud, because that file doesn't exist there. On a hosted service you need the image to already be present on the server (uploaded through the platform's input mechanism), and you reference that path. The regular Load Image node, which uploads through the UI, is usually the safer choice for hosted runs.

    Relative paths are relative to ComfyUI's working directory. The default ./image.png is resolved from wherever ComfyUI was launched, which may not be where you think. When in doubt, use an absolute path.

    File not found. If it errors, the path is wrong or the file isn't there. Double-check spelling, extension, and - again - which machine the path is meant to be on.

    CategoryjamesWalker55

    Inputs (1)

    NameTypeDefaultDescription
    pathSTRING./image.png

    Outputs (1)

    NameTypeDescription
    IMAGEIMAGE