Zum Inhalt springen
Node packÜberprüftExtern
Quelle öffnen

ComfyUI-LoadResizeImageWithFilenameV02

Load & Resize Image node with mask and filename output for ComfyUI

Betreuer@Slartibart23D · adoptionBewertung

Paketprofil

Status
Überprüft
Verleger
@Slartibart23
Quelle
GitHub

README

ComfyUI – Load & Resize Image + Filename

A lightweight ComfyUI custom node that extends the well-known KJNodes LoadAndResizeImage with an additional filename STRING output so you can feed the loaded file's name directly into downstream nodes (e.g. save nodes, text nodes, prompt builders).


Features

OutputTypeDescription
imageIMAGELoaded image as a float32 tensor (B, H, W, 3)
maskMASKAlpha channel extracted as a (B, H, W) mask tensor
widthINTFinal image width (after optional resize)
heightINTFinal image height (after optional resize)
filenameSTRINGFile stem without extension (e.g. my_photo)

Inputs:

InputDefaultDescription
image—File picker (same as standard ComfyUI Load Image)
resizeFalseEnable resizing
width512Target width
height512Target height
keep_proportionFalseScale uniformly to fit within width × height
divisible_by2Round output dimensions to a multiple of this value
upscale_methodlanczosInterpolation: nearest-exact / bilinear / area / bicubic / lanczos

Installation

Via ComfyUI Manager (recommended)

Search for "Load & Resize Image + Filename" in ComfyUI Manager.

Manual

cd ComfyUI/custom_nodes
git clone https://github.com/Slartibart23/ComfyUI-LoadResizeImageWithFilename

Restart ComfyUI – no extra dependencies required beyond what ComfyUI already ships.


Requirements

  • Python ≥ 3.9 (tested on 3.13)
  • ComfyUI (any recent version)
  • torch, Pillow, numpy — all provided by ComfyUI's environment

Usage example

[Load & Resize Image + Filename]
       │                   │
    IMAGE                STRING (filename)
       │                   │
  [Your model]     [Save Image KJ]  ← filename_prefix connected here

The filename output carries only the stem (no path, no extension), e.g.:

Uploaded filefilename output
portrait_001.pngportrait_001
my photo.jpgmy photo
frame_0042.webpframe_0042

Credits

  • Node logic based on KJNodes LoadAndResizeImage by kijai — MIT License
  • Filename output extension by Slartibart23

License

MIT — see LICENSE.

Knoten in diesem Paket

1 Knoten
  • LoadAndResizeImageWithFilename

Quellen

3 Quellen
GitHubQuelleVersion b17de3e27d9b34bd294f26407de98f6ca4cf299d
github.com/Slartibart23/ComfyUI-LoadResizeImageWithFilenameV02

Verifiziert 12. Okt.

Quellenauszüge

1 Auszug

Source context: Repo Slartibart23/ComfyUI-LoadResizeImageWithFilenameV02