






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

import numpy as np
import PIL

from ...utils import BaseOutput, OptionalDependencyNotAvailable, is_torch_available, is_transformers_available
from .timesteps import (
    fastaa_timesteps,
    smartaa_timesteps,
    smartaa_timesteps,
    smartaaa_timesteps,
    smartaaa_timesteps,
    superaa_timesteps,
    superaa_timesteps,
    superaaa_timesteps,
)
@dataclass
class 		SCREAMING_SNAKE_CASE__	(  UpperCAmelCase     ):

  '''simple docstring'''







  _lowerCamelCase    =  42
  _lowerCamelCase    =  42
  _lowerCamelCase    =  42


try:
  if not (is_transformers_available() and is_torch_available()):
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  from ...utils.dummy_torch_and_transformers_objects import *  # noqa F403
else:
  from .pipeline_if import IFPipeline
  from .pipeline_if_imgaimg import IFImgaImgPipeline
  from .pipeline_if_imgaimg_superresolution import IFImgaImgSuperResolutionPipeline
  from .pipeline_if_inpainting import IFInpaintingPipeline
  from .pipeline_if_inpainting_superresolution import IFInpaintingSuperResolutionPipeline
  from .pipeline_if_superresolution import IFSuperResolutionPipeline
  from .safety_checker import IFSafetyChecker
  from .watermark import IFWatermarker







import os
import sys

__a:     Union[str, Any]   					=					os.path.join(os.path.dirname(__file__), '''src''')
sys.path.append(SRC_DIR)


from transformers import (
    AutoConfig,
    AutoModel,
    AutoModelForCausalLM,
    AutoModelForMaskedLM,
    AutoModelForQuestionAnswering,
    AutoModelForSequenceClassification,
    AutoTokenizer,
    add_start_docstrings,
)


__a:     Union[str, Any]   					=					[
    '''torch''',
    '''numpy''',
    '''tokenizers''',
    '''filelock''',
    '''requests''',
    '''tqdm''',
    '''regex''',
    '''sentencepiece''',
    '''sacremoses''',
    '''importlib_metadata''',
    '''huggingface_hub''',
]




@add_start_docstrings(AutoConfig.__doc__ )
def       _SCREAMING_SNAKE_CASE (							*__snake_case   ,      **__snake_case )				->						Union[str, Any]:
       return AutoConfig.from_pretrained(*__snake_case   ,      **__snake_case )




@add_start_docstrings(AutoTokenizer.__doc__ )
def       _SCREAMING_SNAKE_CASE (							*__snake_case   ,      **__snake_case )				->						Any:
       return AutoTokenizer.from_pretrained(*__snake_case   ,      **__snake_case )




@add_start_docstrings(AutoModel.__doc__ )
def       _SCREAMING_SNAKE_CASE (							*__snake_case   ,      **__snake_case )				->						Tuple:
       return AutoModel.from_pretrained(*__snake_case   ,      **__snake_case )




@add_start_docstrings(AutoModelForCausalLM.__doc__ )
def       _SCREAMING_SNAKE_CASE (							*__snake_case   ,      **__snake_case )				->						Tuple:
       return AutoModelForCausalLM.from_pretrained(*__snake_case   ,      **__snake_case )




@add_start_docstrings(AutoModelForMaskedLM.__doc__ )
def       _SCREAMING_SNAKE_CASE (							*__snake_case   ,      **__snake_case )				->						Optional[Any]:
       return AutoModelForMaskedLM.from_pretrained(*__snake_case   ,      **__snake_case )




@add_start_docstrings(AutoModelForSequenceClassification.__doc__ )
def       _SCREAMING_SNAKE_CASE (							*__snake_case   ,      **__snake_case )				->						List[str]:
       return AutoModelForSequenceClassification.from_pretrained(*__snake_case   ,      **__snake_case )





@add_start_docstrings(AutoModelForQuestionAnswering.__doc__ )
def       _SCREAMING_SNAKE_CASE (							*__snake_case   ,      **__snake_case )				->						List[Any]:
       return AutoModelForQuestionAnswering.from_pretrained(*__snake_case   ,      **__snake_case )