


"""simple docstring"""






from cva import destroyAllWindows, imread, imshow, waitKey





def 							A_					(   snake_case__					,				snake_case__		)				->     int:
			_UpperCamelCase    ,			_UpperCamelCase				:str				    =  img.shape[0], img.shape[1]

			def to_grayscale(snake_case__					,				snake_case__					,				snake_case__		):
						return 0.21_26 * red + 0.5_87 * green + 0.1_14 * blue

			def normalize(snake_case__		):
						return min(snake_case__					,				2_55		)

			for i in range(snake_case__		):
						for j in range(snake_case__		):
									_UpperCamelCase				:Dict				    =  int(to_grayscale(*img[i][j]		)		)
									_UpperCamelCase				:Optional[Any]				    =  [
									    normalize(snake_case__		),
									    normalize(greyscale + factor		),
									    normalize(greyscale + 2 * factor		),
									]

			return img


if __name__ == "__main__":
					# read original image
					UpperCamelCase__							:Any       =  {
					    percentage: imread("""image_data/lena.jpg""", 1) for percentage in (10, 20, 30, 40)
					}

					for percentage, img in images.items():
										make_sepia(img, percentage)

					for percentage, img in images.items():
										imshow(F"""Original image with sepia (factor: {percentage})""", img)

					waitKey(0)
					destroyAllWindows()





"""simple docstring"""






from dataclasses import dataclass
from typing import List, Optional, Union

import numpy as np
import PIL

from ...utils import BaseOutput, is_invisible_watermark_available, is_torch_available, is_transformers_available






@dataclass
class     A(     lowerCamelCase__		):

		"""simple docstring"""





		A         =       42


if is_transformers_available() and is_torch_available() and is_invisible_watermark_available():
					from .pipeline_stable_diffusion_xl import StableDiffusionXLPipeline
					from .pipeline_stable_diffusion_xl_imgaimg import StableDiffusionXLImgaImgPipeline

