'''simple docstring'''




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 	lowerCamelCase_	(snake_case__							, unittest.TestCase    ):
      '''simple docstring'''

      __UpperCamelCase:  List[str]						=						FlaxAutoencoderKL




      @property
      def      _A	(       self						:				Union[str, Any]       ):
             _UpperCAmelCase     :  Optional[int]							      =    4
             _UpperCAmelCase     :  str							      =    3
             _UpperCAmelCase     :  int							      =    (32, 32)

             _UpperCAmelCase     :  List[str]							      =    jax.random.PRNGKey(0       )
             _UpperCAmelCase     :  Optional[Any]							      =    jax.random.uniform(A						,					((batch_size, num_channels) + sizes)       )

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





      def      _A	(       self						:				Tuple       ):
             _UpperCAmelCase     :  Tuple							      =    {
                 "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     :  Union[str, Any]							      =    self.dummy_input
             return init_dict, inputs_dict







def 				lowerCAmelCase_	(     snake_case_     ):
      if number < 0:
            raise ValueError("""number must not be negative"""     )
      return number & (number - 1) == 0


if __name__ == "__main__":
  import doctest

  doctest.testmod()

