ned("runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16)
>>> pipe = pipe.to("cuda")

>>> prompt = "a photo of an astronaut riding a horse on mars"
>>> image = pipe(prompt).images[0]

enable_attention_slicing

<
source
>
(
slice_size: typing.Union[str, int, NoneType] = 'auto'

)


Parameters 

slice_size (str or int, optional, defaults to "auto") —
When "auto", halves the input to the attention heads, so attention will be computed in two