

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      lowerCamelCase_ (			_lowerCAmelCase):
 _lowerCAmelCase									=	{
     '''sld_warmup_steps''': 15,
     '''sld_guidance_scale''': 20,
     '''sld_threshold''': 0.0,
     '''sld_momentum_scale''': 0.0,
     '''sld_mom_beta''': 0.0,
 }
 _lowerCAmelCase									=	{
     '''sld_warmup_steps''': 10,
     '''sld_guidance_scale''': 10_00,
     '''sld_threshold''': 0.01,
     '''sld_momentum_scale''': 0.3,
     '''sld_mom_beta''': 0.4,
 }
 _lowerCAmelCase									=	{
     '''sld_warmup_steps''': 7,
     '''sld_guidance_scale''': 20_00,
     '''sld_threshold''': 0.0_25,
     '''sld_momentum_scale''': 0.5,
     '''sld_mom_beta''': 0.7,
 }
 _lowerCAmelCase									=	{
     '''sld_warmup_steps''': 0,
     '''sld_guidance_scale''': 50_00,
     '''sld_threshold''': 1.0,
     '''sld_momentum_scale''': 0.5,
     '''sld_mom_beta''': 0.7,
 }



@dataclass
class      lowerCamelCase_ (			_lowerCAmelCase):
 _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













# tests directory-specific settings - this file is run automatically
# by pytest before any tests are run

import sys
import warnings
from os.path import abspath, dirname, join


# allow having multiple repository checkouts and not needing to remember to rerun
# 'pip install -e .[dev]' when switching between checkouts and running tests.
__UpperCAmelCase      =				abspath(join(dirname(dirname(dirname(__file__))), "src"))
sys.path.insert(1, git_repo_path)


# silence FutureWarning warnings in tests since often we can't act on them until
# they become normal warnings - i.e. the tests still need to test the current functionality
warnings.simplefilter(action="ignore", category=FutureWarning)





def 						A_					(						lowercase_			)				->str:







 """simple docstring"""

 from transformers.testing_utils import pytest_addoption_shared

 pytest_addoption_shared(lowercase_			)





def 						A_					(						lowercase_			)				->Tuple:







 """simple docstring"""

 from transformers.testing_utils import pytest_terminal_summary_main

 SCREAMING_SNAKE_CASE				    =		terminalreporter.config.getoption('--make-reports'			)
 if make_reports:
  pytest_terminal_summary_main(lowercase_	,  id=lowercase_			)




