Instructions to use kaopanboonyuen/KAO-DIFFSAT-SD-BASE-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use kaopanboonyuen/KAO-DIFFSAT-SD-BASE-v1 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import AutoPipelineForInpainting from diffusers.utils import load_image # switch to "mps" for apple devices pipe = AutoPipelineForInpainting.from_pretrained("kaopanboonyuen/KAO-DIFFSAT-SD-BASE-v1", dtype=torch.float16, device_map="cuda") img_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png" mask_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png" image = load_image(img_url).resize((1024, 1024)) mask_image = load_image(mask_url).resize((1024, 1024)) prompt = "a tiger sitting on a park bench" generator = torch.Generator(device="cuda").manual_seed(0) image = pipe( prompt=prompt, image=image, mask_image=mask_image, guidance_scale=8.0, num_inference_steps=20, # steps between 15 and 30 work well for us strength=0.99, # make sure to use `strength` below 1.0 generator=generator, ).images[0] - Notebooks
- Google Colab
- Kaggle
- ๐ฐ๏ธ KAO-DIFFSAT-SD-BASE-v1
- ๐ฐ๏ธ Visual Overview
- ๐ Overview
- ๐ง Positioning
- ๐๏ธ Base Model
- ๐ Key Features
- ๐ฌ Results Overview
- ๐ฐ๏ธ Full Visual Examples
- โ ๏ธ What This Model Is (and Is Not)
- ๐ Usage (Diffusers)
- ๐ฐ๏ธ Prompt Guide (Satellite-Oriented Usage)
- ๐งช Use Cases
- โ ๏ธ Limitations
- ๐ฎ Roadmap
- ๐ Citation
- ๐ฌ Project Context
- ๐ Project Page
- ๐ค Acknowledgements
- ๐ Vision
- ๐ฐ๏ธ Visual Overview
๐ฐ๏ธ KAO-DIFFSAT-SD-BASE-v1
Clean Stable Diffusion Inpainting Backbone for Remote Sensing Research
๐ Project website: https://kaopanboonyuen.github.io/KAO/
๐ฐ๏ธ Visual Overview
Satellite-oriented inpainting baseline enabling structured reconstruction across diverse geospatial scenes.
๐ Overview
KAO-DIFFSAT-SD-BASE-v1 is a cleaned and structured Stable Diffusion inpainting backbone, prepared for remote sensing adaptation and research.
This repository is designed to serve as:
- ๐งฉ A baseline model for satellite image inpainting
- ๐ง A foundation for fine-tuning (KAO-DiffSat)
- ๐ฌ A reproducible starting point for geospatial generative AI
โ ๏ธ Important:
This repository does NOT introduce new training or optimization methods.
It is a clean, minimal, and research-ready version of the original inpainting model.
๐ง Positioning
| Component | Description |
|---|---|
| This Repo | Clean baseline diffusion backbone |
| KAO-DiffSat | Fine-tuned satellite adaptation (future) |
| KAO (Paper) | Optimization-based enhancement framework |
๐๏ธ Base Model
This model is derived from:
Original model developed by Stability AI and contributors.
๐น What we did
- Removed redundant files and duplicates
- Organized model structure for clarity
- Ensured compatibility with Diffusers
- Prepared for downstream fine-tuning
๐ No modification to core weights has been introduced in this release.
๐ Key Features
- ๐งผ Clean and minimal model structure
- โก Reduced storage footprint (no redundant weights)
- ๐ Fully compatible with Diffusers pipelines
- ๐ฐ๏ธ Ready for remote sensing fine-tuning
- ๐งฉ Modular design for research experiments
๐ฌ Results Overview
Qualitative reconstruction results using diffusion-based inpainting (baseline).
Demonstration of spatial consistency and texture recovery.
๐ฐ๏ธ Full Visual Examples
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Example outputs across multiple scene types.
โ ๏ธ What This Model Is (and Is Not)
โ This model:
- A clean baseline diffusion model
- A directly usable inpainting backbone
- A starting point for fine-tuning and research
โ This model is NOT:
- A fine-tuned satellite model
- The KAO method
- An optimized or domain-adapted system
๐ Those contributions will be introduced in future releases.
๐ Usage (Diffusers)
from diffusers import StableDiffusionInpaintPipeline
import torch
pipe = StableDiffusionInpaintPipeline.from_pretrained(
"kaopanboonyuen/KAO-DIFFSAT-SD-BASE-v1",
torch_dtype=torch.float16
).to("cuda")
prompt = "High-resolution satellite image with missing regions reconstructed realistically"
image = pipe(
prompt=prompt,
image=init_image,
mask_image=mask
).images[0]
๐ฐ๏ธ Prompt Guide (Satellite-Oriented Usage)
To simulate remote sensing behavior, use prompts emphasizing:
- spatial consistency
- structural realism
- geospatial coherence
๐น Example
High-resolution satellite image of urban area,
reconstruct missing regions with realistic buildings,
maintain spatial consistency and natural textures
๐งช Use Cases
- Cloud removal (baseline)
- Image completion
- Pre-training for remote sensing models
- Generative data augmentation
- Benchmark comparison
โ ๏ธ Limitations
- Prompt-dependent outputs
- Not trained on real satellite datasets
- No geospatial constraints
- High GPU memory usage
๐ฎ Roadmap
- ๐ KAO-DIFFSAT-INPAINTING-v1 (fine-tuned model)
- ๐ KAO-integrated optimization
- ๐ Prompt-free inference system
๐ Citation
๐น Base Model
@misc{stabilityai2022sd2,
title = {Stable Diffusion v2},
author = {{Stability AI}},
year = {2022},
howpublished = {\url{https://github.com/Stability-AI/stablediffusion}},
note = {Including inpainting variant}
}
๐ฌ Project Context
This repository is part of the broader KAO-DiffSat research direction, aiming to bridge:
Diffusion Models ร Remote Sensing ร Optimization
๐ Project Page
https://kaopanboonyuen.github.io/KAO/
๐ค Acknowledgements
- Stability AI for foundational diffusion models
- Hugging Face for open model hosting
- Open-source community for tools and infrastructure
๐ Vision
This work aims to advance:
Generative AI for Earth Observation
toward scalable and research-driven geospatial intelligence systems.
- Downloads last month
- 39





