

import os

from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE, hf_cache_home


snake_case_        =			HUGGINGFACE_HUB_CACHE


snake_case_        =			'''config.json'''
snake_case_        =			'''diffusion_pytorch_model.bin'''
snake_case_        =			'''diffusion_flax_model.msgpack'''
snake_case_        =			'''model.onnx'''
snake_case_        =			'''diffusion_pytorch_model.safetensors'''
snake_case_        =			'''weights.pb'''
snake_case_        =			'''https://huggingface.co'''
snake_case_        =			default_cache_path
snake_case_        =			'''diffusers_modules'''
snake_case_        =			os.getenv('''HF_MODULES_CACHE''', os.path.join(hf_cache_home, '''modules'''))
snake_case_        =			['''fp16''', '''non-ema''']
snake_case_        =			'''.self_attn'''




from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


snake_case_        =			{'''configuration_encoder_decoder''': ['''EncoderDecoderConfig''']}

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       snake_case_        =			['''EncoderDecoderModel''']

try:
       if not is_tf_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       snake_case_        =			['''TFEncoderDecoderModel''']

try:
       if not is_flax_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       snake_case_        =			['''FlaxEncoderDecoderModel''']

if TYPE_CHECKING:
       from .configuration_encoder_decoder import EncoderDecoderConfig

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_encoder_decoder import EncoderDecoderModel

       try:
              if not is_tf_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_tf_encoder_decoder import TFEncoderDecoderModel

       try:
              if not is_flax_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_flax_encoder_decoder import FlaxEncoderDecoderModel

else:
       import sys

       snake_case_        =			_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)

