anaksor-ocr
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Microsoft's 4B image to 3D model that turns a single picture into a textured 3D mesh with PBR materials, at resolutions up to 1536, for people with a large NVIDIA GPU.
TRELLIS.2-4B is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.
pip install -U huggingface_hub hf download microsoft/TRELLIS.2-4B
TRELLIS.2-4B is Microsoft's model for turning a single image into a 3D asset. The output is a mesh with PBR materials, which covers color, opacity and how light reacts. The model is a 4 billion parameter flow-matching transformer. It works on a sparse voxel structure called O-Voxel.
O-Voxel stores both shape and appearance. It handles open surfaces, non-manifold geometry and closed shapes without a lossy conversion step.
It suits 3D artists, game developers and researchers who have a strong NVIDIA GPU and want a 3D draft from a picture. The card asks for at least 24 GB of GPU memory.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Games and media | 3D artists | Turn concept art into a starting mesh | A prop built from one picture |
| Product design | Designers | Draft a 3D model from a product photo | A rough model of a gadget |
| Research | Graphics researchers | Study sparse voxel generation | Testing at several resolutions |
| Software | Developers | Add image to 3D to a pipeline | An asset generator for a tool |
Skip it if you have no NVIDIA GPU with 24 GB, or you need a Windows setup, since the card tests Linux only.
| Use case | Who | What they get back |
|---|---|---|
| Image to 3D | Artists and developers | A mesh with PBR materials from one picture |
| Shape-conditioned texturing | 3D artists | Textures for an input mesh and reference image |
| Mesh and O-Voxel conversion | Researchers | Fast conversion between the two forms |
You need a few things in place first.
pip install -U huggingface_hub hf download microsoft/TRELLIS.2-4B
You set up the environment, load the pipeline from the model name, open an image and run the pipeline. The result is a mesh, which you can simplify before rendering because of a limit in the renderer.
import os
os.environ['OPENCV_IO_ENABLE_OPENEXR'] = '1'
os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True" # Can save GPU memory
import cv2
import imageio
from PIL import Image
import torch
from trellis2.utils import render_utils
from trellis2.renderers import EnvMap
import o_voxel
# 1. Setup Environment Map
envmap = EnvMap(torch.tensor(
cv2.cvtColor(cv2.imread('assets/hdri/forest.exr', cv2.IMREAD_UNCHANGED), cv2.COLOR_BGR2RGB),
dtype=torch.float32, device='cuda'
))
# 2. Load Pipeline
pipeline.cuda()
# 3. Load Image & Run
image = Image.open("assets/example_image/T.png")
mesh = pipeline.run(image)[0]
mesh.simplify(16777216) # nvdiffrast limitPut your own value in its key setting first.
| Resolution | Time on an H100 |
|---|---|
| 512 | about 3 seconds |
| 1024 | about 17 seconds |
| 1536 | about 60 seconds |
You run the script on the example image from the repository. The pipeline returns a mesh, and the call that follows simplifies it. On an H100, a 512 resolution run takes about 3 seconds and a 1536 run about 60 seconds.
Start at the lowest resolution, which is the quickest, and use one clear picture of a single object. Check the result for small holes before you use it anywhere.
The sparse 3D VAE downsamples space by a factor of 16. A 1024 cubed asset is encoded into only about 9.6K latent tokens. The card says this costs negligible perceptual quality. The model is a pre-trained foundation model with no preference alignment, so style varies and you may need to try a few inputs.
Microsoft's 4B image to 3D model that turns a single picture into a textured 3D mesh with PBR materials, at resolutions up to 1536, for people with a large NVIDIA GPU.
Made by microsoft on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.
What it is: TRELLIS.2-4B is Microsoft's model for turning a single image into a 3D asset. The output is a mesh with PBR materials, which covers color, opacity and how light reacts. The model is a 4 billion parameter flow-matching transformer. It works on a sparse voxel structure called O-Voxel.
O-Voxel stores both shape and appearance. It handles open surfaces, non-manifold geometry and closed shapes without a lossy conversion step.
Who it suits: It suits 3D artists, game developers and researchers who have a strong NVIDIA GPU and want a 3D draft from a picture. The card asks for at least 24 GB of GPU memory.
Industry | Who uses it | How they use it | Example
Games and media | 3D artists | Turn concept art into a starting mesh | A prop built from one picture
Product design | Designers | Draft a 3D model from a product photo | A rough model of a gadget
Research | Graphics researchers | Study sparse voxel generation | Testing at several resolutions
Software | Developers | Add image to 3D to a pipeline | An asset generator for a tool
Skip it if you have no NVIDIA GPU with 24 GB, or you need a Windows setup, since the card tests Linux only.
Where to use it:
Use case | Who | What they get back
Image to 3D | Artists and developers | A mesh with PBR materials from one picture
Shape-conditioned texturing | 3D artists | Textures for an input mesh and reference image
Mesh and O-Voxel conversion | Researchers | Fast conversion between the two forms
How to set it up: You need a few things in place first.
pip install -U huggingface_hub
hf download microsoft/TRELLIS.2-4B
How to use it: You set up the environment, load the pipeline from the model name, open an image and run the pipeline. The result is a mesh, which you can simplify before rendering because of a limit in the renderer.
import os
os.environ['OPENCV_IO_ENABLE_OPENEXR'] = '1'
os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True" # Can save GPU memory
import cv2
import imageio
from PIL import Image
import torch
from trellis2.utils import render_utils
from trellis2.renderers import EnvMap
import o_voxel
# 1. Setup Environment Map
envmap = EnvMap(torch.tensor(
cv2.cvtColor(cv2.imread('assets/hdri/forest.exr', cv2.IMREAD_UNCHANGED), cv2.COLOR_BGR2RGB),
dtype=torch.float32, device='cuda'
))
# 2. Load Pipeline
pipeline.cuda()
# 3. Load Image & Run
image = Image.open("assets/example_image/T.png")
mesh = pipeline.run(image)[0]
mesh.simplify(16777216) # nvdiffrast limit
Put your own value in its key setting first.
Resolution | Time on an H100
512 | about 3 seconds
1024 | about 17 seconds
1536 | about 60 seconds
Example: You run the script on the example image from the repository. The pipeline returns a mesh, and the call that follows simplifies it. On an H100, a 512 resolution run takes about 3 seconds and a 1536 run about 60 seconds.
For newcomers and experts: Start at the lowest resolution, which is the quickest, and use one clear picture of a single object. Check the result for small holes before you use it anywhere.
The sparse 3D VAE downsamples space by a factor of 16. A 1024 cubed asset is encoded into only about 9.6K latent tokens. The card says this costs negligible perceptual quality. The model is a pre-trained foundation model with no preference alignment, so style varies and you may need to try a few inputs.
Title: Inference time on an H100, from the card
Resolution 512: 3 seconds
Resolution 1024: 17 seconds
Resolution 1536: 60 seconds
Set up the environment and load the pipeline
Open a single image
Run the pipeline
Get a mesh with PBR materials
Good to know:
Download its files with Hugging Face's command line:
pip install -U huggingface_hub
hf download microsoft/TRELLIS.2-4B
Then follow the usage in its model card. Nothing in this kit runs by itself.
README.md 6 KB
Listed Hugging Face models in the same category that share the most tags with this one.
| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
|---|---|---|---|---|---|
| TRELLIS.2-4B This page | 2,566,439 | 1,481 | — | mit | |
| TRELLIS-image-largeShares image-to-3d | 2,762,068 | 722 | — | mit | |
| VGGT-1BShares image-to-3d | 646,177 | 158 | 1.3B | cc-by-nc-4.0 | |
| TripoSR by stabilityaiShares image-to-3d | 168,894 | 689 | — | mit | |
| Idol by Comfy-OrgShares image-to-3d | 52,939 | 165 | — | apache-2.0 | |
| Idol by speridlabsShares image-to-3d | 31,367 | 2,259 | — | apache-2.0 |
Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Qwen · Kit
Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…
ACE-Step · Kit
Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…
alirezarezvani · Skill
Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…
block · Kit
Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…
backnotprop · Kit
Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.