Nodes/ComfyUI-Kimi-VL/Load Kimi VL Image
ComfyUI Node

Load Kimi VL Image

The boring node that saves you a FileNotFoundError

By Yuan-ManX·Created about a year ago·Updated about a year ago· 1
Load Kimi VL Image
    • image
    • image_path
    image_path./figures/demo.png

    Load Kimi VL Image is the pack's own image loader, and it exists for one boring but real reason: the Kimi VL inference node needs an image and the path to that image as a string. ComfyUI's built-in Load Image gives you a tensor, not a PIL image and not a filesystem path, so this pack ships its own loader that hands back exactly what it wants. If you're following the intended workflow - Load Kimi VL Image → Load Kimi VL Model → Kimi VL → Save Kimi VL Text - this is the first node in the chain.

    What it does

    One input, image_path, a STRING pointing at an image file. It runs PIL's Image.open() on that path and returns two things:

    • image - a PIL_IMAGE, which feeds the image input of the Kimi VL node.
    • image_path - the same string you gave it, passed through so you can wire it into Kimi VL's image_path input.

    That's the whole node. It's genuinely two lines of Python wearing a ComfyUI costume, and that's fine - the point is a loader that matches the pack's internal types.

    The one thing that will bite you

    The default image_path is ./figures/demo.png. It doesn't exist. There is no figures folder in this repo, and the README doesn't ship a demo image. If you add this node, hit queue, and change nothing, you get a FileNotFoundError and a confused afternoon.

    Fix it the same way you'd fix any path in ComfyUI: set image_path to a real file. It's a plain string widget, so absolute paths work, and relative paths are relative to wherever you launched ComfyUI from. Load Kimi VL Image also validates the path up front and raises a clear error if it's missing - which is more helpful than the inference node discovering the problem halfway through.

    Installing it

    Part of the ComfyUI-Kimi-VL pack, so install the pack: ComfyUI Manager → search "Kimi" → install, or

    cd ComfyUI/custom_nodes
    git clone https://github.com/Yuan-ManX/ComfyUI-Kimi-VL.git
    cd ComfyUI-Kimi-VL
    pip install -r requirements.txt
    

    then restart ComfyUI.

    Should you even use it?

    Honest answer: it's the safest way to use the pack because the Kimi VL node demands both a PIL image and its path, and this loader guarantees they match. Could you work around it? Probably - feed the PIL image in from elsewhere and type the path manually. But "they match" is doing real work here, and the node is free. Just don't queue it with the default path.

    CategoryKimi-VL

    Inputs (1)

    NameTypeDefaultDescription
    image_pathSTRING./figures/demo.png

    Outputs (2)

    NameTypeDescription
    imagePIL_IMAGE
    image_pathSTRING