Stable Diffusion

From one photo to a finished 3D model in ComfyUI, free and cleared for commercial use

From one photo to a finished 3D model in ComfyUI, free and cleared for commercial use

Until now, turning a single photo into a 3D model came down to two options, and neither was good. Either pay a cloud service like Tripo or Rodin and upload your product photos to it, or compile CUDA extensions for Microsoft TRELLIS on Linux and hope you get it running within a few days.

Since ComfyUI 0.34.0 you need neither. TRELLIS.2 and Pixal3D are built into the core: no custom nodes, no compilation and no licence forbidding commercial use. I have tested Hunyuan 3D as well, and for local deployment this is the better choice — the full Hunyuan is demanding enough that it will not start on an ordinary gaming card, and the cut-down variants do not convince on quality.

One term that will keep coming up: PBR materials are sets of maps that tell the renderer how a surface reacts to light — its colour, whether it is glossy or matte, and whether it is metal. The model then looks like metal and glass in Blender or on the web, not like a paper mock-up with a photo glued on.

What the two models are

TRELLIS.2 is a Microsoft model, open-sourced in December 2025, with 4 billion parameters. From a single photo it produces a 3D mesh at effective resolutions up to 1536³, including PBR materials: base color, roughness and metallic maps. It also handles what older generators choked on: open surfaces, thin walls, non-manifold geometry.

Pixal3D comes from Tsinghua University and Tencent ARC Lab. It builds on the TRELLIS.2 backbone but generates “pixel-aligned”: every pixel of the input photo has its counterpart on the model. The result is closer to reconstruction than to free generation. Feed it a photo of a printed mug and the print ends up in the right place, not “somewhere on the mug”.

In the ComfyUI template Pixal3D is the default. You switch to TRELLIS.2 when you want a more imagined back side of the object, or when Pixal3D returns something odd.

Why “natively” is the important word

Microsoft's original TRELLIS.2 has a catch that GitHub does not advertise. The code and weights are MIT-licensed, but the mesh post-processing stood on NVIDIA's nvdiffrast and nvdiffrec libraries. Those are under the NVIDIA Source Code License, which permits non-commercial research only. An “open” model whose output you could not sell.

The ComfyUI team rewrote that entire 3D post-processing stage from scratch in pure PyTorch and SciPy. No CUDA extensions, no wheels tied to a specific Python version, no non-commercial dependency. That is why I am writing about it: it is the first open 3D generator I can deploy on a client's commercial project without walking them through legal small print.

What it actually costs in hardware

Nobody will give you this number officially. ComfyUI only says “consumer hardware”, and Microsoft's original implementation listed a 24 GB minimum and was tested on an A100. In practice it is far less: on a card with 8 GB of VRAM it runs, and one model takes roughly 220 seconds. The models in the template are quantised to int8, which is exactly why they fit into eight gigabytes. Treat 8 GB as the real floor, not the official 24.

Microsoft quotes about 3 seconds for 512³ on an H100, 17 seconds for 1024³ and a minute for 1536³ — but that is an accelerator costing as much as a car. On a consumer card, count in minutes. It is not real-time, but it is an order of magnitude away from an hour of photogrammetry from fifty photos.

Getting it running

You need ComfyUI 0.34.0 or newer. In the template library you will find “Pixal3D & TRELLIS.2: Image to Model”. The template offers to download the models itself; these are the files and folders:

  • trellis_2_int8_convrot.safetensors and pixal3d_int8_convrot.safetensors into models/diffusion_models/
  • trellis_2_shape_vae_bf16.safetensors and trellis_2_texture_vae_bf16.safetensors into models/vae/
  • dino_v3_L_naf_fp32.safetensors into models/clip_vision/
  • birefnet.safetensors into models/background_removal/

The weights live in Comfy-Org/TRELLIS.2 and Comfy-Org/Pixal3D. Two helpers come with the bundle: BiRefNet for background removal and MoGe for estimating the camera's focal length, without which pixel-aligned generation would make no sense.

After that it is trivial: load the photo into LoadImage, leave the switch on Pixal3D, run the graph and spin the model around in Preview 3D. Output lands in ComfyUI/output/3d/.

What ComfyUI added on top

It is not just the model — a whole set of 3D nodes came with it, useful well beyond TRELLIS:

  • Load 3D, Preview 3D and Save 3D (Advanced) for working with meshes right in the graph.
  • Remesh Mesh, Decimate Mesh, Smooth Mesh Normals, Fill Holes and Merge Meshes — edits you used to do in Blender.
  • UV unwrapping, plus a normal map and ambient occlusion on top of the original three maps. The original TRELLIS.2 does not generate those at all.
  • Paint Mesh and Render Mesh for texturing and previews.

What to watch out for

Quality against paid services. Paid cloud generators such as Tripo or Rodin still produce slightly better results, and ComfyUI admits as much. But in the category of “runs locally, costs nothing and I am allowed to sell it”, I do not see a competitor.

Alpha channel. Transparent parts (glass, leaves) export into GLB as opaque. In Blender or Three.js you have to switch the material's blend mode by hand.

The input photo. One object, simple background, fully in frame. Pixal3D holds on to pixels, so if the photo shows half a chair, you get half a chair.

Where it makes sense

The main scenario is e-commerce: turn a single product photo into a 3D preview the customer can rotate. The second is AR — drop a GLB with PBR materials onto your site via model-viewer and the customer places the furniture in their living room. The third is game assets and props, where an imagined back side does not bother you.

Where I would not deploy it yet: precise engineering parts, human figures and anything going straight into production. There it is a tool for the first draft, not for the final piece.

Links

← Back to tutorials