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
|
Download README.md from otrolie/PlanetDiffusion: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/otrolie/PlanetDiffusion/resolve/main/README.md
- Command line
-
hf download hf://otrolie/PlanetDiffusion/README.md
-
curl -L -o README.md https://huggingface.co/otrolie/PlanetDiffusion/resolve/main/README.md
1.24 kB
| license: mit | |
| library_name: diffusers | |
| pipeline_tag: image-to-image | |
| tags: | |
| - terrain | |
| - planet | |
| - diffusion | |
| - procedural-generation | |
| # PlanetDiffusion | |
| Pretrained weights for *Authoring Terrestrial Planets with Diffusion Models* | |
| ([doi:10.1111/cgf.70390](http://doi.org/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: | |
| ```python | |
| from src.models.diffusion.inpaint_inference import load_pipeline | |
| pipeline = load_pipeline("models/PlanetDiffusion/final") | |
| ``` | |
| To download manually: | |
| ```sh | |
| 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. | |