






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

import numpy as np
import torch

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



@dataclass
class 							_UpperCamelCase			(a_			):
      snake_case_  =							42


try:
 if not (is_transformers_available() and is_torch_available()):
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 from ...utils.dummy_torch_and_transformers_objects import *  # noqa F403
else:
 from .pipeline_text_to_video_synth import TextToVideoSDPipeline
 from .pipeline_text_to_video_synth_imgaimg import VideoToVideoSDPipeline  # noqa: F401
 from .pipeline_text_to_video_zero import TextToVideoZeroPipeline














from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCamelCase			:					int         =	logging.get_logger(__name__)

lowerCamelCase			:					Tuple         =	{
    '''caidas/swin2sr-classicalsr-x2-64''': (
        '''https://huggingface.co/caidas/swin2sr-classicalsr-x2-64/resolve/main/config.json'''
    ),
}



class 							_UpperCamelCase			(a_			):
      snake_case_  =							"""swin2sr"""

      snake_case_  =							{
          """hidden_size""": """embed_dim""",
          """num_attention_heads""": """num_heads""",
          """num_hidden_layers""": """num_layers""",
      }


      def __init__(	self					,						__UpperCamelCase=6_4					,						__UpperCamelCase=1					,						__UpperCamelCase=3					,						__UpperCamelCase=1_8_0					,						__UpperCamelCase=[6, 6, 6, 6, 6, 6]					,						__UpperCamelCase=[6, 6, 6, 6, 6, 6]					,						__UpperCamelCase=8					,						__UpperCamelCase=2.0					,						__UpperCamelCase=True					,						__UpperCamelCase=0.0					,						__UpperCamelCase=0.0					,						__UpperCamelCase=0.1					,						__UpperCamelCase="gelu"					,						__UpperCamelCase=False					,						__UpperCamelCase=0.0_2					,						__UpperCamelCase=1e-5					,						__UpperCamelCase=2					,						__UpperCamelCase=1.0					,						__UpperCamelCase="1conv"					,						__UpperCamelCase="pixelshuffle"					,						**__UpperCamelCase					,						)->	Tuple:
           super().__init__(**__UpperCamelCase	)

           __lowerCAmelCase								=					image_size
           __lowerCAmelCase								=					patch_size
           __lowerCAmelCase								=					num_channels
           __lowerCAmelCase								=					embed_dim
           __lowerCAmelCase								=					depths
           __lowerCAmelCase								=					len(__UpperCamelCase	)
           __lowerCAmelCase								=					num_heads
           __lowerCAmelCase								=					window_size
           __lowerCAmelCase								=					mlp_ratio
           __lowerCAmelCase								=					qkv_bias
           __lowerCAmelCase								=					hidden_dropout_prob
           __lowerCAmelCase								=					attention_probs_dropout_prob
           __lowerCAmelCase								=					drop_path_rate
           __lowerCAmelCase								=					hidden_act
           __lowerCAmelCase								=					use_absolute_embeddings
           __lowerCAmelCase								=					layer_norm_eps
           __lowerCAmelCase								=					initializer_range
           __lowerCAmelCase								=					upscale
           __lowerCAmelCase								=					img_range
           __lowerCAmelCase								=					resi_connection
           __lowerCAmelCase								=					upsampler






