





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






				"""simple docstring"""







				__a            =FlaxAutoencoderKL




				@property
				def   UpperCamelCase__   (  self     :					List[str]					):
								_a								= 4
								_a								= 3
								_a								= (32, 32)

								_a								= jax.random.PRNGKey(0					)
								_a								= jax.random.uniform(__a					,				((batch_size, num_channels) + sizes)					)

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




				def   UpperCamelCase__   (  self     :					str					):
								_a								= {
								    "block_out_channels": [32, 64],
								    "in_channels": 3,
								    "out_channels": 3,
								    "down_block_types": ["DownEncoderBlock2D", "DownEncoderBlock2D"],
								    "up_block_types": ["UpDecoderBlock2D", "UpDecoderBlock2D"],
								    "latent_channels": 4,
								}
								_a								= self.dummy_input
								return init_dict, inputs_dict







'''simple docstring'''







from ....utils import logging


lowerCAmelCase_					:    Union[str, Any]      	=			logging.get_logger(__name__)
class 				__SCREAMING_SNAKE_CASE  (lowerCamelCase_      ):






				"""simple docstring"""







				def __init__(  self     :					Tuple					,				__a     :					int					,				__a     :					Any=None					,				__a     :					Optional[int]=20_48					):
								_a								= config.__dict__
								_a								= modal_hidden_size
								if num_labels:
												_a								= num_labels
