



'''simple docstring'''




from collections.abc import Iterable
from typing import Generic, TypeVar

lowerCamelCase							:Dict				    =					TypeVar('''_T''')







class 	_lowerCAmelCase							(			Generic[_T] ):


	def __init__(self       ,      lowercase = None							):
				A_	:						list[_T]	=     list(iterable or []							)
				A_	:						list[_T]	=     []


	def __len__(self							):
				return len(self._stacka							) + len(self._stacka							)


	def __repr__(self							):
				return F'Queue({tuple(self._stacka[::-1] + self._stacka							)})'


	def     _a	(self       ,      lowercase							):
				self._stacka.append(lowercase							)


	def     _a	(self							):
				A_	:						Union[str, Any]	=     self._stacka.pop
				A_	:						int	=     self._stacka.append

				if not self._stacka:
							while self._stacka:
										stacka_append(stacka_pop()							)

				if not self._stacka:
							raise IndexError("""Queue is empty"""							)
				return self._stacka.pop()


if __name__ == "__main__":
						from doctest import testmod

						testmod()




'''simple docstring'''




import torch

from diffusers import StableDiffusionPipeline


lowerCamelCase							:Tuple				    =					'''path-to-your-trained-model'''
lowerCamelCase							:Optional[int]				    =					StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.floataa).to('''cuda''')

lowerCamelCase							:Optional[int]				    =					'''A photo of sks dog in a bucket'''
lowerCamelCase							:List[Any]				    =					pipe(prompt, num_inference_steps=5_0, guidance_scale=7.5).images[0]

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