From 7cca9bf68dbfb1f99469d81fb74c8dc2e4a8b433 Mon Sep 17 00:00:00 2001 From: daqiege <44255948+daqiege@users.noreply.github.com> Date: Wed, 27 May 2026 10:44:59 +0800 Subject: [PATCH] feat: add bmp extension to default_video_operator Adds 'bmp' to the supported image extensions in UnifiedDataset.default_video_operator so that BMP files can be loaded by the same LoadImage + ImageCropAndResize path as JPG/PNG/WebP. Fixes #1456 --- diffsynth/core/data/unified_dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diffsynth/core/data/unified_dataset.py b/diffsynth/core/data/unified_dataset.py index 9dd9c511..aed49754 100644 --- a/diffsynth/core/data/unified_dataset.py +++ b/diffsynth/core/data/unified_dataset.py @@ -46,7 +46,7 @@ def default_video_operator( ): return RouteByType(operator_map=[ (str, ToAbsolutePath(base_path) >> RouteByExtensionName(operator_map=[ - (("jpg", "jpeg", "png", "webp"), LoadImage() >> ImageCropAndResize(height, width, max_pixels, height_division_factor, width_division_factor) >> ToList()), + (("jpg", "jpeg", "png", "webp", "bmp"), LoadImage() >> ImageCropAndResize(height, width, max_pixels, height_division_factor, width_division_factor) >> ToList()), (("gif",), LoadGIF( num_frames, time_division_factor, time_division_remainder, frame_processor=ImageCropAndResize(height, width, max_pixels, height_division_factor, width_division_factor),