from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


_SCREAMING_SNAKE_CASE 		=      {
    """configuration_chinese_clip""": [
        """CHINESE_CLIP_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """ChineseCLIPConfig""",
        """ChineseCLIPOnnxConfig""",
        """ChineseCLIPTextConfig""",
        """ChineseCLIPVisionConfig""",
    ],
    """processing_chinese_clip""": ["""ChineseCLIPProcessor"""],
}

try:
     if not is_vision_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     _SCREAMING_SNAKE_CASE 		=      ["""ChineseCLIPFeatureExtractor"""]
     _SCREAMING_SNAKE_CASE 		=      ["""ChineseCLIPImageProcessor"""]

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     _SCREAMING_SNAKE_CASE 		=      [
         """CHINESE_CLIP_PRETRAINED_MODEL_ARCHIVE_LIST""",
         """ChineseCLIPModel""",
         """ChineseCLIPPreTrainedModel""",
         """ChineseCLIPTextModel""",
         """ChineseCLIPVisionModel""",
     ]

if TYPE_CHECKING:
     from .configuration_chinese_clip import (
         CHINESE_CLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
         ChineseCLIPConfig,
         ChineseCLIPOnnxConfig,
         ChineseCLIPTextConfig,
         ChineseCLIPVisionConfig,
     )
     from .processing_chinese_clip import ChineseCLIPProcessor

     try:
          if not is_vision_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .feature_extraction_chinese_clip import ChineseCLIPFeatureExtractor, ChineseCLIPImageProcessor

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_chinese_clip import (
              CHINESE_CLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
              ChineseCLIPModel,
              ChineseCLIPPreTrainedModel,
              ChineseCLIPTextModel,
              ChineseCLIPVisionModel,
          )

else:
     import sys

     _SCREAMING_SNAKE_CASE 		=      _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_		(      __lowerCAmelCase  ,     unittest.TestCase		):
   __lowerCAmelCase           =				FlaxAutoencoderKL







   @property
   def 						lowerCamelCase_	(     self						:						Tuple				):





    """simple docstring"""


    UpperCamelCase			  =      4
    UpperCamelCase			  =      3
    UpperCamelCase			  =      (32, 32)

    UpperCamelCase			  =      jax.random.PRNGKey(0				)
    UpperCamelCase			  =      jax.random.uniform(lowerCamelCase_   ,   ((batch_size, num_channels) + sizes)				)

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







   def 						lowerCamelCase_	(     self						:						str				):





    """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
