TerraDiT-diffusers / README.md
BiliSakura's picture
Upload TerraDiT diffusers checkpoints (Alpha-XL, Omega-XL, Omega-B, Sigma-XL)
19b0ddb verified
|
Raw
History Blame Contribute Delete
7.47 kB
---
license: cc-by-nc-4.0
library_name: diffusers
pipeline_tag: text-to-image
tags:
- satellite-imagery
- remote-sensing
- diffusion-transformer
- controllable-generation
- geospatial
datasets:
- lcybuaa/Git-10M
- MVRL/TerraDiT-data
inference: true
language:
- en
widget:
- text: The satellite image shows a coastal town where a marina with many small boats meets the dark blue sea, with a sandy beach along the shore and low-rise buildings with red roofs behind it.
output:
url: TerraDiT-Alpha-XL/demo/demo.png
- text: The satellite image shows a suburban neighborhood with detached houses along curving residential streets, a school with a large sports field, and a small pond surrounded by trees in the lower right.
output:
url: TerraDiT-Sigma-XL/demo/demo.png
- text: The satellite image shows a small town where a river with dark water runs from the top left to the bottom right, crossed by a road bridge. A park with green lawns and trees lies north of the river, a large warehouse with a flat grey roof sits in the east, and residential houses with red roofs fill the south-west.
output:
url: TerraDiT-Omega-XL/demo/demo.png
- text: The satellite image shows a small town where a river with dark water runs from the top left to the bottom right, crossed by a road bridge. A park with green lawns and trees lies north of the river, a large warehouse with a flat grey roof sits in the east, and residential houses with red roofs fill the south-west.
output:
url: TerraDiT-Omega-B/demo/demo.png
---
# TerraDiT-diffusers
Self-contained [Diffusers](https://github.com/huggingface/diffusers) checkpoints for **TerraDiT-α**, **TerraDiT-Σ**, and **TerraDiT-Ω** (ECCV 2026): satellite image synthesis at 256×256 from text, geolocation, point prompts, and arbitrary geospatial primitives.
Converted from [`MVRL/TerraDiT`](https://huggingface.co/MVRL/TerraDiT) with [`scripts/convert_to_diffusers.py`](https://github.com/mvrl/TerraDiT). Each subfolder is a SiT-diffusers-style repo (`pipeline.py` + family transformer + optional `geolocation_encoder/`) and loads without installing the training code.
[Code](https://github.com/mvrl/TerraDiT) ·
[Collection](https://huggingface.co/collections/MVRL/terradit-6a9a248fef20075fe3b1967c) ·
[Data](https://huggingface.co/datasets/MVRL/TerraDiT-data) ·
[TerraDiT-Ω paper](https://arxiv.org/abs/2606.31029) ·
[TerraDiT paper](https://arxiv.org/abs/2603.02172)
| Subfolder | Model | Conditioning | Backbone | Params |
| --- | --- | --- | --- | ---: |
| `TerraDiT-Alpha-XL` | TerraDiT-α | text | SiT-XL/2 | 828M |
| `TerraDiT-Sigma-XL` | TerraDiT-Σ | text + geolocation + point prompts | SiT-XL/2 | 1.10B |
| `TerraDiT-Omega-XL` | TerraDiT-Ω | text + geolocation + polygons / polylines / boxes / points | SiT-XL/2 | 1.18B |
| `TerraDiT-Omega-B` | TerraDiT-Ω base | same as Ω | SiT-B/2 | 299M |
Shared components in every variant: SDXL VAE (`scaling_factor=0.13025`), LongCLIP text encoder (`zer0int/LongCLIP-KO-LITE-TypoAttack-Attn-ViT-L-14`, 144 tokens), `FlowMatchEulerDiscreteScheduler` (100 Euler steps, no CFG). Σ / Ω also ship RANGE+ under `geolocation_encoder/` (SatCLIP location encoder + `range_db.npz`).
## Demo
256×256, 100 Euler steps, `guidance_scale=0.0`, seed `42`. α is text-only; Σ adds St. Louis lat/lon plus point prompts; Ω / Ω-B add Paris lat/lon plus mixed geospatial primitives.
| α XL | Σ XL | Ω XL | Ω B |
| --- | --- | --- | --- |
| ![Alpha](TerraDiT-Alpha-XL/demo/demo.png) | ![Sigma](TerraDiT-Sigma-XL/demo/demo.png) | ![Omega XL](TerraDiT-Omega-XL/demo/demo.png) | ![Omega B](TerraDiT-Omega-B/demo/demo.png) |
## Load a local subfolder
```python
import torch
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained(
"./TerraDiT-Alpha-XL",
trust_remote_code=True,
).to("cuda")
image = pipe(
prompt="The satellite image shows a coastal town with a marina and red-roofed houses.",
height=256,
width=256,
num_inference_steps=100,
guidance_scale=0.0,
generator=torch.Generator(device="cuda").manual_seed(42),
).images[0]
image.save("terradit_alpha.png")
```
### TerraDiT-Σ — text + lat/lon + point prompts
```python
import torch
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained(
"./TerraDiT-Sigma-XL",
trust_remote_code=True,
).to("cuda")
image = pipe(
prompt="The satellite image shows a suburban neighborhood with a school and a pond.",
lat=38.65,
lon=-90.31,
points=[
[40, 40, "building house"],
[90, 170, "amenity school"],
[205, 215, "natural water"],
],
height=256,
width=256,
num_inference_steps=100,
generator=torch.Generator(device="cuda").manual_seed(42),
).images[0]
```
Coordinates are tile pixels in `[0, 256)`, x right and y down. Tags follow the OSM `"<key> <value>"` convention.
### TerraDiT-Ω — any geospatial primitive
```python
import torch
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained(
"./TerraDiT-Omega-XL", # or ./TerraDiT-Omega-B
trust_remote_code=True,
).to("cuda")
image = pipe(
prompt="A small town crossed by a river and a road bridge.",
lat=48.86,
lon=2.35,
instances=[
{"type": "polygon", "coords": [[20, 20], [110, 15], [120, 90], [30, 100]], "tag": "leisure park"},
{"type": "polyline", "coords": [[0, 30], [60, 110], [140, 170], [255, 235]], "tag": "waterway river"},
{"type": "bbox", "coords": [[20, 170], [70, 215]], "tag": "building house"},
{"type": "point", "coords": [200, 200], "tag": "amenity parking"},
],
condition_type="omega",
height=256,
width=256,
num_inference_steps=100,
generator=torch.Generator(device="cuda").manual_seed(42),
).images[0]
```
## Sources
| Component | Source |
| --- | --- |
| Transformers | [`MVRL/TerraDiT`](https://huggingface.co/MVRL/TerraDiT) (`alpha_xl`, `sigma_xl`, `omega_xl`, `omega_base`) |
| VAE | [`stabilityai/sdxl-vae`](https://huggingface.co/stabilityai/sdxl-vae) |
| Text encoder / tokenizer | [`zer0int/LongCLIP-KO-LITE-TypoAttack-Attn-ViT-L-14`](https://huggingface.co/zer0int/LongCLIP-KO-LITE-TypoAttack-Attn-ViT-L-14) |
| Location encoder | [`MVRL/satclip-loc-enc-vit16-l40`](https://huggingface.co/MVRL/satclip-loc-enc-vit16-l40) |
| RANGE+ database | [`mvrl/RANGE-database`](https://huggingface.co/datasets/mvrl/RANGE-database) (`range_db_large.npz`) |
## License
Weights: **CC-BY-NC-4.0** (non-commercial research), because the training imagery
([Git-10M](https://huggingface.co/datasets/lcybuaa/Git-10M)) is CC-BY-NC-ND-4.0.
Code: Apache 2.0. Conditioning data derives from OpenStreetMap (ODbL, © OpenStreetMap contributors).
SDXL VAE and LongCLIP are MIT.
```bibtex
@inproceedings{wei2026terraditomega,
title = {TerraDiT-{\Omega}: Unified Spatial Control for Satellite Image Synthesis with Any Geospatial Primitive},
author = {Wei, Brian and Sastry, Srikumar and Cher, Daniel and Xing, Eric and Jacobs, Nathan},
booktitle = {European Conference on Computer Vision},
year = {2026}
}
@article{sastry2026terradit,
title = {TerraDiT: Point-Conditioned Diffusion Transformer for Satellite Image Synthesis},
author = {Sastry, Srikumar and Cher, Daniel and Wei, Brian and Dhakal, Aayush and Khanal, Subash and Gupta, Dev and Jacobs, Nathan},
journal = {arXiv:2603.02172},
year = {2026}
}
```