--- base_model: black-forest-labs/FLUX.2-klein-base-9B language: - en license: other license_name: cc-by-nc-4.0-and-flux-non-commercial-2.1 license_link: LICENSE tags: - computer-vision - surface-normal-estimation - monocular-geometry-estimation - transparent-objects - rectified-flow - flux - lora - safetensors base_model_relation: adapter inference: false pipeline_tag: image-to-image --- # TransNormal-2 Official model weights for **TransNormal-2: Geometry-Grounded Rectified Flow with Edge-Aware Decoding for Precise Normal Estimation**. **[GitHub](https://github.com/longxiang-ai/TransNormal-2) · [Hugging Face](https://huggingface.co/Longxiang-ai/TransNormal-2) · [Project Page](https://longxiang-ai.github.io/TransNormal-2/) · [arXiv](https://arxiv.org/abs/2609.06665)** TransNormal-2 estimates surface normals from one RGB image using a single-step, FLUX.2-based rectified-flow predictor and geometry-aware refinement. ## Weights | File | Component | |:--|:--| | `lora_core_predictor.safetensors` | Core predictor LoRA (rank 256, alpha 256) | | `lcm_normal.safetensors` | Local Continuity Module (LCM) | | `grm.safetensors` | Geometric Refinement Module (GRM) | | `config.json` | Architecture and loading configuration | The three weight files use BF16 Safetensors and total **1.402 GB**. They contain model tensors only. The base model is distributed separately at [black-forest-labs/FLUX.2-klein-base-9B](https://huggingface.co/black-forest-labs/FLUX.2-klein-base-9B); follow its access instructions and license terms. ## Download and use Install the download utility: ```bash pip install -U huggingface_hub ``` Download the weights and configuration without authentication: ```python from huggingface_hub import snapshot_download weights_dir = snapshot_download( repo_id="Longxiang-ai/TransNormal-2", local_dir="TransNormal-2-weights", allow_patterns=["*.safetensors", "config.json", "README.md", "LICENSE", "NOTICE", "licenses/*"], token=False, ) print(weights_dir) ``` ## Inference Inference code and complete instructions are available on **[GitHub](https://github.com/longxiang-ai/TransNormal-2#inference)**. ```bash git clone https://github.com/longxiang-ai/TransNormal-2.git cd TransNormal-2 python -m venv .venv source .venv/bin/activate python -m pip install -r requirements.txt python inference.py --input path/to/transparent_image.jpg --domain transparent --output_dir outputs/glass --save_npy ``` Replace `path/to/transparent_image.jpg` with your own image. Use Python 3.10 and a CUDA GPU with BF16 support. Follow the base model's access instructions before its first download; run `hf auth login` if authentication is required. The task weights in this repository download without authentication. For ordinary scenes, use the default `--domain opaque`. The same `--input` option also accepts a folder of images. See GitHub for CPU offload and the Python API. This repository contains the weights and configuration. The custom TransNormal-2 pipeline is provided in the GitHub repository; a generic Diffusers image-generation pipeline does not implement surface normal estimation. ## License The authors' model contributions are licensed under **CC BY-NC 4.0**, subject to the underlying rights described in [LICENSE](https://huggingface.co/Longxiang-ai/TransNormal-2/blob/main/LICENSE). As a modified derivative of FLUX.2 [klein] base 9B, this model is also subject to the **[FLUX Non-Commercial License v2.1](licenses/FLUX-NON-COMMERCIAL.md)**, including its non-commercial and non-production restrictions. See [NOTICE](https://huggingface.co/Longxiang-ai/TransNormal-2/blob/main/NOTICE) for the required attribution. The base model is not redistributed here. ## Citation ```bibtex @misc{li2026transnormal2, title = {TransNormal-2: Geometry-Grounded Rectified Flow with Edge-Aware Decoding for Precise Normal Estimation}, author = {Mingwei Li and Yi Yang and Hehe Fan}, year = {2026}, eprint = {2609.06665}, archivePrefix = {arXiv}, primaryClass = {cs.CV}, url = {https://arxiv.org/abs/2609.06665} } ``` Questions: [@longxiang-ai](https://github.com/longxiang-ai) or [GitHub Issues](https://github.com/longxiang-ai/TransNormal-2/issues).