Image-to-3D

Update model card: description, intended use, limitations

#10
Files changed (1) hide show
  1. README.md +88 -218
README.md CHANGED
@@ -3,9 +3,14 @@ license: mit
3
  license_link: LICENSE
4
  extra_gated_eu_disallowed: true
5
  pipeline_tag: image-to-3d
 
 
 
 
 
 
6
  ---
7
 
8
-
9
  <div align="center">
10
 
11
  # Pixal3D: Pixel-Aligned 3D Generation from Images
@@ -29,250 +34,115 @@ pipeline_tag: image-to-3d
29
  <a href="LICENSE"><img src=https://img.shields.io/badge/License-MIT-yellow.svg height=22px></a>
30
  </div>
31
 
32
-
33
- **Pixal3D** generates high-fidelity 3D assets from a single image. Unlike previous methods that loosely inject image features via attention, Pixal3D explicitly lifts pixel features into 3D through back-projection, establishing direct pixel-to-3D correspondences. This enables near-reconstruction-level fidelity with detailed geometry and PBR textures.
34
-
35
- ---
36
-
37
- ## ✨ News
38
-
39
- - **May 2026**: Release training code and data preparation toolkit. 🔧
40
- - **May 2026**: Release the improved version based on [Trellis.2](https://github.com/microsoft/TRELLIS.2) backbone. 💪
41
- - **May 2026**: Release inference code and online demo. 🤗
42
- - **Apr 2026**: Our paper is accepted to SIGGRAPH 2026! 🎉
43
-
44
- ## 📌 Branches
45
-
46
- | Branch | Description |
47
- |--------|-------------|
48
- | `main` | **Latest version** — improved implementation based on [Trellis.2](https://github.com/microsoft/TRELLIS.2) backbone with better performance. |
49
- | `paper` | **Paper version** — original implementation based on [Direct3D-S2](https://github.com/DreamTechAI/Direct3D-S2), corresponding to results reported in our SIGGRAPH 2026 paper. |
50
-
51
- > If you want to reproduce the results in our paper, please switch to the `paper` branch.
52
-
53
- ## 🎮 Try It Online
54
-
55
- You can try Pixal3D directly in your browser without any installation via our Hugging Face Gradio demo:
56
-
57
- 👉 [**Launch Demo**](https://huggingface.co/spaces/TencentARC/Pixal3D)
58
-
59
- ## 🚀 Getting Started
60
-
61
- ### Installation
62
-
63
- #### Step 1: Follow TRELLIS.2 Installation
64
-
65
- Please first follow the installation guide of [TRELLIS.2](https://github.com/microsoft/TRELLIS.2) to set up the base environment.
66
-
67
- #### Step 2: Install Additional Dependencies
68
-
69
- ```bash
70
- pip install -r requirements.txt
71
- ```
72
-
73
- #### Step 3: Install natten
74
-
75
- ```bash
76
- NATTEN_CUDA_ARCH="xx" NATTEN_N_WORKERS=xx pip install natten==0.21.0 --no-build-isolation
77
- ```
78
-
79
- Please replace `xx` with the CUDA architecture and the number of build workers suitable for your machine.
80
-
81
- #### Step 4: Install utils3d
82
-
83
- ```bash
84
- pip install https://github.com/LDYang694/Storages/releases/download/20260430/utils3d-0.0.2-py3-none-any.whl
85
- ```
86
-
87
- > **Note**: `requirements-hfdemo.txt` is for the Hugging Face Spaces demo (H-series GPU architecture) and may not be compatible with other architectures.
88
-
89
- ### Usage
90
-
91
- #### Inference
92
-
93
- Generate a GLB mesh from a single image:
94
 
95
  ```bash
96
  python inference.py --image assets/images/0_img.png --output ./output.glb
97
  ```
98
 
99
- **Low-VRAM mode** (reduces peak VRAM by loading models on-demand):
100
 
101
  ```bash
102
  python inference.py --image assets/images/0_img.png --output ./output.glb --low_vram
103
  ```
104
 
105
- By default, the pipeline resolution is **1536** (standard mode) or **1024** (low-VRAM mode). You can override this with `--resolution`:
106
 
107
  ```bash
108
- # Force 1536 even in low-VRAM mode
109
- python inference.py --image assets/images/0_img.png --output ./output.glb --low_vram --resolution 1536
110
-
111
- # Force 1024 in standard mode
112
- python inference.py --image assets/images/0_img.png --output ./output.glb --resolution 1024
113
  ```
114
 
115
- **Tip**: If you don't have `flash_attn` installed, you can use PyTorch's built-in SDPA backend instead:
116
- > ```bash
117
- > ATTN_BACKEND=sdpa python inference.py --image assets/images/0_img.png --output ./output.glb --low_vram
118
- > ```
119
 
120
- ### Web Demo
121
-
122
- We provide a Gradio web demo for Pixal3D, which allows you to generate 3D meshes from images interactively.
123
 
124
- ```bash
125
- python app.py
126
- ```
 
127
 
128
- Low-VRAM mode is also available for the web demo. The frontend default resolution will automatically switch to 1024 in low-VRAM mode (1536 otherwise), but can be changed manually in the UI.
129
 
130
- ```bash
131
- python app.py --low_vram
132
- # or via environment variable:
133
- LOW_VRAM=1 python app.py
134
- ```
135
  ## 🔧 Training
136
 
137
- We provide the full training codebase for reproducing Pixal3D from scratch.
138
-
139
- ### Data Preparation
140
-
141
- Prepare view-aligned O-Voxel data and rendered condition images by following the data toolkit instructions:
142
 
143
- > 📂 **[data_toolkit/README.md](data_toolkit/README.md)**
 
 
 
 
144
 
145
- ### Overview
146
-
147
- Pixal3D is trained as a three-stage cascade, each progressively increasing resolution:
148
-
149
- | Stage | Model | Resolutions | Config Prefix |
150
- |-------|-------|-------------|---------------|
151
- | 1 | Sparse Structure | 32 → 64 | `ss_flow_img_dit_*_proj_finetune` |
152
- | 2 | Shape | 256 → 512 → 1024 | `slat_flow_img2shape_*_proj_finetune` |
153
- | 3 | Texture | 256 → 512 → 1024 | `slat_flow_imgshape2tex_*_proj_finetune` |
154
-
155
- All stages use **pixel-aligned projection conditioning** and **view-aligned latents** (2 views by default). Within each stage, start from the lowest resolution and progressively fine-tune to higher resolutions by setting `finetune_ckpt` in the config.
156
-
157
- ### Quick Start
158
-
159
- ```sh
160
- python train.py \
161
- --config <CONFIG_JSON> \
162
- --output_dir <OUTPUT_DIR> \
163
- --data_dir '<DATA_DIR_JSON>'
164
- ```
165
-
166
- `--data_dir` is a JSON string describing the dataset layout. Different stages require different keys:
167
-
168
- | Stage | Required keys |
169
- |-------|---------------|
170
- | Sparse Structure | `base`, `ss_latent`, `render_cond` |
171
- | Shape | `base`, `shape_latent`, `render_cond` |
172
- | Texture | `base`, `shape_latent`, `pbr_latent`, `render_cond` |
173
-
174
- ### Example: Training All Three Stages
175
-
176
- Below we show the full training sequence using ObjaverseXL as an example. Each higher-resolution step requires updating `finetune_ckpt` in its config JSON to point to the previous checkpoint.
177
-
178
- <details>
179
- <summary><b>Stage 1: Sparse Structure (32 → 64)</b></summary>
180
-
181
- ```sh
182
- # Resolution 32
183
- python train.py \
184
- --config configs/gen/ss_flow_img_dit_1_3B_32_bf16_proj_finetune.json \
185
- --output_dir results/ss_32 \
186
- --data_dir '{"ObjaverseXL_sketchfab": {"base": "datasets/ObjaverseXL_sketchfab", "ss_latent": "datasets/ObjaverseXL_sketchfab/ss_latents/ss_enc_conv3d_16l8_fp16_64_view", "render_cond": "datasets/ObjaverseXL_sketchfab/renders_cond"}}'
187
-
188
- # Resolution 64 (set finetune_ckpt → results/ss_32 checkpoint)
189
- python train.py \
190
- --config configs/gen/ss_flow_img_dit_1_3B_32_bf16_proj_finetune_ft64.json \
191
- --output_dir results/ss_ft64 \
192
- --data_dir '{"ObjaverseXL_sketchfab": {"base": "datasets/ObjaverseXL_sketchfab", "ss_latent": "datasets/ObjaverseXL_sketchfab/ss_latents/ss_enc_conv3d_16l8_fp16_64_view", "render_cond": "datasets/ObjaverseXL_sketchfab/renders_cond"}}'
193
- ```
194
- </details>
195
-
196
- <details>
197
- <summary><b>Stage 2: Shape (256 → 512 → 1024)</b></summary>
198
-
199
- ```sh
200
- # Resolution 256
201
- python train.py \
202
- --config configs/gen/slat_flow_img2shape_dit_1_3B_256_bf16_proj_finetune.json \
203
- --output_dir results/shape_256 \
204
- --data_dir '{"ObjaverseXL_sketchfab": {"base": "datasets/ObjaverseXL_sketchfab", "shape_latent": "datasets/ObjaverseXL_sketchfab/shape_latents/shape_enc_next_dc_f16c32_fp16_256_view", "render_cond": "datasets/ObjaverseXL_sketchfab/renders_cond"}}'
205
-
206
- # Resolution 512
207
- python train.py \
208
- --config configs/gen/slat_flow_img2shape_dit_1_3B_256_bf16_proj_finetune_ft512.json \
209
- --output_dir results/shape_ft512 \
210
- --data_dir '{"ObjaverseXL_sketchfab": {"base": "datasets/ObjaverseXL_sketchfab", "shape_latent": "datasets/ObjaverseXL_sketchfab/shape_latents/shape_enc_next_dc_f16c32_fp16_512_view", "render_cond": "datasets/ObjaverseXL_sketchfab/renders_cond"}}'
211
-
212
- # Resolution 1024
213
- python train.py \
214
- --config configs/gen/slat_flow_img2shape_dit_1_3B_512_bf16_proj_finetune_ft1024.json \
215
- --output_dir results/shape_ft1024 \
216
- --data_dir '{"ObjaverseXL_sketchfab": {"base": "datasets/ObjaverseXL_sketchfab", "shape_latent": "datasets/ObjaverseXL_sketchfab/shape_latents/shape_enc_next_dc_f16c32_fp16_1024_view", "render_cond": "datasets/ObjaverseXL_sketchfab/renders_cond"}}'
217
- ```
218
- </details>
219
-
220
- <details>
221
- <summary><b>Stage 3: Texture (256 → 512 → 1024)</b></summary>
222
-
223
- ```sh
224
- # Resolution 256
225
- python train.py \
226
- --config configs/gen/slat_flow_imgshape2tex_dit_1_3B_256_bf16_proj_finetune.json \
227
- --output_dir results/tex_256 \
228
- --data_dir '{"ObjaverseXL_sketchfab": {"base": "datasets/ObjaverseXL_sketchfab", "shape_latent": "datasets/ObjaverseXL_sketchfab/shape_latents/shape_enc_next_dc_f16c32_fp16_256_view", "pbr_latent": "datasets/ObjaverseXL_sketchfab/pbr_latents/tex_enc_next_dc_f16c32_fp16_256_view", "render_cond": "datasets/ObjaverseXL_sketchfab/renders_cond"}}'
229
-
230
- # Resolution 512
231
- python train.py \
232
- --config configs/gen/slat_flow_imgshape2tex_dit_1_3B_512_bf16_proj_finetune.json \
233
- --output_dir results/tex_512 \
234
- --data_dir '{"ObjaverseXL_sketchfab": {"base": "datasets/ObjaverseXL_sketchfab", "shape_latent": "datasets/ObjaverseXL_sketchfab/shape_latents/shape_enc_next_dc_f16c32_fp16_512_view", "pbr_latent": "datasets/ObjaverseXL_sketchfab/pbr_latents/tex_enc_next_dc_f16c32_fp16_512_view", "render_cond": "datasets/ObjaverseXL_sketchfab/renders_cond"}}'
235
-
236
- # Resolution 1024
237
- python train.py \
238
- --config configs/gen/slat_flow_imgshape2tex_dit_1_3B_512_bf16_proj_finetune_ft1024.json \
239
- --output_dir results/tex_ft1024 \
240
- --data_dir '{"ObjaverseXL_sketchfab": {"base": "datasets/ObjaverseXL_sketchfab", "shape_latent": "datasets/ObjaverseXL_sketchfab/shape_latents/shape_enc_next_dc_f16c32_fp16_1024_view", "pbr_latent": "datasets/ObjaverseXL_sketchfab/pbr_latents/tex_enc_next_dc_f16c32_fp16_1024_view", "render_cond": "datasets/ObjaverseXL_sketchfab/renders_cond"}}'
241
- ```
242
- </details>
243
-
244
- ### Additional Options
245
-
246
- <details>
247
- <summary><b>All command-line arguments</b></summary>
248
-
249
- | Argument | Description | Default |
250
- |----------|-------------|---------|
251
- | `--config` | Config JSON path | *required* |
252
- | `--output_dir` | Output directory | *required* |
253
- | `--data_dir` | Dataset JSON string | `./data/` |
254
- | `--load_dir` | Checkpoint load directory | `output_dir` |
255
- | `--ckpt` | Resume from step | `latest` |
256
- | `--auto_retry` | Retries on failure | `3` |
257
- | `--tryrun` | Dry run | `false` |
258
- | `--profile` | Profiling | `false` |
259
- | `--num_nodes` | Number of nodes | `1` |
260
- | `--node_rank` | Current node rank | `0` |
261
- | `--num_gpus` | GPUs per node | all |
262
- | `--master_addr` | Master address | `localhost` |
263
- | `--master_port` | Master port | `12666` |
264
- | `--use_wandb` | Enable W&B logging | `false` |
265
- | `--wandb_project` | W&B project | `trellis2-training` |
266
- | `--wandb_name` | W&B run name | basename of `output_dir` |
267
- | `--wandb_id` | W&B run ID (resume) | — |
268
-
269
- </details>
270
 
271
  ## 🌐 Community Projects
272
 
273
  We thank the community for building extensions and deployment guides for Pixal3D!
274
 
275
  - [Pixal3D-ComfyUI](https://github.com/Saganaki22/Pixal3D-ComfyUI) — ComfyUI integration with deployment guides for Windows, WSL, and more.
 
276
 
277
  ## 🤗 Acknowledgements
278
 
@@ -299,4 +169,4 @@ If you find this work useful, please consider citing:
299
 
300
  ## 📜 License
301
 
302
- This project is released under the [MIT License](LICENSE). The third-party components included in this project remain licensed under their respective original terms; see [NOTICE](NOTICE) for the full list of dependencies and their licenses.
 
3
  license_link: LICENSE
4
  extra_gated_eu_disallowed: true
5
  pipeline_tag: image-to-3d
6
+ tags:
7
+ - 3d-generation
8
+ - image-to-3d
9
+ - pixel-aligned
10
+ - pbr-textures
11
+ - game-assets
12
  ---
13
 
 
14
  <div align="center">
15
 
16
  # Pixal3D: Pixel-Aligned 3D Generation from Images
 
34
  <a href="LICENSE"><img src=https://img.shields.io/badge/License-MIT-yellow.svg height=22px></a>
35
  </div>
36
 
37
+ ## TL;DR
38
+
39
+ **One image in, a textured 3D asset out.** Pixal3D generates high-fidelity 3D assets
40
+ (geometry + PBR textures, exported as GLB) from a single image, and extends naturally to
41
+ multi-view turnarounds and object-separated scenes. Its defining trait is **pixel
42
+ alignment**: the 3D generation is conditioned on pixels lifted directly into 3D space, so
43
+ the surface where your image's chest logo sits carries that logo — fidelity approaches
44
+ reconstruction rather than plausible imitation.
45
+
46
+ ## Model description
47
+
48
+ Most 3D-native generators synthesize shape in a canonical space and inject image cues
49
+ loosely via attention, leaving the pixel-to-3D association ambiguous. Pixal3D instead
50
+ generates **in a pixel-aligned way, consistent with the input view**: a pixel
51
+ back-projection conditioning scheme lifts multi-scale image features into a 3D feature
52
+ volume, establishing direct pixel-to-3D correspondence ([arXiv:2605.10922](https://arxiv.org/abs/2605.10922)).
53
+
54
+ - **Backbone**: improved implementation on the [TRELLIS.2](https://github.com/microsoft/TRELLIS.2)
55
+ backbone (this `main` branch); the original SIGGRAPH paper implementation is on the
56
+ `paper` branch ([Direct3D-S2](https://github.com/DreamTechAI/Direct3D-S2)-based).
57
+ - **Architecture**: a three-stage cascade of flow-matching DiTs (1.3B each) —
58
+ sparse structure → shape (SLAT) → texture (PBR) — each trained at progressively higher
59
+ resolutions and conditioned by pixel back-projection with view-aligned latents.
60
+ - **Image encoder**: DINOv2 (Apache-2.0, see [NOTICE](NOTICE)).
61
+ - **Output**: GLB with detailed geometry and PBR (metallic-roughness) textures.
62
+ - **Multi-view**: aggregating back-projected feature volumes across views improves
63
+ fidelity to the surfaces every view shares.
64
+ - **Scenes**: the same pixel-aligned generation composes into object-separated 3D scenes
65
+ via a modular pipeline.
66
+
67
+ ## Intended use
68
+
69
+ - Turning a single concept image, photo or render into a usable 3D asset for games,
70
+ rendering, AR/VR, design iteration and 3D content prototyping.
71
+ - Multi-view inputs (e.g. turnaround sheets) when surfaces must match several views.
72
+ - Scene synthesis from an image containing multiple objects.
73
+
74
+ ## Limitations and biases
75
+
76
+ - **Generated, not measured.** Output is a generated asset, not a 3D scan; do not use it
77
+ where metric accuracy matters.
78
+ - **Unseen is invented.** Surfaces no view can see are hallucinated by the model;
79
+ multi-view inputs reduce this but do not eliminate it.
80
+ - **Training-data bias.** Trained on ObjaverseXL (Sketchfab subset), which is
81
+ object-centric and dominated by render-style imagery: everyday photographed objects
82
+ and heavily stylised flat/vector art can come out weaker than render-style inputs.
83
+ - **Generation pose.** Pixal3D generates in the input view's alignment rather than a
84
+ canonical pose; pipelines expecting canonical-front assets should account for this.
85
+ - **Hardware.** Standard mode (pipeline resolution 1536) targets high-VRAM NVIDIA GPUs;
86
+ `--low_vram` (resolution 1024, on-demand loading) trades peak VRAM down. The online
87
+ demo runs on H-series GPUs.
88
+
89
+ ## Quick start
90
+
91
+ Full instructions live on [GitHub](https://github.com/TencentARC/Pixal3D). In short:
92
+ set up the TRELLIS.2 environment, then `pip install -r requirements.txt`, build
93
+ `natten==0.21.0` for your CUDA architecture, and install the provided `utils3d` wheel.
94
+
95
+ Generate a GLB from one image:
 
 
 
96
 
97
  ```bash
98
  python inference.py --image assets/images/0_img.png --output ./output.glb
99
  ```
100
 
101
+ Lower peak VRAM (loads models on-demand, default resolution 1024 instead of 1536):
102
 
103
  ```bash
104
  python inference.py --image assets/images/0_img.png --output ./output.glb --low_vram
105
  ```
106
 
107
+ Without `flash_attn`, PyTorch's SDPA backend works too:
108
 
109
  ```bash
110
+ ATTN_BACKEND=sdpa python inference.py --image assets/images/0_img.png --output ./output.glb
 
 
 
 
111
  ```
112
 
113
+ A Gradio web demo is included (`python app.py`, also with `--low_vram`), and a hosted
114
+ demo runs at the [Hugging Face Space](https://huggingface.co/spaces/TencentARC/Pixal3D).
 
 
115
 
116
+ ## 📌 Branches
 
 
117
 
118
+ | Branch | Description |
119
+ |--------|-------------|
120
+ | `main` | **Latest version** — improved implementation based on [TRELLIS.2](https://github.com/microsoft/TRELLIS.2) backbone with better performance. |
121
+ | `paper` | **Paper version** — original implementation based on [Direct3D-S2](https://github.com/DreamTechAI/Direct3D-S2), corresponding to results reported in our SIGGRAPH 2026 paper. |
122
 
123
+ > If you want to reproduce the results in our paper, please switch to the `paper` branch.
124
 
 
 
 
 
 
125
  ## 🔧 Training
126
 
127
+ The full training codebase (three-stage cascade, ObjaverseXL data toolkit, per-stage
128
+ configs and the complete argument reference) is on
129
+ [GitHub](https://github.com/TencentARC/Pixal3D#-training).
 
 
130
 
131
+ | Stage | Model | Resolutions |
132
+ |-------|-------|-------------|
133
+ | 1 | Sparse Structure | 32 → 64 |
134
+ | 2 | Shape | 256 → 512 → 1024 |
135
+ | 3 | Texture (PBR) | 256 → 512 → 1024 |
136
 
137
+ All stages use pixel-aligned projection conditioning and view-aligned latents (2 views
138
+ by default), fine-tuned progressively from the lowest resolution within each stage.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
 
140
  ## 🌐 Community Projects
141
 
142
  We thank the community for building extensions and deployment guides for Pixal3D!
143
 
144
  - [Pixal3D-ComfyUI](https://github.com/Saganaki22/Pixal3D-ComfyUI) — ComfyUI integration with deployment guides for Windows, WSL, and more.
145
+ - [image-to-3dlab (AssetFurnace)](https://github.com/Bingeljell/image-to-3dlab) — an end-to-end Apple Silicon / NVIDIA pipeline that uses Pixal3D as its image-to-3D engine, including a Pixal3D C++/GGML port ([pixal3d.cpp](https://github.com/raven38/pixal3d.cpp)).
146
 
147
  ## 🤗 Acknowledgements
148
 
 
169
 
170
  ## 📜 License
171
 
172
+ This project is released under the [MIT License](LICENSE). The third-party components included in this project remain licensed under their respective original terms; see [NOTICE](NOTICE) for the full list of dependencies and their licenses.