'''simple docstring'''






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


_UpperCAmelCase    :     List[str]         =       logging.get_logger(__name__)

_UpperCAmelCase    :     List[Any]         =       {
    '''alibaba-damo/mgp-str-base''': '''https://huggingface.co/alibaba-damo/mgp-str-base/resolve/main/config.json''',
}







class lowercase_       (		_UpperCamelCase			):







   """simple docstring"""

   __lowerCAmelCase         =   "mgp-str"
   def __init__(      self      :			Union[str, Any], UpperCamelCase__      :			Tuple=[32, 1_28], UpperCamelCase__      :			Dict=4, UpperCamelCase__      :			List[Any]=3, UpperCamelCase__      :			Dict=27, UpperCamelCase__      :			Any=38, UpperCamelCase__      :			int=5_02_57, UpperCamelCase__      :			Any=3_05_22, UpperCamelCase__      :			List[Any]=7_68, UpperCamelCase__      :			Any=12, UpperCamelCase__      :			Optional[int]=12, UpperCamelCase__      :			Tuple=4.0, UpperCamelCase__      :			List[str]=True, UpperCamelCase__      :			Tuple=False, UpperCamelCase__      :			Optional[int]=1e-5, UpperCamelCase__      :			Any=0.0, UpperCamelCase__      :			Any=0.0, UpperCamelCase__      :			List[Any]=0.0, UpperCamelCase__      :			Any=False, UpperCamelCase__      :			List[Any]=0.02, **UpperCamelCase__      :			Any, )  ->			int:
        super().__init__(**UpperCamelCase__     )

        _A    		=  image_size
        _A    		=  patch_size
        _A    		=  num_channels
        _A    		=  max_token_length
        _A    		=  num_character_labels
        _A    		=  num_bpe_labels
        _A    		=  num_wordpiece_labels
        _A    		=  hidden_size
        _A    		=  num_hidden_layers
        _A    		=  num_attention_heads
        _A    		=  mlp_ratio
        _A    		=  distilled
        _A    		=  layer_norm_eps
        _A    		=  drop_rate
        _A    		=  qkv_bias
        _A    		=  attn_drop_rate
        _A    		=  drop_path_rate
        _A    		=  output_aa_attentions
        _A    		=  initializer_range




'''simple docstring'''






import platform
from argparse import ArgumentParser

import huggingface_hub

from .. import __version__ as version
from ..utils import is_accelerate_available, is_torch_available, is_transformers_available, is_xformers_available
from . import BaseDiffusersCLICommand





def  _SCREAMING_SNAKE_CASE		(      __snake_case							:			Union[str, Any]				):
     return EnvironmentCommand()







class lowercase_       (		_UpperCamelCase			):







   """simple docstring"""

   @staticmethod
   def 	__UpperCAmelCase   (      UpperCamelCase__      :			ArgumentParser     )  ->			List[str]:
        _A    		=  parser.add_parser('env'     )
        download_parser.set_defaults(func=UpperCamelCase__     )
   def 	__UpperCAmelCase   (      self      :			Optional[int]     )  ->			Optional[Any]:
        _A    		=  huggingface_hub.__version__

        _A    		=  'not installed'
        _A    		=  'NA'
        if is_torch_available():
             import torch

             _A    		=  torch.__version__
             _A    		=  torch.cuda.is_available()

        _A    		=  'not installed'
        if is_transformers_available():
             import transformers

             _A    		=  transformers.__version__

        _A    		=  'not installed'
        if is_accelerate_available():
             import accelerate

             _A    		=  accelerate.__version__

        _A    		=  'not installed'
        if is_xformers_available():
             import xformers

             _A    		=  xformers.__version__

        _A    		=  {
            '`diffusers` version': version,
            'Platform': platform.platform(),
            'Python version': platform.python_version(),
            'PyTorch version (GPU?)': f'{pt_version} ({pt_cuda_available})',
            'Huggingface_hub version': hub_version,
            'Transformers version': transformers_version,
            'Accelerate version': accelerate_version,
            'xFormers version': xformers_version,
            'Using GPU in script?': '<fill in>',
            'Using distributed or parallel set-up in script?': '<fill in>',
        }

        print('\nCopy-and-paste the text below in your GitHub issue and FILL OUT the two last points.\n'     )
        print(self.format_dict(UpperCamelCase__     )     )

        return info

   @staticmethod
   def 	__UpperCAmelCase   (      UpperCamelCase__      :			List[Any]     )  ->			Dict:
        return "\n".join([f'- {prop}: {val}' for prop, val in d.items()]     ) + "\n"



