Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.comfy.org/llms.txt

Use this file to discover all available pages before exploring further.

This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub
The Random Crop Images node randomly selects a rectangular section from each input image and crops it to a specified width and height. This is commonly used for data augmentation to create variations of training images. The random position for the crop is determined by a seed value, ensuring the same crop can be reproduced.

Inputs

ParameterData TypeRequiredRangeDescription
imageIMAGEYes-The image to be cropped.
widthINTNo1 - 8192The width of the crop area (default: 512).
heightINTNo1 - 8192The height of the crop area (default: 512).
seedINTNo0 - 18446744073709551615A number used to control the random position of the crop (default: 0).
Note: The width and height parameters must be less than or equal to the dimensions of the input image. If a specified dimension is larger than the image, the crop will be limited to the image’s boundary.

Outputs

Output NameData TypeDescription
imageIMAGEThe resulting image after the random crop has been applied.

Source fingerprint (SHA-256): 8452a07a1cf66a520fb482f5239df3f33cfe3a77a28e289894ccd1d2544ecf40