





"""simple docstring"""






from typing import List

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


lowerCAmelCase_			=							logging.get_logger(__name__)

lowerCAmelCase_			=							{
    '''snap-research/efficientformer-l1-300''': (
        '''https://huggingface.co/snap-research/efficientformer-l1-300/resolve/main/config.json'''
    ),
}



class 	lowerCAmelCase					(      snake_case							):

       '''simple docstring'''





       lowerCAmelCase__						 =  """efficientformer"""






       def __init__(   self    ,  a__ = [3, 2, 6, 4]    ,  a__ = [48, 96, 2_24, 4_48]    ,  a__ = [True, True, True, True]    ,  a__ = 4_48    ,  a__ = 32    ,  a__ = 4    ,  a__ = 7    ,  a__ = 5    ,  a__ = 8    ,  a__ = 4    ,  a__ = 0.0    ,  a__ = 16    ,  a__ = 3    ,  a__ = 3    ,  a__ = 3    ,  a__ = 2    ,  a__ = 1    ,  a__ = 0.0    ,  a__ = 1    ,  a__ = True    ,  a__ = True    ,  a__ = 1E-5    ,  a__ = "gelu"    ,  a__ = 0.02    ,  a__ = 1E-12    ,  a__ = 2_24    ,  a__ = 1E-05    ,  **a__    ,  ):
              super().__init__(**a__     )

              _UpperCAmelCase     =     hidden_act
              _UpperCAmelCase     =     hidden_dropout_prob
              _UpperCAmelCase     =     hidden_sizes
              _UpperCAmelCase     =     num_hidden_layers
              _UpperCAmelCase     =     num_attention_heads
              _UpperCAmelCase     =     initializer_range
              _UpperCAmelCase     =     layer_norm_eps
              _UpperCAmelCase     =     patch_size
              _UpperCAmelCase     =     num_channels
              _UpperCAmelCase     =     depths
              _UpperCAmelCase     =     mlp_expansion_ratio
              _UpperCAmelCase     =     downsamples
              _UpperCAmelCase     =     dim
              _UpperCAmelCase     =     key_dim
              _UpperCAmelCase     =     attention_ratio
              _UpperCAmelCase     =     resolution
              _UpperCAmelCase     =     pool_size
              _UpperCAmelCase     =     downsample_patch_size
              _UpperCAmelCase     =     downsample_stride
              _UpperCAmelCase     =     downsample_pad
              _UpperCAmelCase     =     drop_path_rate
              _UpperCAmelCase     =     num_metaad_blocks
              _UpperCAmelCase     =     distillation
              _UpperCAmelCase     =     use_layer_scale
              _UpperCAmelCase     =     layer_scale_init_value
              _UpperCAmelCase     =     image_size
              _UpperCAmelCase     =     batch_norm_eps













"""simple docstring"""






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 	lowerCAmelCase					(      snake_case							):
       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






