



import numpy as np





def 						__lowerCamelCase       (      __magic_name__	:  Union[str, Any]     , __magic_name__	:  int						):
							a__:       List[Any]											=np.array(__magic_name__						)
							a__:       str											=np.array(__magic_name__						)

							a__:       List[str]											=abs(predict - actual						)
							a__:       Tuple											=difference.mean()

							return score





def 						__lowerCamelCase       (      __magic_name__	:  Optional[Any]     , __magic_name__	:  Tuple						):
							a__:       Optional[int]											=np.array(__magic_name__						)
							a__:       List[Any]											=np.array(__magic_name__						)

							a__:       Any											=predict - actual
							a__:       str											=np.square(__magic_name__						)

							a__:       int											=square_diff.mean()
							return score





def 						__lowerCamelCase       (      __magic_name__	:  str     , __magic_name__	:  Dict						):
							a__:       List[str]											=np.array(__magic_name__						)
							a__:       List[Any]											=np.array(__magic_name__						)

							a__:       Union[str, Any]											=predict - actual
							a__:       int											=np.square(__magic_name__						)
							a__:       Optional[Any]											=square_diff.mean()
							a__:       Optional[Any]											=np.sqrt(__magic_name__						)
							return score





def 						__lowerCamelCase       (      __magic_name__	:  str     , __magic_name__	:  Optional[Any]						):
							a__:       Optional[int]											=np.array(__magic_name__						)
							a__:       int											=np.array(__magic_name__						)

							a__:       List[Any]											=np.log(predict + 1						)
							a__:       Any											=np.log(actual + 1						)

							a__:       int											=log_predict - log_actual
							a__:       Any											=np.square(__magic_name__						)
							a__:       Optional[int]											=square_diff.mean()

							a__:       Union[str, Any]											=np.sqrt(__magic_name__						)

							return score





def 						__lowerCamelCase       (      __magic_name__	:  Union[str, Any]     , __magic_name__	:  List[Any]						):
							a__:       Union[str, Any]											=np.array(__magic_name__						)
							a__:       Optional[Any]											=np.array(__magic_name__						)

							a__:       str											=predict - actual
							a__:       Tuple											=np.sum(__magic_name__						) / len(__magic_name__						)
							a__:       Optional[int]											=np.sum(__magic_name__						) / len(__magic_name__						)
							# print(numerator, denumerator)
							a__:       str											=float(__magic_name__						) / denumerator * 100

							return score







def 						__lowerCamelCase       (      __magic_name__	:  Optional[int]     , __magic_name__	:  List[str]						):
							return np.mean(np.array(__magic_name__						) == np.array(__magic_name__						)						)










from ...utils import is_transformers_available
from .pipeline_latent_diffusion_superresolution import LDMSuperResolutionPipeline


if is_transformers_available():
		from .pipeline_latent_diffusion import LDMBertModel, LDMTextToImagePipeline





