import torch

from diffusers import StableDiffusionPipeline


SCREAMING_SNAKE_CASE		:     str         =	"path-to-your-trained-model"
SCREAMING_SNAKE_CASE		:     Any         =	StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.floataa).to("cuda")

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

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







from __future__ import annotations






def     lowerCAmelCase_			(   _SCREAMING_SNAKE_CASE     :				float		, _SCREAMING_SNAKE_CASE     :				float		, _SCREAMING_SNAKE_CASE     :				float		, ):
						if (electron_conc, hole_conc, intrinsic_conc).count(0			) != 1:
												raise ValueError("""You cannot supply more or less than 2 values"""			)
						elif electron_conc < 0:
												raise ValueError("""Electron concentration cannot be negative in a semiconductor"""			)
						elif hole_conc < 0:
												raise ValueError("""Hole concentration cannot be negative in a semiconductor"""			)
						elif intrinsic_conc < 0:
												raise ValueError(
												    """Intrinsic concentration cannot be negative in a semiconductor"""			)
						elif electron_conc == 0:
												return (
												    "electron_conc",
												    intrinsic_conc**2 / hole_conc,
												)
						elif hole_conc == 0:
												return (
												    "hole_conc",
												    intrinsic_conc**2 / electron_conc,
												)
						elif intrinsic_conc == 0:
												return (
												    "intrinsic_conc",
												    (electron_conc * hole_conc) ** 0.5,
												)
						else:
												return (-1, -1)


if __name__ == "__main__":
	import doctest

	doctest.testmod()






