





import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto.configuration_auto import CONFIG_MAPPING


A   : Union[str, Any]			=				logging.get_logger(__name__)


class   A      (_lowerCamelCase   ):
			'''simple docstring'''




			__lowerCamelCase     :	List[Any]          =   '''upernet'''






			def __init__(      self       :   Optional[int]							,     __lowerCAmelCase       :   int=None							,     __lowerCAmelCase       :   Tuple=5_12							,     __lowerCAmelCase       :   Dict=0.0_2							,     __lowerCAmelCase       :   Optional[int]=[1, 2, 3, 6]							,     __lowerCAmelCase       :   str=True							,     __lowerCAmelCase       :   Tuple=0.4							,     __lowerCAmelCase       :   List[str]=3_84							,     __lowerCAmelCase       :   Optional[int]=2_56							,     __lowerCAmelCase       :   Optional[Any]=1							,     __lowerCAmelCase       :   Any=False							,     __lowerCAmelCase       :   Dict=2_55							,     **__lowerCAmelCase       :   List[Any]							,     )     ->     Tuple:







					"""simple docstring"""






					super().__init__(**lowercase_       )

					if backbone_config is None:
							logger.info("""`backbone_config` is `None`. Initializing the config with the default `ResNet` backbone."""       )
							A__  				=       CONFIG_MAPPING["""resnet"""](out_features=["""stage1""", """stage2""", """stage3""", """stage4"""]       )
					elif isinstance(lowercase_							,     lowercase_       ):
							A__  				=       backbone_config.get("""model_type"""       )
							A__  				=       CONFIG_MAPPING[backbone_model_type]
							A__  				=       config_class.from_dict(lowercase_       )

					A__  				=       backbone_config
					A__  				=       hidden_size
					A__  				=       initializer_range
					A__  				=       pool_scales
					A__  				=       use_auxiliary_head
					A__  				=       auxiliary_loss_weight
					A__  				=       auxiliary_in_channels
					A__  				=       auxiliary_channels
					A__  				=       auxiliary_num_convs
					A__  				=       auxiliary_concat_input
					A__  				=       loss_ignore_index







			def        a_	(      self       :   int       )     ->     Optional[Any]:







					"""simple docstring"""






					A__  				=       copy.deepcopy(self.__dict__       )
					A__  				=       self.backbone_config.to_dict()
					A__  				=       self.__class__.model_type
					return output










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


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 .notes_encoder import SpectrogramNotesEncoder
					from .continous_encoder import SpectrogramContEncoder
					from .pipeline_spectrogram_diffusion import (
					    SpectrogramContEncoder,
					    SpectrogramDiffusionPipeline,
					    TaFilmDecoder,
					)

try:
					if not (is_transformers_available() and is_torch_available() and is_note_seq_available()):
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					from ...utils.dummy_transformers_and_torch_and_note_seq_objects import *  # noqa F403
else:
					from .midi_utils import MidiProcessor



