




'''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 						a_				(			UpperCAmelCase__     ,						unittest.TestCase						):
	lowercase_       :     Union[str, Any]			  =      FlaxAutoencoderKL




	@property
	def   lowercase__   (       self     :  Optional[Any]      ):
							__snake_case						 =   4
							__snake_case						 =   3
							__snake_case						 =   (3_2, 3_2)

							__snake_case						 =   jax.random.PRNGKey(0      )
							__snake_case						 =   jax.random.uniform(__lowerCAmelCase       ,		((batch_size, num_channels) + sizes)      )

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




	def   lowercase__   (       self     :  Union[str, Any]      ):
							__snake_case						 =   {
							    'block_out_channels': [3_2, 6_4],
							    'in_channels': 3,
							    'out_channels': 3,
							    'down_block_types': ['DownEncoderBlock2D', 'DownEncoderBlock2D'],
							    'up_block_types': ['UpDecoderBlock2D', 'UpDecoderBlock2D'],
							    'latent_channels': 4,
							}
							__snake_case						 =   self.dummy_input
							return init_dict, inputs_dict







'''simple docstring'''


def 						lowerCamelCase__   (				a							):
						if number < 0:
												raise ValueError('number must not be negative'							)
						return number & (number - 1) == 0


if __name__ == "__main__":
	import doctest

	doctest.testmod()

