From c01e7e1df355102ff7083a917fa1f00dcbfe65c4 Mon Sep 17 00:00:00 2001 From: Joshua Lochner <26504141+xenova@users.noreply.github.com> Date: Mon, 1 Dec 2025 18:43:15 -0500 Subject: [PATCH] Only perform center crop if crop_size parameter is provided --- src/base/image_processors_utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/image_processors_utils.js b/src/base/image_processors_utils.js index 19ff959d9..fa84cbb77 100644 --- a/src/base/image_processors_utils.js +++ b/src/base/image_processors_utils.js @@ -969,7 +969,7 @@ export class ImageProcessor extends Callable { image = await this.thumbnail(image, this.size, this.resample); } - if (this.do_center_crop) { + if (this.do_center_crop && this.crop_size) { let crop_width; let crop_height;