

from ...configuration_utils import PretrainedConfig
from ...utils import logging


A_						:     Tuple			  =				logging.get_logger(__name__)

A_						:     List[Any]			  =				{
    'google/reformer-crime-and-punishment': (
        'https://huggingface.co/google/reformer-crime-and-punishment/resolve/main/config.json'
    ),
    'google/reformer-enwik8': 'https://huggingface.co/google/reformer-enwik8/resolve/main/config.json',
}
class    A_				( _a  ):


    '''simple docstring'''






    a__       							=    "reformer"
    a__       							=    ["past_buckets_states"]
    a__       							=    {}


    def __init__(self       , lowercase__=64       , lowercase__=["local", "lsh", "local", "lsh", "local", "lsh"]       , lowercase__=1.0       , lowercase__=True       , lowercase__=[64, 64]       , lowercase__=[64, 192]       , lowercase__=0       , lowercase__=2       , lowercase__=512       , lowercase__=None       , lowercase__="relu"       , lowercase__=0.05       , lowercase__=256       , lowercase__=0.02       , lowercase__=False       , lowercase__=1E-12       , lowercase__=1       , lowercase__=0       , lowercase__=0.05       , lowercase__=64       , lowercase__=64       , lowercase__=0.0       , lowercase__=1       , lowercase__=0       , lowercase__=4_096       , lowercase__=12       , lowercase__=None       , lowercase__=1       , lowercase__=0       , lowercase__=320       , lowercase__=False       , lowercase__=True       , lowercase__=None       , **lowercase__       , )       -> Optional[Any]:
        __UpperCAmelCase			   =     hash_seed
        __UpperCAmelCase			   =     vocab_size
        __UpperCAmelCase			   =     attention_head_size
        __UpperCAmelCase			   =     hidden_size
        __UpperCAmelCase			   =     num_attention_heads
        __UpperCAmelCase			   =     num_hashes
        __UpperCAmelCase			   =     len(lowercase__					)
        __UpperCAmelCase			   =     tuple(lowercase__					) if isinstance(lowercase__       , lowercase__					) else num_buckets
        __UpperCAmelCase			   =     lsh_attn_chunk_length
        __UpperCAmelCase			   =     local_attn_chunk_length
        __UpperCAmelCase			   =     lsh_num_chunks_after
        __UpperCAmelCase			   =     lsh_num_chunks_before
        __UpperCAmelCase			   =     local_num_chunks_after
        __UpperCAmelCase			   =     local_num_chunks_before
        __UpperCAmelCase			   =     hidden_act
        __UpperCAmelCase			   =     feed_forward_size
        __UpperCAmelCase			   =     hidden_dropout_prob
        __UpperCAmelCase			   =     lsh_attention_probs_dropout_prob
        __UpperCAmelCase			   =     local_attention_probs_dropout_prob
        __UpperCAmelCase			   =     max_position_embeddings
        __UpperCAmelCase			   =     initializer_range
        __UpperCAmelCase			   =     layer_norm_eps
        __UpperCAmelCase			   =     axial_pos_embds
        __UpperCAmelCase			   =     tuple(lowercase__					)
        __UpperCAmelCase			   =     tuple(lowercase__					)
        __UpperCAmelCase			   =     axial_norm_std
        __UpperCAmelCase			   =     chunk_size_lm_head
        __UpperCAmelCase			   =     attn_layers
        __UpperCAmelCase			   =     use_cache
        __UpperCAmelCase			   =     classifier_dropout
        super().__init__(
            pad_token_id=lowercase__       , eos_token_id=lowercase__       , is_decoder=lowercase__       , tie_word_embeddings=lowercase__       , **lowercase__       , )







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_				( _a  ):


    '''simple docstring'''






    a__       							=    {
        "sld_warmup_steps": 15,
        "sld_guidance_scale": 20,
        "sld_threshold": 0.0,
        "sld_momentum_scale": 0.0,
        "sld_mom_beta": 0.0,
    }
    a__       							=    {
        "sld_warmup_steps": 10,
        "sld_guidance_scale": 10_00,
        "sld_threshold": 0.01,
        "sld_momentum_scale": 0.3,
        "sld_mom_beta": 0.4,
    }
    a__       							=    {
        "sld_warmup_steps": 7,
        "sld_guidance_scale": 20_00,
        "sld_threshold": 0.0_25,
        "sld_momentum_scale": 0.5,
        "sld_mom_beta": 0.7,
    }
    a__       							=    {
        "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    A_				( _a  ):


    '''simple docstring'''






    a__       							=    42
    a__       							=    42
    a__       							=    42
    a__       							=    42


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




