e.save("cat-backpack.png")


How it works
	

Architecture overview from the Textual Inversion blog post.
Usually, text prompts are tokenized into an embedding before being passed to a model, which is often a transformer. Textual Inversion does something similar, but it learns a new token embedding, v*, from a special token S* in the diagram above. The model output is used to condition the diffusion model, which helps the diffusion model underst