
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


lowercase__							:							Any									=			{
    "configuration_lxmert": ["LXMERT_PRETRAINED_CONFIG_ARCHIVE_MAP", "LxmertConfig"],
    "tokenization_lxmert": ["LxmertTokenizer"],
}

try:
				if not is_tokenizers_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				lowercase__							:							Tuple									=			["LxmertTokenizerFast"]

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				lowercase__							:							Optional[int]									=			[
				    "LxmertEncoder",
				    "LxmertForPreTraining",
				    "LxmertForQuestionAnswering",
				    "LxmertModel",
				    "LxmertPreTrainedModel",
				    "LxmertVisualFeatureEncoder",
				    "LxmertXLayer",
				]

try:
				if not is_tf_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				lowercase__							:							Tuple									=			[
				    "TF_LXMERT_PRETRAINED_MODEL_ARCHIVE_LIST",
				    "TFLxmertForPreTraining",
				    "TFLxmertMainLayer",
				    "TFLxmertModel",
				    "TFLxmertPreTrainedModel",
				    "TFLxmertVisualFeatureEncoder",
				]


if TYPE_CHECKING:
				from .configuration_lxmert import LXMERT_PRETRAINED_CONFIG_ARCHIVE_MAP, LxmertConfig
				from .tokenization_lxmert import LxmertTokenizer

				try:
								if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .tokenization_lxmert_fast import LxmertTokenizerFast

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_lxmert import (
								    LxmertEncoder,
								    LxmertForPreTraining,
								    LxmertForQuestionAnswering,
								    LxmertModel,
								    LxmertPreTrainedModel,
								    LxmertVisualFeatureEncoder,
								    LxmertXLayer,
								)

				try:
								if not is_tf_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_tf_lxmert import (
								    TF_LXMERT_PRETRAINED_MODEL_ARCHIVE_LIST,
								    TFLxmertForPreTraining,
								    TFLxmertMainLayer,
								    TFLxmertModel,
								    TFLxmertPreTrainedModel,
								    TFLxmertVisualFeatureEncoder,
								)

else:
				import sys

				lowercase__							:							Optional[int]									=			_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)






import unittest

from diffusers import FlaxAutoencoderKL
from diffusers.utils import is_flax_available
from diffusers.utils.testing_utils import require_flax

from .test_modeling_common_flax import FlaxModelTesterMixin


if is_flax_available():
				import jax






@require_flax
class        SCREAMING_SNAKE_CASE__    (							SCREAMING_SNAKE_CASE_   ,		unittest.TestCase    ):

							"""simple docstring"""






							_snake_case     		=  FlaxAutoencoderKL



							@property
							def     A__		(  self			)->   int:





													'''simple docstring'''






													__UpperCamelCase       =			4
													__UpperCamelCase       =			3
													__UpperCamelCase       =			(32, 32)

													__UpperCamelCase       =			jax.random.PRNGKey(0			)
													__UpperCamelCase       =			jax.random.uniform(SCREAMING_SNAKE_CASE_     ,	((batch_size, num_channels) + sizes)			)

													return {"sample": image, "prng_key": prng_key}



							def     A__		(  self			)->   List[Any]:





													'''simple docstring'''






													__UpperCamelCase       =			{
													    '''block_out_channels''': [32, 64],
													    '''in_channels''': 3,
													    '''out_channels''': 3,
													    '''down_block_types''': ['''DownEncoderBlock2D''', '''DownEncoderBlock2D'''],
													    '''up_block_types''': ['''UpDecoderBlock2D''', '''UpDecoderBlock2D'''],
													    '''latent_channels''': 4,
													}
													__UpperCamelCase       =			self.dummy_input
													return init_dict, inputs_dict




