"""simple docstring"""






from __future__ import annotations




def 						SCREAMING_SNAKE_CASE					(  __UpperCAmelCase  ,					__UpperCAmelCase       )							->   list[str]:
				if partitions <= 0:
								raise ValueError("partitions must be a positive number!"       )
				if partitions > number_of_bytes:
								raise ValueError("partitions can not > number_of_bytes!"       )
				SCREAMING_SNAKE_CASE__		  =				number_of_bytes // partitions
				SCREAMING_SNAKE_CASE__		  =				[]
				for i in range(__UpperCAmelCase       ):
								SCREAMING_SNAKE_CASE__		  =				i * bytes_per_partition + 1
								SCREAMING_SNAKE_CASE__		  =				(
								    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"""






import os

from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE, hf_cache_home


_A   					=    HUGGINGFACE_HUB_CACHE


_A   					=    'config.json'
_A   					=    'diffusion_pytorch_model.bin'
_A   					=    'diffusion_flax_model.msgpack'
_A   					=    'model.onnx'
_A   					=    'diffusion_pytorch_model.safetensors'
_A   					=    'weights.pb'
_A   					=    'https://huggingface.co'
_A   					=    default_cache_path
_A   					=    'diffusers_modules'
_A   					=    os.getenv('HF_MODULES_CACHE', os.path.join(hf_cache_home, 'modules'))
_A   					=    ['fp16', 'non-ema']
_A   					=    '.self_attn'




