






'''simple docstring'''

from ..utils import is_flax_available, is_torch_available


if is_torch_available():
      from .autoencoder_kl import AutoencoderKL
      from .controlnet import ControlNetModel
      from .dual_transformer_ad import DualTransformeraDModel
      from .modeling_utils import ModelMixin
      from .prior_transformer import PriorTransformer
      from .ta_film_transformer import TaFilmDecoder
      from .transformer_ad import TransformeraDModel
      from .unet_ad import UNetaDModel
      from .unet_ad import UNetaDModel
      from .unet_ad_condition import UNetaDConditionModel
      from .unet_ad_condition import UNetaDConditionModel
      from .vq_model import VQModel

if is_flax_available():
      from .controlnet_flax import FlaxControlNetModel
      from .unet_ad_condition_flax import FlaxUNetaDConditionModel
      from .vae_flax import FlaxAutoencoderKL








'''simple docstring'''

import os
from distutils.util import strtobool






def 	_UpperCAmelCase    (  a		:	Any						,			a		:	int							)			->			Any:





						"""simple docstring"""
						for e in env_keys:
												lowercase_      :   Optional[Any]        =			int(os.environ.get(a						,			-1							)							)
												if val >= 0:
																		return val
						return default






def 	_UpperCAmelCase    (  a		:	List[Any]						,			a		:	Dict=False							)			->			Optional[Any]:





						"""simple docstring"""
						lowercase_      :   Optional[int]        =			os.environ.get(a						,			str(a							)							)
						return strtobool(a							) == 1  # As its name indicates `strtobool` actually returns an int...






def 	_UpperCAmelCase    (  a		:	List[Any]						,			a		:	Dict="no"							)			->			str:





						"""simple docstring"""
						lowercase_      :   List[Any]        =			os.environ.get(a						,			str(a							)							)
						return value
