'''simple docstring'''


from packaging import version

from .import_utils import is_accelerate_available


if is_accelerate_available():
					import accelerate





def       lowerCAmelCase					(		UpperCamelCase__				:   List[Any]       ):


	"""simple docstring"""
	if not is_accelerate_available():
		return method
	__UpperCAmelCase							=			version.parse(accelerate.__version__       ).base_version
	if version.parse(UpperCamelCase__       ) < version.parse('''0.17.0'''       ):
		return method

	def wrapper(self				:   Optional[int]    ,					*UpperCamelCase__				:   List[str]    ,					**UpperCamelCase__				:   str       ):
		if hasattr(self    ,					'''_hf_hook'''       ) and hasattr(self._hf_hook    ,					'''pre_forward'''       ):
			self._hf_hook.pre_forward(self       )
		return method(self    ,					*UpperCamelCase__    ,					**UpperCamelCase__       )

	return wrapper

'''simple docstring'''


import warnings

from diffusers import StableDiffusionImgaImgPipeline  # noqa F401


warnings.warn(
    "The `image_to_image.py` script is outdated. Please use directly `from diffusers import"
    " StableDiffusionImg2ImgPipeline` instead."
)
