Nodes/ComfyUI FRED Nodes v2/πŸ‘‘ FRED Image Load (avif support)
ComfyUI Node

πŸ‘‘ FRED Image Load (avif support)

An image loader with folder browsing, AVIF support, and metadata passthrough

By PoukpalaovaΒ·Created about a year agoΒ·Updated 7 months agoΒ· 3
πŸ‘‘ FRED Image Load (avif support)
    • image
    • mask
    • image_size_kb
    • width
    • height
    • index
    • total_images_qty_in_folder(s)
    • images_qty_in_current_folder
    • folder_path
    • full_folder_path
    • filename_text
    • skipped_report
    • positive_prompt
    • negative_prompt
    • parameters
    • help
    β—„imageβ–Ύβ–Ί
    β—„Get_metadata_from_filetrueβ–Ί
    β—„modeβ–Ύβ–Ί
    β—„index0β–Ί
    β—„stop_at_max_index999999999β–Ί
    β—„next_index_if_any_invalidtrueβ–Ί
    β—„pathβ–Ί
    β—„include_subdirectoriesfalseβ–Ί
    β—„show_image_from_pathfalseβ–Ί
    β—„clear_cachefalseβ–Ί
    β—„filename_text_extensionfalseβ–Ί
    β—„source_filename_hintβ–Ί

    Stock ComfyUI Load Image is fine for dragging in one picture. The moment you want to walk through a folder of images - img2img them one at a time, or batch through a directory - the stock loader fights you. FRED_ImageLoad is the folder-walking, index-remembering, metadata-extracting version. It's the biggest node in the FRED pack for a reason: it does a lot.

    The two modes

    mode has two settings:

    • no_folder - behaves like the stock loader: pick an image from the input folder via the image dropdown.
    • image_from_folder - point path at a directory and the node walks it, letting you advance with index. include_subdirectories pulls in subfolders, next_index_if_any_invalid skips broken files (with a persistent log in ~/.fred_logs), and stop_at_max_index gives you a clean end-of-batch signal. show_image_from_path renders a preview inside the node so you can see which image you're on.

    Index controls: index (fixed), or the node can advance/randomize as you step through. clear_cache exists because the node caches the folder's file list for speed - and the README notes you should clear it before pointing it at a very large folder, since the cache rebuild is the slow part.

    The part that matters most: metadata

    With Get_metadata_from_file on (default), loading an image that carries embedded generation data gives you:

    • positive_prompt / negative_prompt
    • parameters - the full A1111-style parameter string, which you can feed straight into the FRED Image Saver's metadata or a prompt node.

    This is huge for img2img workflows that take an old generated image, pull its original prompt, and re-run it with tweaks. It also reads the mask channel out of images that have one (transparent PNGs etc.) via the mask output.

    Other useful outputs

    • width, height, image_size_kb - dimensions and file size.
    • folder_path / full_folder_path / filename_text - naming info for save nodes and logs.
    • index, total_images_qty_in_folder(s), images_qty_in_current_folder - your position and the folder counts, handy for progress-style logic or batch loops.
    • skipped_report - which files were skipped and why.

    The AVIF bit

    The title advertises AVIF support, and it's real: the pack depends on pillow-avif-plugin and imageio, and the allowed extensions list includes .avif alongside jpeg, png, tiff, gif, bmp, and webp. If you're pulling modern lossy sources, this is one of the few loaders that reads them without a conversion detour.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/Poukpalaova/ComfyUI-FRED-Nodes_v2.git
    

    Restart, or "ComfyUI FRED Nodes v2" via Manager. This node pulls the heavier end of the pack's requirements - opencv-python, imageio, pillow-avif-plugin - so the first install takes a moment.

    Gotchas

    If it feels slow on a big folder, that's the index cache being built - let it finish once and it's fast after. The metadata outputs only populate when the file actually has embedded generation data; a plain screenshot loads fine but yields empty prompt strings. And clear_cache before big folder changes, or you'll be stepping through a stale file list.

    CategoryπŸ‘‘FRED/image

    Inputs (12)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png
    Get_metadata_from_fileBOOLEANtrueβ€”
    modeCOMBO2 options: no_folder, image_from_folder
    indexINT00–999999999β€”
    stop_at_max_indexINT9999999990–999999999β€”
    next_index_if_any_invalidBOOLEANtrueβ€”
    pathSTRINGβ€”
    include_subdirectoriesBOOLEANfalseβ€”
    show_image_from_pathBOOLEANfalseβ€”
    clear_cacheBOOLEANfalseβ€”
    filename_text_extensionoptCOMBOfalse2 options: true, false
    source_filename_hintoptSTRINGAuto-filled by the frontend with the dropped filename.

    Outputs (16)

    NameTypeDescription
    imageIMAGEβ€”
    maskMASKβ€”
    image_size_kbFLOATβ€”
    widthINTβ€”
    heightINTβ€”
    indexINTβ€”
    total_images_qty_in_folder(s)INTβ€”
    images_qty_in_current_folderINTβ€”
    folder_pathSTRINGβ€”
    full_folder_pathSTRINGβ€”
    filename_textSTRINGβ€”
    skipped_reportSTRINGβ€”
    positive_promptSTRINGβ€”
    negative_promptSTRINGβ€”
    parametersSTRINGβ€”
    helpSTRINGβ€”