A conditional text-to-image generative model based on Paella by Jimmy and Hlky. It incorporates cross attention in addition to using LayerNorm conditioning. It uses both the conditionings from CLIP and T5, similar to the dual conditioning from Kadinsky-2.0.
┌───────────────────────────────────────┐
│ │
│ ┌──────────┐ ┌─────────┐ │
│ │ ├──────────►│ │ │
│ │ │ │ Layer ├───┘
│ │ OpenCLIP │ │ Norm │
│ │ │ ┌─►│ │
│ │ ├─────┐ │ │ ├────────┐
│ └──────────┘ │ │ └─────────┘ │
│ │ │ │
│ ┌──────────┐ │ │ ┌─────────┐ │
│ │ ├─────┼──┘ │ │ │
│ │ │ │ │ Cross │ │
│ │ T5 │ └────►│ Attn │ │
│ │ │ │ │ │
│ │ ├──────────►│ │ │
│ └──────────┘ └─┬─────┬─┘ │
│ │ │ │
│ ┌────────┘ └──────┐ │
│ UNet Down │ UNet Up │ │
│ ┌────────────┐ │ ┌────────────┐ │ │
├─►│ ├──┼─────► │◄─┼───┤
│ └─────▲──────┘ │ └─────┬──────┘ │ │
│ │ │ │ │ │
│ ┌───┴────┐ │ ┌───▼────┐ │ │
├───►│ │ │ │ │◄───┼───┤
│ └───▲────┘ │ └───┬────┘ │ │
│ │ │ │ │ │
│ ┌─┴──┐ │ ┌─▼──┐◄─────┘ │
└─────►│ │◄─────┘ │ │ │
└─▲──┘ └─┬──┘◄─────────┘
│ │
┌────┴─────┐ ┌────▼─────┐
│ │ │ │
│Latent in │ │Latent Out│
│ │ │ │
│ │ │ │
│ │ │ │
└──────────┘ └──────────┘
Weights are forthcoming.
The main file for training will be paella.py. During training we use HF dataset.
python3 paella.py
The model code and weights are released under the MIT license.