Instructions to use YuhongLiu/SpatialASM-NVG with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use YuhongLiu/SpatialASM-NVG with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("YuhongLiu/SpatialASM-NVG", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Diffusion Single File
How to use YuhongLiu/SpatialASM-NVG with Diffusion Single File:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("YuhongLiu/SpatialASM-NVG", dtype=torch.bfloat16, device_map="cuda")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]SpatialASM: Internalizing Active Mentalization for Spatial Reasoning
📖Paper | 🏠Homepage | 🤗SpatialASM Collection | 🤗SpatialASM-128k Dataset | 🤗SpatialASM-NVG Model
📢 News
- 🚀 [2026/10/12] We have released the SpatialASM 📖Arxiv paper and its repository.
- 🚀 [2025/10/12] We have released our allocentric novel-view generator 🤗SpatialASM-NVG.
- 🚀 [2025/10/12] We have released 🤗SpatialASM-edit140k, an image-text-to-image dataset for tuning novel-view generators, and two spatial-VQA datasets with high-quality CoT responses: 🤗SpatialASM-128k and its subset 🤗SpatialASM-66k.
🌈 Overview
Humans rarely solve difficult spatial problems by passively inspecting the views in front of them. Instead, we revisit a scene from task-relevant viewpoints and mentally reconstruct what should be visible there. We call this capability Active Spatial Mentalization (ASM).
We are thrilled to introduce SpatialASM, a scalable framework that internalizes ASM into LVLMs. Through the two-stage training on LVLMs, SpatialASM elicits active spatial exploration and imagination and enhances the overall spatial reasoning performance.
SpatialASM consists of three complementary components:
- Allocentric Novel-View Generator. SpatialASM-NVG renders the scene from a target viewpoint specified by an anchor image, a pixel location, and a viewing direction. This allocentric formulation avoids lengthy sequences of camera-centric movements.
- ASM Trajectory Synthesis. Given a spatial QA sample, an LVLM plans informative viewpoints and the NVG renders the corresponding observations. After GeoP and answer-consistency filtering, rendered views are replaced by textual captions to form explicit plan-imagine-reason trajectories for SFT.
- View-Imagination Reinforcement Learning. Geometry-filtered candidate views are used to construct automatically verifiable perspective-taking tasks. GRPO further strengthens the association between a viewpoint description and its expected observation.
💡 Highlights
- 🔥 Active spatial reasoning: SpatialASM jointly internalizes task-conditioned view planning and viewpoint-conditioned view imagination, enabling LVLMs to spontaneously seek and mentally construct missing spatial evidence.
- 🔥 Scalable spatial CoT supervision: SpatialASM converts existing answer-only spatial QA data into explicit plan-imagine-reason trajectories and automatically verifiable perspective-taking tasks, alleviating the scarcity of spatial Chain-of-Thought supervision.
- 🔥 Training-time spatial simulation: A novel-view generator acts as temporary training scaffolding. The final model does not depend on a world model, renderer, or additional visual observations at inference time.
- 🔥 Grounded and reliable supervision: An allocentric viewpoint interface reaches a target perspective in one query, while the Geometry Perturbation (GeoP) metric and answer-consistency checks filter unreliable synthesized views and trajectories.
Cases
✒️Citation
If you find this project useful, please kindly cite:
@article{liu2026spatialasm,
title={SpatialASM: Internalizing Active Mentalization for Spatial Reasoning},
author={Yuhong Liu, Shenxi Wu, Junyi Chi, Beichen Zhang, Xuanlang Dai, Jiaqi Wang, Yuhang Zang, Dahua Lin},
journal={arXiv preprint arXiv:2610.13832},
year={2026}
}
📄 License
This model falls under the FLUX Non-Commercial License.
- Downloads last month
- 10
Model tree for YuhongLiu/SpatialASM-NVG
Base model
black-forest-labs/FLUX.2-klein-9B