Views
No views yet
LiquidDiffusion_Training.ipynb in ColabPixel Image (3×256×256)
→ [Frozen SD-VAE Encode] → Latent (4×32×32)
→ [LiquidDiffusion U-Net] → Velocity prediction (4×32×32)
→ [Frozen SD-VAE Decode] → Generated Image (3×256×256)1# CfC Eq.10 adapted for images:
2gate = σ(time_a(t_emb) · f(features) - time_b(t_emb)) # liquid time-gating
3out = gate · g(features) + (1 - gate) · h(features) # CfC interpolation
4α = exp(-λ · |t_emb|) # liquid relaxation
5output = α · input + (1 - α) · out # time-aware residual| Dataset | Images | Description | Native Resolution |
|---|---|---|---|
huggan/AFHQv2 | 16K | Animal faces (cats, dogs, wildlife) | 512×512 |
nielsr/CelebA-faces | 202K | Celebrity faces | 178×218 |
huggan/flowers-102-categories | 8K | Flower photographs | Variable |
reach-vb/pokemon-blip-captions | 833 | Pokemon illustrations | 1280×1280 |
huggan/anime-faces | 63K | Anime faces | 64×64 |
Norod78/cartoon-blip-captions | ~3K | Cartoon characters | 512×512 |
| Config | Params | 256px VRAM (w/ VAE) | 512px VRAM |
|---|---|---|---|
| tiny | ~23M | ~6 GB | ~12 GB |
| small | ~69M | ~10 GB | ~20 GB |
| base | ~154M | ~16 GB | ~30 GB |
1x_t = (1 - t) · x0 + t · noise # linear interpolation
2v_target = noise - x0 # constant velocity
3loss = MSE(model(x_t, t), v_target) # that's it!| Paper | Contribution |
|---|---|
| CfC Networks (Nature MI 2022) | CfC Eq.10, parallelizable closed-form |
| LTC Networks (AAAI 2021) | Liquid time-constant ODE |
| LiquidTAD (2024) | Parallel liquid relaxation |
| USM (CVPR 2025) | U-Net + SSM for diffusion |
| DiffuSSM (2023) | SSM replaces attention in diffusion |
| Rectified Flow (ICLR 2023) | Simple velocity training |
├── liquid_diffusion/
│ ├── __init__.py
│ ├── model.py # Full model architecture
│ └── trainer.py # Trainer + dataset utilities
├── LiquidDiffusion_Training.ipynb # Complete Colab notebook
├── test_model.py
└── README.md