Instructions to use otrolie/PlanetDiffusion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use otrolie/PlanetDiffusion with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("otrolie/PlanetDiffusion", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
PlanetDiffusion
Pretrained weights for Authoring Terrestrial Planets with Diffusion Models (doi:10.1111/cgf.70390). Code: https://github.com/Oliver-Borg/PlanetDiffusion
Models
| Folder | Description |
|---|---|
PlanetDiffusion/final |
Tile diffusion model (TerrainDiffusionPipeline, UNet + DDIM scheduler + terrain encoder), planet size 5. |
Each folder mirrors the local layout models/<name>/final. Only inference files are included (no optimizer state).
Usage
The code downloads the weights automatically when models/PlanetDiffusion/final is missing:
from src.models.diffusion.inpaint_inference import load_pipeline
pipeline = load_pipeline("models/PlanetDiffusion/final")
To download manually:
huggingface-cli download otrolie/PlanetDiffusion --include "PlanetDiffusion/final/*" --local-dir models
The model is loaded through the custom TerrainDiffusionPipeline in the code repository and cannot be loaded with the stock diffusers.DiffusionPipeline.
License
MIT, as in the code repository.
- Downloads last month
- -