terrain-diffusion / README.md
suvadityamuk's picture
suvadityamuk HF Staff
Upload folder using huggingface_hub
d7972fd verified
|
Raw
History Blame Contribute Delete
3.44 kB
---
title: Terrain Diffusion Infinite Panorama
emoji: πŸ”οΈ
colorFrom: blue
colorTo: red
sdk: gradio
app_file: app.py
pinned: false
short_description: Infinite-width panorama generation with SD1.5
preload_from_hub:
- stable-diffusion-v1-5/stable-diffusion-v1-5
---
# Terrain Diffusion β€” Infinite Panorama Demo
This Space demonstrates the **infinite-width panorama** generation technique
from the *Terrain Diffusion* paper
([arXiv:2512.08309](https://arxiv.org/abs/2512.08309),
[project page](https://xandergos.github.io/terrain-diffusion/)).
It wraps the paper repository's self-contained
`annotated_infinite_panorama.py` script: Stable Diffusion v1.5 denoising is
tiled across an unbounded 1D axis using the
[`infinite-tensor`](https://github.com/xandergos/infinite-tensor) library, so
any crop of the panorama is generated from a single globally-consistent noise
field rather than independently generated and stitched. This avoids the
seams/repetition typical of naive tile-and-blend outpainting.
**Scope note:** only the flat infinite-panorama demo is wrapped here. The
paper repository's hierarchical planetary-terrain diffusion pipeline and its
Flask serving API are out of scope for this Space.
## How it works
1. **Deterministic tiled noise.** A 1D-tiled Gaussian noise field is sampled
such that any overlapping window of the (conceptually infinite) latent
sees identical noise β€” the noise value at column `x` depends only on
`(seed, x // tile)`.
2. **Phased denoising.** The DDIM timestep schedule is split into phases at
thresholds `(400, 600, 750, 900)`. Each phase denoises overlapping latent
tiles (stride 32, tile size 64) independently, then `infinite-tensor`
blends overlapping outputs with a linear weight kernel before the next
phase reads them back.
3. **VAE decode.** The fully-denoised latent is VAE-decoded tile-by-tile
(pixel tile 512, stride 384) with the same overlap-blend trick.
4. **Crop.** The (infinite) decoded pixel tensor is sliced to the requested
crop width and returned as a single image.
## Using this Space
- **Prompt**: text description of the scene (applies uniformly along the
panorama).
- **Crop width**: final output width in pixels (512–2048; default 1536).
Larger widths require more overlapping tile evaluations and take longer.
- **Inference steps**: DDIM steps (default 40, paper default was 50).
- **Guidance scale**: classifier-free guidance weight (default 7.5).
- **Seed**: controls the underlying infinite noise field.
## Model
Uses `stable-diffusion-v1-5/stable-diffusion-v1-5` (fp16) as the base
checkpoint. Note: the original `runwayml/stable-diffusion-v1-5` repository
was removed from the Hugging Face Hub; this Space uses the community mirror
with identical weights, per current HF guidance.
## Citation
```bibtex
@inproceedings{goslin2026infinitediffusion,
author = {Goslin, Alexander},
title = {InfiniteDiffusion: Bridging Learned Fidelity and Procedural Utility for Open-World Terrain Generation},
booktitle = {Special Interest Group on Computer Graphics and Interactive Techniques Conference Conference Papers},
year = {2026},
pages = {10 pages},
publisher = {ACM},
address = {New York, NY, USA},
doi = {10.1145/3799902.3811080},
url = {https://doi.org/10.1145/3799902.3811080},
series = {SIGGRAPH Conference Papers '26}
}
```