


"""simple docstring"""






from argparse import ArgumentParser

from .env import EnvironmentCommand
def      lowerCamelCase       (     )		->       str:

							'''simple docstring'''



							__UpperCAmelCase   :						List[str]      							=					ArgumentParser("""Diffusers CLI tool"""       ,			usage="""diffusers-cli <command> [<args>]"""							)
							__UpperCAmelCase   :						int      							=					parser.add_subparsers(help="""diffusers-cli command helpers"""							)

							# Register commands
							EnvironmentCommand.register_subcommand(_UpperCamelCase							)

							# Let's go
							__UpperCAmelCase   :						str      							=					parser.parse_args()

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

							# Run
							__UpperCAmelCase   :						str      							=					args.func(_UpperCamelCase							)
							service.run()


if __name__ == "__main__":
							main()




"""simple docstring"""






from ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
							if not (is_transformers_available() and is_torch_available()):
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							from ...utils.dummy_torch_and_transformers_objects import (
							    ImageTextPipelineOutput,
							    UniDiffuserPipeline,
							)
else:
							from .modeling_text_decoder import UniDiffuserTextDecoder
							from .modeling_uvit import UniDiffuserModel, UTransformeraDModel
							from .pipeline_unidiffuser import ImageTextPipelineOutput, UniDiffuserPipeline
