.py
Text-to-Image Generation
-
https://huggingface.co/spaces/AttendAndExcite/Attend-and-Excite

Usage example
	


	Copied
import torch
from diffusers import StableDiffusionAttendAndExcitePipeline

model_id = "CompVis/stable-diffusion-v1-4"
pipe = StableDiffusionAttendAndExcitePipeline.from_pretrained(model_id, torch_dtype=torch.float16).to("cuda")
pipe = pipe.to("cuda")

prompt = "a cat and a frog"

# use get_indices function to find out indice