Nodes/comfyui-ysnodes/Load Image Temporarily
ComfyUI Node

Load Image Temporarily

Load a throwaway reference image without gunking up your /input folder

By MrYassinox·Created 2 months ago·Updated about a month ago· 1
Load Image Temporarily
    • image
    • mask
    • width
    • height
    image

    The stock LoadImage node reads from ComfyUI's /input folder, and that folder is forever. Every reference photo you drag in for a one-off experiment lives there permanently, waiting for you to trip over it in the dropdown next week. Load Image Temporarily (from the comfyui-ysnodes pack) does the same job but reads from /temp instead - and its upload button drops files straight into /temp, so your permanent input library stays clean. It's the difference between a staging area and a filing cabinet.

    If you do reference-image workflows at all - IP-Adapter, Flux Kontext-style conditioning, a quick img2img test - this is the node you'll start reaching for for anything you don't plan to keep.

    How it works

    The dropdown lists image files sitting in ComfyUI's /temp folder (resolved via folder_paths.get_temp_directory()). A companion JS file (web/load_image_temporarily_sg.js) adds the "choose file to upload" button; when you use it, the file uploads with type=temp, so it lands in /temp and never touches /input. ComfyUI auto-serves that JS because the pack declares a WEB_DIRECTORY, so there's nothing extra to configure.

    Under the hood it's the same logic as the built-in LoadImage: EXIF transpose, multi-frame support, and an alpha-channel mask. The author also fixed a real bug from the MNeMiC-style node it was converted from - the original resolved unannotated filenames against /input by default, so selecting a file that was already in /temp silently looked in the wrong place. That's why this version exists as its own thing.

    Inputs and outputs

    There's exactly one input: the image dropdown, plus the upload button. Outputs are what you'd expect from any image loader:

    • image - the loaded tensor.
    • mask - the alpha mask, inverted like ComfyUI's LoadImage.
    • width and height - handy INTs you can wire straight into a size picker or latent node without a separate GetImageSize.

    Installing it

    Part of the zero-dependency comfyui-ysnodes pack - no Python packages, no model downloads, nothing beyond a restart.

    cd ComfyUI/custom_nodes
    git clone https://github.com/MrYassinox/comfyui-ysnodes.git
    

    or search comfyui-ysnodes in ComfyUI Manager. Restart, and the node shows up under YSNodes/image.

    Things to know before you trust it

    Treat /temp as scratch space, not a library. The whole point is that it's disposable - ComfyUI uses that folder for transient stuff, so don't put your only copy of an image there. A couple of practical gotchas:

    • Files in /temp don't appear in the normal LoadImage dropdown. If you load via this node then wonder where the file went later, that's why - it's in /temp, and the stock node looks at /input.
    • The dropdown is blank-first. New node instances start empty rather than preselecting whatever happens to be in the folder, which is a nice touch when you have a bunch of temp files - no accidental loads.
    • This is a small personal pack, not a household name - if a downloaded workflow references it and you don't have the pack, ComfyUI Manager will offer to install it when you load the workflow. No community drama to worry about; the source is a few hundred lines of plain Python.
    CategoryYSNodes/image

    Inputs (1)

    NameTypeDefaultDescription
    imageCOMBOImage file in ComfyUI's /temp folder. Use the upload button to add a new one.

    Outputs (4)

    NameTypeDescription
    imageIMAGEThe loaded image tensor.
    maskMASKThe image alpha mask (inverted like ComfyUI LoadImage).
    widthINTImage width.
    heightINTImage height.