comfyui-load_image_enhanced-plugin
Enhanced Load Image node with filename outlet, optional original filename tracking only, and subfolder indexing.
Nodes (1)
ComfyUI LoadImageEnhanced
This custom node extends ComfyUI's image loading functionality with filename output and original filename tracking.
Features
LoadImageEnhanced
- Filename Output: Returns the filename of the loaded image as a STRING output (the original LoadImage node has no filename output)
- Original Filename Tracking: Preserves the original filename even when the image is modified by tools like MaskEditor (toggleable)
- Sync MaskEditor Toggle:
sync_maskeditorinput controls whetheroriginal_filenamefollows MaskEditor writes - Recursive Subfolder Listing: Lists images from all subfolders (the original LoadImage node only lists the top-level input directory); excludes
clipspace,3d,pasted, and any folder/file starting with.
Installation
ComfyUI Manager / Comfy Registry (recommended)
The node is published to the Comfy Registry as load-image-enhanced.
- Open the ComfyUI Manager (or the Comfy Registry / extensions page).
- Search for
load-image-enhanced. - Click Install.
- Restart ComfyUI.
Manual (git clone)
- Clone the repository into your ComfyUI
custom_nodesdirectory:git clone https://github.com/yusrmuttaqien/comfyui-load_image_enhanced-plugin.git custom_nodes/load-image-enhanced - Restart ComfyUI.
- The new node will appear in the "image" category.
Usage
LoadImageEnhanced
- Input: Select an image file from the dropdown (includes images from subfolders)
- Inputs:
image— Image filename to loadoriginal_filename— Text field that stores the original selected filename (editable by user)sync_maskeditor— Toggle (default off): when off,original_filenameignores MaskEditor writes; when on, it follows every source including MaskEditor
- Outputs:
image: The loaded image tensormask: The image mask (if available)filename: The filename of the loaded image
Requirements
- ComfyUI
- PIL (Pillow)
- PyTorch
- NumPy
Notes
Filename Tracking
The filename output uses the value of the original_filename widget, falling back to the loaded file's basename when the widget is empty. The widget is automatically updated when you select a new image from the dropdown. Whether it also follows MaskEditor writes is controlled by the sync_maskeditor toggle:
sync_maskeditoroff (default) —original_filenameignores MaskEditor (clipspace) writes:- Select
characters/hero.png→ filename output ishero.png - MaskEditor saves to
clipspace-painted-xxx.png→ the dropdown updates, butoriginal_filenamestayshero.png - The filename output continues to return
hero.png
- Select
sync_maskeditoron —original_filenamefollows every source, including MaskEditor:- MaskEditor saves to
clipspace-painted-xxx.png→original_filenameupdates toclipspace-painted-xxx.png
- MaskEditor saves to
Frontend Extension (Automatic)
The node includes a frontend extension that automatically syncs the original_filename widget when you change the dropdown. It's bundled with the custom node and loads automatically via WEB_DIRECTORY.
Without the extension, the original_filename field is still available but must be manually edited.
- The node recursively lists all images in the input folder and its subfolders
- Images inside
clipspace,3d,pasted, and any hidden (starting with.) folders are excluded from the dropdown listing - Any file starting with
.(e.g.,.DS_Store) is also excluded from the listing - However, if a downstream node (e.g., mask editor) passes an image path from an excluded folder, the node will still load it correctly