Instructions to use OpenTO/LDM_L with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use OpenTO/LDM_L with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("OpenTO/LDM_L", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
| library_name: diffusers | |
| pipeline_tag: text-to-image | |
| license: apache-2.0 | |
| datasets: | |
| - OpenTO/OpenTO | |
| # Optimize Any Topology (OAT) | |
| This repository contains the official implementation of the **Optimize Any Topology (OAT)** model, a foundation model framework for shape- and resolution-free structural topology optimization. | |
| **Paper**: [Optimize Any Topology: A Foundation Model for Shape- and Resolution-Free Structural Topology Optimization](https://huggingface.co/papers/2510.23667) | |
| **Code**: https://github.com/ahnobari/OptimizeAnyTopology | |
| <p align="center"> | |
| <img src="https://github.com/user-attachments/assets/6200fa2c-0cd5-49af-897c-67688f28c446" alt="Optimize Any Topology Image"> | |
| </p> | |
| ## Model Details | |
| ### Model Description | |
| Structural topology optimization (TO) is central to engineering design but remains computationally intensive due to complex physics and hard constraints. We introduce Optimize Any Topology (OAT), a foundation-model framework that directly predicts minimum-compliance layouts for arbitrary aspect ratios, resolutions, volume fractions, loads, and fixtures. | |
| OAT combines a resolution- and shape-agnostic autoencoder with an implicit neural-field decoder and a conditional latent-diffusion model. It is trained on OpenTO, a new corpus of 2.2 million optimized structures covering 2 million unique boundary-condition configurations. OAT lowers mean compliance up to 90% relative to the best prior models and delivers sub-1 second inference on a single GPU across resolutions from 64x64 to 256x256 and aspect ratios as high as 10:1. These results establish OAT as a general, fast, and resolution-free framework for physics-aware topology optimization. | |
| **NEWS: Accepted to Neurips 2025!** | |
| - **Developed by:** The authors of the OAT paper. | |
| - **Model type:** Conditional Latent Diffusion Model for structural topology optimization. | |
| - **Language(s):** Not applicable (generates structural layouts). | |
| - **Finetuned from model [optional]:** The model is trained from scratch using a two-stage process (NFAE then LDM). | |
| ### Model Sources | |
| - **Repository:** https://github.com/ahnobari/OptimizeAnyTopology | |
| - **Paper:** [Optimize Any Topology: A Foundation Model for Shape- and Resolution-Free Structural Topology Optimization](https://huggingface.co/papers/2510.23667) | |
| ## Uses | |
| ### Direct Use | |
| OAT is intended for direct use in structural topology optimization. It can generate minimum-compliance layouts for a wide range of engineering design problems with arbitrary aspect ratios, resolutions, volume fractions, loads, and fixtures. Its fast inference capabilities make it suitable for rapid prototyping and design exploration. | |
| ### Out-of-Scope Use | |
| This model is specifically designed for structural topology optimization. Its use for general-purpose image generation, tasks unrelated to engineering design, or without understanding the physical constraints and domain limitations is considered out-of-scope. | |
| ## Bias, Risks, and Limitations | |
| The model's performance is tied to the distribution of the OpenTO training data. While comprehensive, potential biases or limitations may arise when applied to highly novel or out-of-distribution boundary conditions or material properties not well-represented in the dataset. Users should be aware that generated designs may require further validation (e.g., via Finite Element Analysis) to ensure real-world structural integrity and performance. | |
| ### Recommendations | |
| Users should refer to the paper and the GitHub repository for a complete understanding of the model's capabilities and limitations. Validation of generated designs against established engineering principles is recommended, especially for critical applications. | |
| ## How to Get Started with the Model | |
| For detailed instructions on installation, environment setup (including MKL optimized packages), training, and inference (sample generation and evaluation), please refer to the official [GitHub repository](https://github.com/ahnobari/OptimizeAnyTopology). The repository provides scripts and guidelines to replicate results and use the pre-trained checkpoints. | |
| ## Training Details | |
| The model is trained in two stages: | |
| 1. **Neural Field Auto-Encoder (NFAE)**: Maps variable resolution and shapes into a common latent space. | |
| 2. **Latent Diffusion Model (LDM)**: Trained to generate samples using a conditional diffusion process on the pre-computed latents from the NFAE. | |
| ### Training Data | |
| The model is trained on **OpenTO**, a new corpus of 2.2 million optimized structures covering 2 million unique boundary-condition configurations. The dataset is publicly available on Hugging Face 🤗 at [OpenTO/OpenTO](https://huggingface.co/datasets/OpenTO/OpenTO). | |
| ### Pre-Trained Checkpoints | |
| Pre-trained checkpoints for both the Auto Encoder (NFAE) and Latent Diffusion Model (LDM) are available on Hugging Face: | |
| * **Auto Encoder**: [OpenTO/NFAE](https://huggingface.co/OpenTO/NFAE) | |
| * **Latent Diffusion Model**: [OpenTO/LDM](https://huggingface.co/OpenTO/LDM) | |
| * **Auto Encoder Large Latent**: [OpenTO/NFAE_L](https://huggingface.co/OpenTO/NFAE_L) | |
| * **Latent Diffusion Large Latent**: [OpenTO/LDM_L](https://huggingface.co/OpenTO/LDM_L) | |
| These checkpoints can be loaded using the `.from_pretrained` function from the `OAT.Models` module. | |
| ## Evaluation | |
| OAT has been rigorously evaluated on four public benchmarks and two challenging unseen tests. The results demonstrate that OAT significantly lowers mean compliance (up to 90%) compared to previous state-of-the-art models. It also achieves impressive inference speeds, delivering sub-1 second results on a single GPU across various resolutions and aspect ratios. | |
| ## Citation | |
| If you find this work useful or inspiring for your research, please consider citing our paper: | |
| ```bibtex | |
| @misc{optimizeanytopology2025, | |
| title={Optimize Any Topology: A Foundation Model for Shape- and Resolution-Free Structural Topology Optimization}, | |
| author={Ahnobari, [Authors Not Provided In Prompt]}, | |
| year={2025}, | |
| eprint={2510.23667}, | |
| archivePrefix={arXiv}, | |
| primaryClass={cs.CV}, | |
| url={https://arxiv.org/abs/2510.23667}, | |
| } | |
| ``` |