MCPcopy Create free account
hub / github.com/Chen-Yang-Liu/Text2Earth / __init__

Method __init__

src/diffusers/image_processor.py:85–101  ·  view source on GitHub ↗
(
        self,
        do_resize: bool = True,
        vae_scale_factor: int = 8,
        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 resample: str = "lanczos",
90 do_normalize: bool = True,
91 do_binarize: bool = False,
92 do_convert_rgb: bool = False,
93 do_convert_grayscale: bool = False,
94 ):
95 super().__init__()
96 if do_convert_rgb and do_convert_grayscale:
97 raise ValueError(
98 "`do_convert_rgb` and `do_convert_grayscale` can not both be set to `True`,"
99 " if you intended to convert the image into RGB format, please set `do_convert_grayscale = False`.",
100 " if you intended to convert the image into grayscale format, please set `do_convert_rgb = False`",
101 )
102
103 @staticmethod
104 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