Image-to-3D
Trellis
Safetensors
localmesh-engine
mesh
gltf
multi-view
3d-generation
Qtn-Cls commited on
Commit
72e67cb
·
verified ·
1 Parent(s): 6d52086

Engine 1.2.0: the photographs projected onto the texture; ANTLR licence text

Browse files

Model card for engine 1.2.0 (photo projection, no new weights), and the BSD-3 licence text of antlr4-python3-runtime 4.9.3, which its dist-info did not carry.

README.md CHANGED
@@ -15,30 +15,73 @@ base_model_relation: quantized
15
 
16
  ![LocalMesh Engine](https://raw.githubusercontent.com/Quentincls/localmesh-engine/main/assets/banner.png)
17
 
18
- # LocalMesh Engine, multi-view weights
19
 
20
  LocalMesh Engine turns one photo, or four sides of the same subject, into a
21
  textured `.glb`. It runs on an 8 GB NVIDIA card. The code is Apache-2.0 and
22
  lives on [GitHub](https://github.com/Quentincls/localmesh-engine). The project
23
  page is [local-mesh.com/localmesh-engine](https://local-mesh.com/localmesh-engine/).
24
 
25
- TRELLIS.2 works from a single image. This repository holds the weights of the
26
- four view path: the three fp8 conversions of the Pixal3D multi-view models,
27
- and the field network that recovers detail between image tokens. The three
28
- conversions exist nowhere else. Everything else the engine needs comes from
29
- upstream repositories and is listed below.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
  ## What is in this repository
32
 
33
- This repository holds **the whole LocalMesh engine**, except one set Meta
34
- gates. It is laid out exactly like the folder the engine reads, so one command
35
- places all of it:
36
 
37
  | Folder | Size | What it is | Whose |
38
  |---|---|---|---|
39
- | `TRELLIS.2-4B/` | 8.1 GB | the single photo path, in fp8 | [visualbruno](https://huggingface.co/visualbruno/TRELLIS.2-4B-FP8), MIT — rehosted unchanged |
40
- | `microsoft/` | 148 MB | the sparse structure decoder | [Microsoft](https://huggingface.co/microsoft/TRELLIS-image-large), MIT — rehosted unchanged |
41
- | `multivue/` | 4.8 GB | the four view path | ours, from Pixal3D — see below |
42
 
43
  Rehosted so that one `hf download` replaces six. Taking those two from their
44
  own repositories works exactly as well; nothing here is modified.
@@ -63,11 +106,13 @@ decoder turns its latent into the mesh.
63
  fills in the detail the token map loses: the token map is sixteen times coarser
64
  than the photo.
65
 
66
- 4.28 GB, seven files, plus `multivue/cameras/` — DA3-BASE and the code that
67
- reads it, 544 MB, Apache-2.0, unchanged. Keep the three `.json` descriptors
68
- next to their `.safetensors`: the engine builds each flow model on the `meta` device from that
69
- descriptor, then loads the tensors in place, so the weights are never held
70
- twice. The descriptors declare `dtype: float8_e4m3fn`.
 
 
71
 
72
  The four view path serves the `draft`, `standard` and `high` tiers. The
73
  multi-view weights exist at 512 and 1024 only, so `max` falls back to the
@@ -76,13 +121,20 @@ another name.
76
 
77
  ## What is not in this repository
78
 
 
 
79
  | Weights | Where | Licence | Note |
80
  |---|---|---|---|
81
- | TRELLIS.2-4B, fp8 | https://huggingface.co/visualbruno/TRELLIS.2-4B-FP8 | MIT | 8.1 GB. Texture on both paths, the single photo path, and the shape decoder the four view path ends on. Required either way. |
82
- | TRELLIS-image-large, structure decoder | https://huggingface.co/microsoft/TRELLIS-image-large | MIT | Two files, `ss_dec_conv3d_16l8_fp16.json` and `.safetensors`. |
83
  | DINOv3 ViT-L/16 | https://huggingface.co/facebook/dinov3-vitl16-pretrain-lvd1689m | DINOv3 License, Meta | Image encoder, required on both paths. Access is gated and approved by hand, so ask for it first. |
84
- | BiRefNet_HR | https://huggingface.co/ZhengPeng7/BiRefNet_HR | MIT | Cutout. The engine fetches this one from the Hub on the first generation if the cache is empty, and loads it with `trust_remote_code=True`, so that first run executes code from the Hub. |
85
- | DA3-BASE | https://huggingface.co/depth-anything/DA3-BASE | Apache-2.0 | `model.safetensors` (541 MB) and `config.json`, plus the `depth_anything_3` source tree beside them: 544 MB in place. Measures the azimuth of each shot and which side each profile shows. The engine runs without it, but it then guesses which side each profile is on, and says so in its result. A wrong guess puts a face at the front and at the back. |
 
 
 
 
 
 
 
86
 
87
  ## Using them
88
 
@@ -97,9 +149,9 @@ hf download Qtn-Cls/LocalMeshEngine --local-dir "$LOCALMESH_ROOT/models"
97
  nothing to move afterwards. For the single photo path alone, 8.3 GB, add
98
  `--exclude "multivue/*"`.
99
 
100
- **Then ask Meta for DINOv3**, the one set that is not here and cannot be: it is
101
  gated, and a human grants access. Nothing generates without it, and approval is
102
- not instant, so send the request before anything else —
103
  [facebook/dinov3-vitl16-pretrain-lvd1689m](https://huggingface.co/facebook/dinov3-vitl16-pretrain-lvd1689m).
104
 
105
  The layout the engine reads:
@@ -127,6 +179,15 @@ The four view path also needs `natten`. Installation, including the three CUDA
127
  extensions that are not on PyPI, is written up in `docs/INSTALL.md` in the
128
  GitHub repository; the four tiers, frozen, are in `docs/RECIPES.md`.
129
 
 
 
 
 
 
 
 
 
 
130
  ## Results
131
 
132
  ![Four views to one .glb](https://raw.githubusercontent.com/Quentincls/localmesh-engine/main/assets/four-views.png)
@@ -146,7 +207,9 @@ shell, traffic light.
146
  | Standard, `standard` | 6 min 30 to 8 min 30 |
147
  | Detailed, `high` | 9 min 20 to 13 min |
148
 
149
- Texture accounts for about 60 % of that time.
 
 
150
 
151
  ## The conversion
152
 
@@ -177,6 +240,11 @@ their own source:
177
  weights: https://huggingface.co/TencentARC/Pixal3D
178
  - `champ.safetensors` comes from **valeoai/NAF**, Apache-2.0,
179
  https://github.com/valeoai/NAF
 
 
 
 
 
180
 
181
  The engine also builds on:
182
 
@@ -199,7 +267,7 @@ License Agreement with any redistribution of your own.
199
  author = {Colus, Quentin},
200
  title = {LocalMesh Engine},
201
  year = {2026},
202
- version = {1.0.0},
203
  license = {Apache-2.0},
204
  url = {https://github.com/Quentincls/localmesh-engine}
205
  }
 
15
 
16
  ![LocalMesh Engine](https://raw.githubusercontent.com/Quentincls/localmesh-engine/main/assets/banner.png)
17
 
18
+ # LocalMesh Engine weights
19
 
20
  LocalMesh Engine turns one photo, or four sides of the same subject, into a
21
  textured `.glb`. It runs on an 8 GB NVIDIA card. The code is Apache-2.0 and
22
  lives on [GitHub](https://github.com/Quentincls/localmesh-engine). The project
23
  page is [local-mesh.com/localmesh-engine](https://local-mesh.com/localmesh-engine/).
24
 
25
+ TRELLIS.2 works from a single image. This engine adds a four view path and,
26
+ since version 1.2, puts the photographs' own pixels on the texture. This
27
+ repository holds every weight the engine needs, except DINOv3 and the cutout
28
+ model, laid out like the folder the engine reads. Most of it is rehosted
29
+ unchanged; the three fp8 conversions of the Pixal3D multi-view models exist
30
+ nowhere else.
31
+
32
+ ## New in engine 1.2: the photographs on the texture
33
+
34
+ ![The photograph, the texture drawn by the model, and the photograph projected onto it: printed text stays readable](https://raw.githubusercontent.com/Quentincls/localmesh-engine/main/assets/photo-projection.webp)
35
+
36
+ **No new weights.** Engine [v1.2.0](https://github.com/Quentincls/localmesh-engine/releases/tag/v1.2.0)
37
+ reads exactly the files in this repository. A folder downloaded for an earlier
38
+ version works as it is: there is nothing to download again.
39
+
40
+ The change is in the texture. The texture TRELLIS.2 returns is drawn by the
41
+ model: close to the photograph in colour and shape, wrong in the detail, so
42
+ printed text comes back as glyphs that read as nothing. After texturing, the
43
+ engine now projects the photographs back onto the mesh. Every texel a
44
+ photograph sees squarely takes that photograph's pixel, so a printed label, a
45
+ logo or a fine pattern reads as it does on the photograph. Where no photograph
46
+ sees the surface, underneath or on the back of a single photograph, the drawn
47
+ texture stays, its colour pulled towards the photographed surface next to it.
48
+ The photographs themselves are never retouched.
49
+
50
+ The cameras are fitted to the images. With four photographs, the engine reuses
51
+ the angles DA3-BASE (`multivue/cameras/`, listed below) measured for the shape;
52
+ when the shape was made without that measurement, on the `max` tier or without
53
+ DA3-BASE, it starts from quarter turns and checks whether the two profiles are
54
+ swapped. With one photograph, it searches the whole turn for the angle that
55
+ matches the silhouette and straightens a tilt of up to 20 degrees; nothing
56
+ under `multivue/` is needed, so the single photo download gets the projection
57
+ too. One elevation is shared by all views, and the mesh is never mirrored to
58
+ fit. Each texel takes the one photograph that sees it most squarely, so
59
+ nothing is averaged into a blur. On a cassette generated from four
60
+ photographs, 59 % of the surface takes a photograph pixel, and its printed
61
+ label reads as it does on the photographs.
62
+
63
+ Beside `model_<seed>.glb`, the engine writes `model_<seed>.ai.glb`: the same
64
+ mesh with the drawn texture alone, to compare or to fall back on. Expect about
65
+ twice the disk per job. On an RTX 4060 Laptop 8 GB the projection adds 29 to 73
66
+ seconds per job, most of it spent fitting the cameras, and its memory peak,
67
+ 3.3 GB, stays below that of the texture stage.
68
+
69
+ What it cannot do is correct a shape. Where the reconstructed mesh departs from
70
+ the photograph, a correct pixel lands on the wrong surface and that part shows
71
+ twice. For such a subject, `--no-projection` keeps the drawn texture alone. A
72
+ failure of this step never fails the job: the drawn texture is kept, and the
73
+ result says why.
74
 
75
  ## What is in this repository
76
 
77
+ Everything here is laid out exactly like the folder the engine reads, so one
78
+ command places all of it:
 
79
 
80
  | Folder | Size | What it is | Whose |
81
  |---|---|---|---|
82
+ | `TRELLIS.2-4B/` | 8.1 GB | the single photo path, in fp8 | [visualbruno](https://huggingface.co/visualbruno/TRELLIS.2-4B-FP8), MIT, rehosted unchanged |
83
+ | `microsoft/` | 148 MB | the sparse structure decoder | [Microsoft](https://huggingface.co/microsoft/TRELLIS-image-large), MIT, rehosted unchanged |
84
+ | `multivue/` | 4.8 GB | the four view path | ours, from Pixal3D, see below |
85
 
86
  Rehosted so that one `hf download` replaces six. Taking those two from their
87
  own repositories works exactly as well; nothing here is modified.
 
106
  fills in the detail the token map loses: the token map is sixteen times coarser
107
  than the photo.
108
 
109
+ 4.28 GB, seven files, plus `multivue/cameras/`, 544 MB, rehosted unchanged:
110
+ DA3-BASE and the code that reads it (Apache-2.0), and the three small Python
111
+ packages that code needs, each under its own licence (omegaconf and
112
+ antlr4-python3-runtime BSD-3-Clause, addict MIT). Keep the three `.json`
113
+ descriptors next to their `.safetensors`: the engine builds each flow model on
114
+ the `meta` device from that descriptor, then loads the tensors in place, so the
115
+ weights are never held twice. The descriptors declare `dtype: float8_e4m3fn`.
116
 
117
  The four view path serves the `draft`, `standard` and `high` tiers. The
118
  multi-view weights exist at 512 and 1024 only, so `max` falls back to the
 
121
 
122
  ## What is not in this repository
123
 
124
+ Two sets. The engine needs both.
125
+
126
  | Weights | Where | Licence | Note |
127
  |---|---|---|---|
 
 
128
  | DINOv3 ViT-L/16 | https://huggingface.co/facebook/dinov3-vitl16-pretrain-lvd1689m | DINOv3 License, Meta | Image encoder, required on both paths. Access is gated and approved by hand, so ask for it first. |
129
+ | BiRefNet_HR | https://huggingface.co/ZhengPeng7/BiRefNet_HR | MIT | Cutout, and the mask that tells the projection which pixels belong to the subject. The engine fetches it from the Hub on the first generation if the cache is empty, and loads it with `trust_remote_code=True`, so that first run executes code from the Hub. |
130
+
131
+ TRELLIS.2-4B in fp8, the structure decoder and DA3-BASE are in this
132
+ repository, rehosted unchanged. Their own repositories work just as well:
133
+ [visualbruno/TRELLIS.2-4B-FP8](https://huggingface.co/visualbruno/TRELLIS.2-4B-FP8),
134
+ [microsoft/TRELLIS-image-large](https://huggingface.co/microsoft/TRELLIS-image-large),
135
+ [depth-anything/DA3-BASE](https://huggingface.co/depth-anything/DA3-BASE).
136
+ Without DA3-BASE the engine guesses which side each profile is on, and says so
137
+ in its result; a wrong guess puts a face at the front and at the back.
138
 
139
  ## Using them
140
 
 
149
  nothing to move afterwards. For the single photo path alone, 8.3 GB, add
150
  `--exclude "multivue/*"`.
151
 
152
+ **Then ask Meta for DINOv3**, the one set you have to fetch yourself: it is
153
  gated, and a human grants access. Nothing generates without it, and approval is
154
+ not instant, so send the request before anything else:
155
  [facebook/dinov3-vitl16-pretrain-lvd1689m](https://huggingface.co/facebook/dinov3-vitl16-pretrain-lvd1689m).
156
 
157
  The layout the engine reads:
 
179
  extensions that are not on PyPI, is written up in `docs/INSTALL.md` in the
180
  GitHub repository; the four tiers, frozen, are in `docs/RECIPES.md`.
181
 
182
+ The photographs are projected onto the texture unless you ask otherwise:
183
+
184
+ ```bash
185
+ python -m localmesh_engine photo.png --no-projection --to out/
186
+ ```
187
+
188
+ `--no-projection` keeps the drawn texture alone; `--sans-projection` is the
189
+ same flag under its French name.
190
+
191
  ## Results
192
 
193
  ![Four views to one .glb](https://raw.githubusercontent.com/Quentincls/localmesh-engine/main/assets/four-views.png)
 
207
  | Standard, `standard` | 6 min 30 to 8 min 30 |
208
  | Detailed, `high` | 9 min 20 to 13 min |
209
 
210
+ Texture accounts for about 60 % of that time. These times were measured with
211
+ engine 1.1, before the projection, which adds 51 to 67 seconds with four
212
+ photographs.
213
 
214
  ## The conversion
215
 
 
240
  weights: https://huggingface.co/TencentARC/Pixal3D
241
  - `champ.safetensors` comes from **valeoai/NAF**, Apache-2.0,
242
  https://github.com/valeoai/NAF
243
+ - `multivue/cameras/` holds **DA3-BASE** and its source, Apache-2.0,
244
+ https://huggingface.co/depth-anything/DA3-BASE, and under `deps/` three
245
+ Python packages, unchanged: **omegaconf** 2.3.0 (BSD-3-Clause, Omry Yadan),
246
+ **antlr4-python3-runtime** 4.9.3 (BSD-3-Clause, The ANTLR Project) and
247
+ **addict** 2.4.0 (MIT, Mats Julian Olsen)
248
 
249
  The engine also builds on:
250
 
 
267
  author = {Colus, Quentin},
268
  title = {LocalMesh Engine},
269
  year = {2026},
270
+ version = {1.2.0},
271
  license = {Apache-2.0},
272
  url = {https://github.com/Quentincls/localmesh-engine}
273
  }
multivue/cameras/deps/antlr4_python3_runtime-4.9.3.dist-info/LICENSE.txt ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [The "BSD 3-clause license"]
2
+ Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions
6
+ are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright
9
+ notice, this list of conditions and the following disclaimer.
10
+ 2. Redistributions in binary form must reproduce the above copyright
11
+ notice, this list of conditions and the following disclaimer in the
12
+ documentation and/or other materials provided with the distribution.
13
+ 3. Neither the name of the copyright holder nor the names of its contributors
14
+ may be used to endorse or promote products derived from this software
15
+ without specific prior written permission.
16
+
17
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20
+ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ =====
29
+
30
+ MIT License for codepointat.js from https://git.io/codepointat
31
+ MIT License for fromcodepoint.js from https://git.io/vDW1m
32
+
33
+ Copyright Mathias Bynens <https://mathiasbynens.be/>
34
+
35
+ Permission is hereby granted, free of charge, to any person obtaining
36
+ a copy of this software and associated documentation files (the
37
+ "Software"), to deal in the Software without restriction, including
38
+ without limitation the rights to use, copy, modify, merge, publish,
39
+ distribute, sublicense, and/or sell copies of the Software, and to
40
+ permit persons to whom the Software is furnished to do so, subject to
41
+ the following conditions:
42
+
43
+ The above copyright notice and this permission notice shall be
44
+ included in all copies or substantial portions of the Software.
45
+
46
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
47
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
48
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
49
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
50
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
51
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
52
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.