.to("cuda")

>>> generator = torch.Generator(device="cuda").manual_seed(0)
>>> image = pipe.text_to_image("an astronaut riding on a horse on mars", generator=generator).images[0]
>>> image.save("./astronaut.png")

VersatileDiffusionTextToImagePipeline
	

class diffusers.VersatileDiffusionTextToImagePipeline

<
source
>
(
tokenizer: CLIPTokenizer
text_encoder: CLIPTextModelWithProjection
image_unet: UNet2DConditionModel
text_unet: UNetFlatCondit