


'''simple docstring'''






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


a_       :     int 							=     {
    "configuration_esm": ["ESM_PRETRAINED_CONFIG_ARCHIVE_MAP", "EsmConfig"],
    "tokenization_esm": ["EsmTokenizer"],
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 a_       :     int 							=     [
     "ESM_PRETRAINED_MODEL_ARCHIVE_LIST",
     "EsmForMaskedLM",
     "EsmForSequenceClassification",
     "EsmForTokenClassification",
     "EsmModel",
     "EsmPreTrainedModel",
 ]
 a_       :     List[Any] 							=     ["EsmForProteinFolding", "EsmFoldPreTrainedModel"]

try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 a_       :     Union[str, Any] 							=     [
     "TF_ESM_PRETRAINED_MODEL_ARCHIVE_LIST",
     "TFEsmForMaskedLM",
     "TFEsmForSequenceClassification",
     "TFEsmForTokenClassification",
     "TFEsmModel",
     "TFEsmPreTrainedModel",
 ]

if TYPE_CHECKING:
 from .configuration_esm import ESM_PRETRAINED_CONFIG_ARCHIVE_MAP, EsmConfig
 from .tokenization_esm import EsmTokenizer

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_esm import (
      ESM_PRETRAINED_MODEL_ARCHIVE_LIST,
      EsmForMaskedLM,
      EsmForSequenceClassification,
      EsmForTokenClassification,
      EsmModel,
      EsmPreTrainedModel,
  )
  from .modeling_esmfold import EsmFoldPreTrainedModel, EsmForProteinFolding

 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_esm import (
      TF_ESM_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFEsmForMaskedLM,
      TFEsmForSequenceClassification,
      TFEsmForTokenClassification,
      TFEsmModel,
      TFEsmPreTrainedModel,
  )


else:
 import sys

 a_       :     Union[str, Any] 							=     _LazyModule(__name__, globals()["__file__"], _import_structure)





'''simple docstring'''






from dataclasses import dataclass
from enum import Enum
from typing import List, Optional, Union

import numpy as np
import PIL
from PIL import Image

from ...utils import BaseOutput, is_torch_available, is_transformers_available




@dataclass
class 			a  (  _SCREAMING_SNAKE_CASE							):
 _lowerCAmelCase			       =						{
     """sld_warmup_steps""": 1_5,
     """sld_guidance_scale""": 2_0,
     """sld_threshold""": 0.0,
     """sld_momentum_scale""": 0.0,
     """sld_mom_beta""": 0.0,
 }
 _lowerCAmelCase			       =						{
     """sld_warmup_steps""": 1_0,
     """sld_guidance_scale""": 1_0_0_0,
     """sld_threshold""": 0.01,
     """sld_momentum_scale""": 0.3,
     """sld_mom_beta""": 0.4,
 }
 _lowerCAmelCase			       =						{
     """sld_warmup_steps""": 7,
     """sld_guidance_scale""": 2_0_0_0,
     """sld_threshold""": 0.025,
     """sld_momentum_scale""": 0.5,
     """sld_mom_beta""": 0.7,
 }
 _lowerCAmelCase			       =						{
     """sld_warmup_steps""": 0,
     """sld_guidance_scale""": 5_0_0_0,
     """sld_threshold""": 1.0,
     """sld_momentum_scale""": 0.5,
     """sld_mom_beta""": 0.7,
 }





@dataclass
class 			a  (  _SCREAMING_SNAKE_CASE							):
 _lowerCAmelCase			       =						42
 _lowerCAmelCase			       =						42
 _lowerCAmelCase			       =						42
 _lowerCAmelCase			       =						42


if is_transformers_available() and is_torch_available():
 from .pipeline_stable_diffusion_safe import StableDiffusionPipelineSafe
 from .safety_checker import SafeStableDiffusionSafetyChecker

