


"""simple docstring"""






from __future__ import annotations
def      lowerCamelCase       (     _UpperCamelCase		:      int       ,			_UpperCamelCase		:      int							)		->       list[str]:

							'''simple docstring'''



							if partitions <= 0:
														raise ValueError("""partitions must be a positive number!"""							)
							if partitions > number_of_bytes:
														raise ValueError("""partitions can not > number_of_bytes!"""							)
							__UpperCAmelCase   :						Optional[Any]      							=					number_of_bytes // partitions
							__UpperCAmelCase   :						Tuple      							=					[]
							for i in range(_UpperCamelCase							):
														__UpperCAmelCase   :						str      							=					i * bytes_per_partition + 1
														__UpperCAmelCase   :						Tuple      							=					(
														    number_of_bytes if i == partitions - 1 else (i + 1) * bytes_per_partition
														)
														allocation_list.append(f'''{start_bytes}-{end_bytes}'''							)
							return allocation_list


if __name__ == "__main__":
							import doctest

							doctest.testmod()




"""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
