



from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


lowercase_						=       logging.get_logger(__name__)

lowercase_						=       {
    '''camembert-base''': '''https://huggingface.co/camembert-base/resolve/main/config.json''',
    '''umberto-commoncrawl-cased-v1''': (
        '''https://huggingface.co/Musixmatch/umberto-commoncrawl-cased-v1/resolve/main/config.json'''
    ),
    '''umberto-wikipedia-uncased-v1''': (
        '''https://huggingface.co/Musixmatch/umberto-wikipedia-uncased-v1/resolve/main/config.json'''
    ),
}
class 			_snake_case     (   SCREAMING_SNAKE_CASE__):
				UpperCamelCase__			:   List[Any]       						='camembert'




				def __init__(  self   :  int,   __lowercase   :  Optional[Any]=3_0522,   __lowercase   :  Tuple=768,   __lowercase   :  Optional[Any]=12,   __lowercase   :  Tuple=12,   __lowercase   :  Tuple=3072,   __lowercase   :  Optional[int]="gelu",   __lowercase   :  str=0.1,   __lowercase   :  List[str]=0.1,   __lowercase   :  Optional[Any]=512,   __lowercase   :  List[str]=2,   __lowercase   :  List[str]=0.02,   __lowercase   :  Tuple=1e-1_2,   __lowercase   :  str=1,   __lowercase   :  List[Any]=0,   __lowercase   :  Optional[Any]=2,   __lowercase   :  List[Any]="absolute",   __lowercase   :  Dict=True,   __lowercase   :  int=None,   **__lowercase   :  int,   ):
							super().__init__(pad_token_id=_SCREAMING_SNAKE_CASE,   bos_token_id=_SCREAMING_SNAKE_CASE,   eos_token_id=_SCREAMING_SNAKE_CASE,   **_SCREAMING_SNAKE_CASE  )

							lowercase__   					=			vocab_size
							lowercase__   					=			hidden_size
							lowercase__   					=			num_hidden_layers
							lowercase__   					=			num_attention_heads
							lowercase__   					=			hidden_act
							lowercase__   					=			intermediate_size
							lowercase__   					=			hidden_dropout_prob
							lowercase__   					=			attention_probs_dropout_prob
							lowercase__   					=			max_position_embeddings
							lowercase__   					=			type_vocab_size
							lowercase__   					=			initializer_range
							lowercase__   					=			layer_norm_eps
							lowercase__   					=			position_embedding_type
							lowercase__   					=			use_cache
							lowercase__   					=			classifier_dropout
class 			_snake_case     (   SCREAMING_SNAKE_CASE__):




				@property
				def 							A__ (  self   :  List[Any]  ):
							if self.task == "multiple-choice":
										lowercase__   					=			{0: "batch", 1: "choice", 2: "sequence"}
							else:
										lowercase__   					=			{0: "batch", 1: "sequence"}
							return OrderedDict(
							    [
							        ("input_ids", dynamic_axis),
							        ("attention_mask", dynamic_axis),
							    ]  )









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 (
							    VersatileDiffusionDualGuidedPipeline,
							    VersatileDiffusionImageVariationPipeline,
							    VersatileDiffusionPipeline,
							    VersatileDiffusionTextToImagePipeline,
							)
else:
							from .modeling_text_unet import UNetFlatConditionModel
							from .pipeline_versatile_diffusion import VersatileDiffusionPipeline
							from .pipeline_versatile_diffusion_dual_guided import VersatileDiffusionDualGuidedPipeline
							from .pipeline_versatile_diffusion_image_variation import VersatileDiffusionImageVariationPipeline
							from .pipeline_versatile_diffusion_text_to_image import VersatileDiffusionTextToImagePipeline




