


"""simple docstring"""
from argparse import ArgumentParser

from .env import EnvironmentCommand

def 				_snake_case      (   ):




   """simple docstring"""







   _lowerCamelCase	:					Optional[Any]   =		ArgumentParser("""Diffusers CLI tool"""						, usage="""diffusers-cli <command> [<args>]"""   )
   _lowerCamelCase	:					Dict   =		parser.add_subparsers(help="""diffusers-cli command helpers"""   )

   # Register commands
   EnvironmentCommand.register_subcommand(__snake_case   )

   # Let's go
   _lowerCamelCase	:					Any   =		parser.parse_args()

   if not hasattr(__snake_case						, """func"""   ):
      parser.print_help()
      exit(1   )

   # Run
   _lowerCamelCase	:					List[str]   =		args.func(__snake_case   )
   service.run()


if __name__ == "__main__":
 main()



"""simple docstring"""


from torch import nn






def    _snake_case					(		snake_case__ :  Union[str, Any]  ):
	if act_fn in ["swish", "silu"]:
		return nn.SiLU()
	elif act_fn == "mish":
		return nn.Mish()
	elif act_fn == "gelu":
		return nn.GELU()
	else:
		raise ValueError(F'Unsupported activation function: {act_fn}'  )