Skip to main content
Loads a batch of images and their corresponding text captions from a specified directory for training purposes. The node automatically searches for image files and their associated caption text files, processes the images according to specified resize settings, and encodes the captions using the provided CLIP model.

Inputs

ParameterDescriptionData TypeRequiredRange
folderThe folder to load images from.STRINGYes-
clipThe CLIP model used for encoding the text.CLIPYes-
resize_methodThe method used to resize images (default: “None”).COMBONo”None"
"Stretch"
"Crop"
"Pad”
widthThe width to resize the images to. -1 means use the original width (default: -1).INTNo-1 to 10000
heightThe height to resize the images to. -1 means use the original height (default: -1).INTNo-1 to 10000
Note: The CLIP input must be valid and cannot be None. If the CLIP model comes from a checkpoint loader node, ensure the checkpoint contains a valid CLIP or text encoder model. Note on folder structure: The node supports the kohya-ss/sd-scripts folder structure. If a subfolder’s name starts with a number followed by an underscore (e.g., 5_myclass), that number is used as a repeat count, and the images inside that subfolder will be loaded that many times.

Outputs

Output NameDescriptionData Type
IMAGEThe batch of loaded and processed images.IMAGE
CONDITIONINGThe encoded conditioning data from the text captions.CONDITIONING
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub

Source fingerprint (SHA-256): ffd6399783fc281a58bae811112d9ecacb51ab8ea3b512befa9b9fab2c6860de