
'''simple docstring'''







from __future__ import annotations

import typing
from collections.abc import Iterable

import numpy as np

lowercase					:							List[Any]   =      typing.Union[Iterable[float], Iterable[int], np.ndarray]  # noqa: UP007
lowercase					:							Tuple   =      typing.Union[np.floataa, int, float]  # noqa: UP007







def        SCREAMING_SNAKE_CASE__			(     __A    ,       __A			) ->			VectorOut:
	return np.sqrt(np.sum((np.asarray(__A			) - np.asarray(__A			)) ** 2			)			)







def        SCREAMING_SNAKE_CASE__			(     __A    ,       __A			) ->			VectorOut:
	return sum((va - va) ** 2 for va, va in zip(__A    ,       __A			)			) ** (1 / 2)


if __name__ == "__main__":







					def        SCREAMING_SNAKE_CASE__			(     ) ->			None:
						from timeit import timeit

						print('Without Numpy'			)
						print(
						    timeit(
						        'euclidean_distance_no_np([1, 2, 3], [4, 5, 6])'    ,       number=10_000    ,       globals=globals()    ,       )			)
						print('With Numpy'			)
						print(
						    timeit(
						        'euclidean_distance([1, 2, 3], [4, 5, 6])'    ,       number=10_000    ,       globals=globals()    ,       )			)





					benchmark()



'''simple docstring'''







from ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
					if not (is_transformers_available() and is_torch_available() and is_transformers_version(">=", "4.25.0")):
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					from ...utils.dummy_torch_and_transformers_objects import UnCLIPImageVariationPipeline, UnCLIPPipeline
else:
					from .pipeline_unclip import UnCLIPPipeline
					from .pipeline_unclip_image_variation import UnCLIPImageVariationPipeline
					from .text_proj import UnCLIPTextProjModel

