




from functools import lru_cache



@lru_cache
def       UpperCAmelCase       (     _snake_case							):
							if num < 0:
														raise ValueError('''Number should not be negative.'''							)

							return 1 if num in (0, 1) else num * factorial(num - 1							)


if __name__ == "__main__":
		import doctest

		doctest.testmod()









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



