code: 
  
  
  from typing import TYPE_CHECKING
  
  from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available
  
  
  _SCREAMING_SNAKE_CASE    :				Any       =					{
      'configuration_swin2sr': ['SWIN2SR_PRETRAINED_CONFIG_ARCHIVE_MAP', 'Swin2SRConfig'],
  }
  
  
  try:
   if not is_torch_available():
    raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
   pass
  else:
   _SCREAMING_SNAKE_CASE    :				Union[str, Any]       =					[
       'SWIN2SR_PRETRAINED_MODEL_ARCHIVE_LIST',
       'Swin2SRForImageSuperResolution',
       'Swin2SRModel',
       'Swin2SRPreTrainedModel',
   ]
  
  
  try:
   if not is_vision_available():
    raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
   pass
  else:
   _SCREAMING_SNAKE_CASE    :				int       =					['Swin2SRImageProcessor']
  
  
  if TYPE_CHECKING:
   from .configuration_swinasr import SWIN2SR_PRETRAINED_CONFIG_ARCHIVE_MAP, SwinaSRConfig
  
   try:
    if not is_torch_available():
     raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
    pass
   else:
    from .modeling_swinasr import (
        SWIN2SR_PRETRAINED_MODEL_ARCHIVE_LIST,
        SwinaSRForImageSuperResolution,
        SwinaSRModel,
        SwinaSRPreTrainedModel,
    )
  
   try:
    if not is_vision_available():
     raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
    pass
   else:
    from .image_processing_swinasr import SwinaSRImageProcessor
  
  
  else:
   import sys
  
   _SCREAMING_SNAKE_CASE    :				Dict       =					_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)
  
  
  
  
  
style_context: 
  
  
  from ..utils import deprecate
  from .attention_processor import (  # noqa: F401
      Attention,
      AttentionProcessor,
      AttnAddedKVProcessor,
      AttnProcessor2_0,
      LoRAAttnProcessor,
      LoRALinearLayer,
      LoRAXFormersAttnProcessor,
      SlicedAttnAddedKVProcessor,
      SlicedAttnProcessor,
      XFormersAttnProcessor,
  )
  from .attention_processor import AttnProcessor as AttnProcessorRename  # noqa: F401
  
  
  deprecate(
      "cross_attention",
      "0.20.0",
      "Importing from cross_attention is deprecated. Please import from diffusers.models.attention_processor instead.",
      standard_warn=False,
  )
  
  
  _SCREAMING_SNAKE_CASE    :				Optional[int]       =					AttentionProcessor
  
  class 						A__      (					snake_case__			):
  
  
  
  
  
  
  
      """simple docstring"""
  
      def __init__( self    ,      *__snake_case    ,      **__snake_case					):
           snake_case					=       F'''{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {"".join(self.__class__.__name__.split("Cross"					)					)} instead.'''
           deprecate('''cross_attention'''    ,      '''0.20.0'''    ,      __snake_case    ,      standard_warn=__snake_case					)
           super().__init__(*__snake_case    ,      **__snake_case					)
  
  
  
  
  
  
  class 						A__      (					snake_case__			):
  
  
  
  
  
  
  
      """simple docstring"""
  
      def __init__( self    ,      *__snake_case    ,      **__snake_case					):
           snake_case					=       F'''{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {"".join(self.__class__.__name__.split("Cross"					)					)} instead.'''
           deprecate('''cross_attention'''    ,      '''0.20.0'''    ,      __snake_case    ,      standard_warn=__snake_case					)
           super().__init__(*__snake_case    ,      **__snake_case					)
  
  
  
  
  
  
  class 						A__      (					snake_case__			):
  
  
  
  
  
  
  
      """simple docstring"""
  
      def __init__( self    ,      *__snake_case    ,      **__snake_case					):
           snake_case					=       F'''{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {"".join(self.__class__.__name__.split("Cross"					)					)} instead.'''
           deprecate('''cross_attention'''    ,      '''0.20.0'''    ,      __snake_case    ,      standard_warn=__snake_case					)
           super().__init__(*__snake_case    ,      **__snake_case					)
  
  
  
  
  
  
  class 						A__      (					snake_case__			):
  
  
  
  
  
  
  
      """simple docstring"""
  
      def __init__( self    ,      *__snake_case    ,      **__snake_case					):
           snake_case					=       F'''{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {"".join(self.__class__.__name__.split("Cross"					)					)} instead.'''
           deprecate('''cross_attention'''    ,      '''0.20.0'''    ,      __snake_case    ,      standard_warn=__snake_case					)
           super().__init__(*__snake_case    ,      **__snake_case					)
  
  
  
  
  
  
  class 						A__      (					snake_case__			):
  
  
  
  
  
  
  
      """simple docstring"""
  
      def __init__( self    ,      *__snake_case    ,      **__snake_case					):
           snake_case					=       F'''{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {"".join(self.__class__.__name__.split("Cross"					)					)} instead.'''
           deprecate('''cross_attention'''    ,      '''0.20.0'''    ,      __snake_case    ,      standard_warn=__snake_case					)
           super().__init__(*__snake_case    ,      **__snake_case					)
  
  
  
  
  
  
  class 						A__      (					snake_case__			):
  
  
  
  
  
  
  
      """simple docstring"""
  
      def __init__( self    ,      *__snake_case    ,      **__snake_case					):
           snake_case					=       F'''{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {"".join(self.__class__.__name__.split("Cross"					)					)} instead.'''
           deprecate('''cross_attention'''    ,      '''0.20.0'''    ,      __snake_case    ,      standard_warn=__snake_case					)
           super().__init__(*__snake_case    ,      **__snake_case					)
  
  
  
  
  
  
  class 						A__      (					snake_case__			):
  
  
  
  
  
  
  
      """simple docstring"""
  
      def __init__( self    ,      *__snake_case    ,      **__snake_case					):
           snake_case					=       F'''{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {"".join(self.__class__.__name__.split("Cross"					)					)} instead.'''
           deprecate('''cross_attention'''    ,      '''0.20.0'''    ,      __snake_case    ,      standard_warn=__snake_case					)
           super().__init__(*__snake_case    ,      **__snake_case					)
  
  
  
  
  
  
  class 						A__      (					snake_case__			):
  
  
  
  
  
  
  
      """simple docstring"""
  
      def __init__( self    ,      *__snake_case    ,      **__snake_case					):
           snake_case					=       F'''{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {"".join(self.__class__.__name__.split("Cross"					)					)} instead.'''
           deprecate('''cross_attention'''    ,      '''0.20.0'''    ,      __snake_case    ,      standard_warn=__snake_case					)
           super().__init__(*__snake_case    ,      **__snake_case					)
  
  
  
  
  