๐ค CS180 HW5: T5 Text Encoder Embeddings Generator
This space uses the DeepFloyd IF T5 text encoder to generate embeddings from your text prompts.
How to use:
- Enter your prompts in the text box (one prompt per line)
- Click "Generate Embeddings"
- Download the generated
.pthfile containing the embeddings
About the embeddings:
- Each embedding has shape:
[1, 77, 4096] 77= max sequence length4096= embedding dimension of the T5 encoder- An empty prompt (
'') is automatically added for Classifier Free Guidance (CFG)
๐ Note:
- The first run may take a while as the model needs to download (~8GB)
- Subsequent runs will be faster
- The generated
.pthfile can be loaded in PyTorch using:torch.load('prompt_embeds_dict.pth')