| 1053 | |
| 1054 | @register_to_config |
| 1055 | def __init__( |
| 1056 | self, |
| 1057 | do_resize: bool = True, |
| 1058 | vae_scale_factor: int = 8, |
| 1059 | resample: str = "lanczos", |
| 1060 | do_normalize: bool = True, |
| 1061 | do_binarize: bool = False, |
| 1062 | do_convert_grayscale: bool = False, |
| 1063 | ): |
| 1064 | super().__init__( |
| 1065 | do_resize=do_resize, |
| 1066 | vae_scale_factor=vae_scale_factor, |
| 1067 | resample=resample, |
| 1068 | do_normalize=do_normalize, |
| 1069 | do_binarize=do_binarize, |
| 1070 | do_convert_grayscale=do_convert_grayscale, |
| 1071 | ) |
| 1072 | |
| 1073 | @staticmethod |
| 1074 | def classify_height_width_bin(height: int, width: int, ratios: dict) -> Tuple[int, int]: |