@@ -35,8 +35,12 @@ class Flux2ImageProcessor(VaeImageProcessor):
3535 VAE latent channels.
3636 do_normalize (`bool`, *optional*, defaults to `True`):
3737 Whether to normalize the image to [-1,1].
38+ do_binarize (`bool`, *optional*, defaults to `False`):
39+ Whether to binarize the image to 0/1.
3840 do_convert_rgb (`bool`, *optional*, defaults to be `True`):
3941 Whether to convert the images to RGB format.
42+ do_convert_grayscale (`bool`, *optional*, defaults to be `False`):
43+ Whether to convert the images to grayscale format.
4044 """
4145
4246 @register_to_config
@@ -46,14 +50,18 @@ def __init__(
4650 vae_scale_factor : int = 16 ,
4751 vae_latent_channels : int = 32 ,
4852 do_normalize : bool = True ,
53+ do_binarize : bool = False ,
4954 do_convert_rgb : bool = True ,
55+ do_convert_grayscale : bool = False ,
5056 ):
5157 super ().__init__ (
5258 do_resize = do_resize ,
5359 vae_scale_factor = vae_scale_factor ,
5460 vae_latent_channels = vae_latent_channels ,
5561 do_normalize = do_normalize ,
62+ do_binarize = do_binarize ,
5663 do_convert_rgb = do_convert_rgb ,
64+ do_convert_grayscale = do_convert_grayscale ,
5765 )
5866
5967 @staticmethod
0 commit comments