MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / __init__

Method __init__

diffusers/src/diffusers/image_processor.py:85–102  ·  view source on GitHub ↗
(
        self,
        do_resize: bool = True,
        vae_scale_factor: int = 8,
        vae_latent_channels: int = 4,
        resample: str = "lanczos",
        do_normalize: bool = True,
        do_binarize: bool = False,
        do_convert_rgb: bool = False,
        do_convert_grayscale: bool = False,
    )

Source from the content-addressed store, hash-verified

83
84 @register_to_config
85 def __init__(
86 self,
87 do_resize: bool = True,
88 vae_scale_factor: int = 8,
89 vae_latent_channels: int = 4,
90 resample: str = "lanczos",
91 do_normalize: bool = True,
92 do_binarize: bool = False,
93 do_convert_rgb: bool = False,
94 do_convert_grayscale: bool = False,
95 ):
96 super().__init__()
97 if do_convert_rgb and do_convert_grayscale:
98 raise ValueError(
99 "`do_convert_rgb` and `do_convert_grayscale` can not both be set to `True`,"
100 " if you intended to convert the image into RGB format, please set `do_convert_grayscale = False`.",
101 " if you intended to convert the image into grayscale format, please set `do_convert_rgb = False`",
102 )
103
104 @staticmethod
105 def numpy_to_pil(images: np.ndarray) -> List[PIL.Image.Image]:

Callers 3

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected