



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 (     lowerCamelCase__       ,						unittest.TestCase       ):
				__lowerCamelCase =				FlaxAutoencoderKL




				@property
				def 							snake_case   (							self		):



									"""simple docstring"""





									_lowerCAmelCase						=    4
									_lowerCAmelCase						=    3
									_lowerCAmelCase						=    (32, 32)

									_lowerCAmelCase						=    jax.random.PRNGKey(0		)
									_lowerCAmelCase						=    jax.random.uniform(_snake_case						,				((batch_size, num_channels) + sizes)		)

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




				def 							snake_case   (							self		):



									"""simple docstring"""





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








"""simple docstring"""






from ..utils import DummyObject, requires_backends



class 			A__   (  metaclass=__SCREAMING_SNAKE_CASE							):




	'''simple docstring'''





	SCREAMING_SNAKE_CASE          =	['torch', 'torchsde']

	def __init__(     self:		int       ,			*_SCREAMING_SNAKE_CASE:		Optional[Any]       ,			**_SCREAMING_SNAKE_CASE:		str)				->       Dict:

				"""simple docstring"""

				requires_backends(self       ,			["torch", "torchsde"])

	@classmethod
	def 							_SCREAMING_SNAKE_CASE   (     cls:		Optional[Any]       ,			*_SCREAMING_SNAKE_CASE:		Optional[int]       ,			**_SCREAMING_SNAKE_CASE:		Optional[int])				->       Optional[Any]:

				"""simple docstring"""

				requires_backends(cls       ,			["torch", "torchsde"])







	@classmethod
	def 							_SCREAMING_SNAKE_CASE   (     cls:		Dict       ,			*_SCREAMING_SNAKE_CASE:		List[Any]       ,			**_SCREAMING_SNAKE_CASE:		Any)				->       Optional[int]:

				"""simple docstring"""

				requires_backends(cls       ,			["torch", "torchsde"])