






'''simple docstring'''

def 							snake_case					(     a_							: int	)       ->				int:





      """simple docstring"""

      UpperCamelCase_				:   int					    =							abs(a_	)
      UpperCamelCase_				:   Tuple					    =							0
      while n > 0:
            res += n % 10
            n //= 10
      return res



def 							snake_case					(     a_							: int	)       ->				int:





      """simple docstring"""

      UpperCamelCase_				:   Optional[int]					    =							abs(a_	)
      return n if n < 10 else n % 10 + sum_of_digits(n // 10	)



def 							snake_case					(     a_							: int	)       ->				int:





      """simple docstring"""

      return sum(int(a_	) for c in str(abs(a_	)	)	)



def 							snake_case					(     )       ->				None:





      """simple docstring"""

      from collections.abc import Callable
      from timeit import timeit

      def benchmark_a_function(a_							: Callable    ,   a_							: int	) -> None:
            UpperCamelCase_				:   Any					    =							f"{func.__name__}({value})"
            UpperCamelCase_				:   str					    =							timeit(f"__main__.{call}"    ,   setup="""import __main__"""	)
            print(f"{call:56} = {func(a_	)} -- {timing:.4f} seconds"	)

      for value in (262_144, 1_125_899_906_842_624, 1_267_650_600_228_229_401_496_703_205_376):
            for func in (sum_of_digits, sum_of_digits_recursion, sum_of_digits_compact):
                  benchmark_a_function(a_    ,   a_	)
            print()


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      benchmark()














'''simple docstring'''

import torch

from diffusers import StableDiffusionPipeline


UpperCamelCase							="path-to-your-trained-model"
UpperCamelCase							=StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.floataa).to("cuda")

UpperCamelCase							="A photo of sks dog in a bucket"
UpperCamelCase							=pipe(prompt, num_inference_steps=50, guidance_scale=7.5).images[0]

image.save("dog-bucket.png")






