New Horizons in Fine-Tuning 3D Generation Models
Hugging Face has released a comprehensive guide on LoRA (Low-Rank Adaptation) fine-tuning for the TRELLIS.2 3D generation model. This guide presents practical solutions to minimize geometric inaccuracies observed in general-purpose 3D generation models in specific domains. It particularly addresses tasks that require precise control over critical detailed shapes in applications such as shoe soles.
The general-purpose model TRELLIS.2 can make errors in important details for specific applications. For example, users may require accurate geometry for furniture models. If not fine-tuned for that task, the pre-trained model may generate geometry that is not sufficiently accurate.
The existing 3D generation ecosystem has struggled with standardization due to the coexistence of various file formats such as GLB, PLY and heterogeneous representations like NeRF, 3D Gaussian Splatting (3DGS). The TRELLIS series mitigates this issue by introducing a Unified Latent Representation that converts to the desired output format at the decoder stage. While TRELLIS.2 has significantly enhanced 3D structural representation, it did not provide an easy path for specific task adaptation. This guide fills that gap.
TRELLIS.2 Pipeline Architecture and LoRA Injection Points
TRELLIS.2 consists of a 5-stage pipeline. The roles of each stage and whether LoRA is applied are as follows.
| Stage | Component | Function | LoRA Applied | Notes |
|---|---|---|---|---|
| 1 | BiRefNet | Background removal from input images | No | Fixed |
| 2 | DINOv3-L | Image → Feature token encoding | No | Gated model, access required |
| 3 | Sparse Structure Flow DiT | Rough shape (16³×8 latent) prediction → 64³ occupancy grid | Yes (Rank 8) | Attention + MLP layer |
| 4 | Shape Flow DiT | Occupancy grid + DINOv3 tokens → 512³ O-Voxel geometry | Yes (Rank 16) | Attention layer only |
| 5 | Texture Flow DiT | Shape latent + DINOv3 tokens → Material/Texture map | No | Frozen (to prevent catastrophic forgetting) |
| - | Post-processing | Combine geometry + material properties → Texture mesh (GLB) | - |
- background removal
- image encoding
- sparse structure prediction
- detailed geometry generation
- material generation
- mesh export
Sparse Structure Flow DiT is a Diffusion Transformer (DiT) that predicts small latent vectors of size 16³ × 8. The subsequent VAE decoder converts this into a 64 × 64 × 64 occupancy grid. Each voxel indicates whether the corresponding position is part of an object. Since the output of this stage guides the subsequent geometry stage, a LoRA adapter was injected.
O-Voxel is the TRELLIS.2 proprietary 3D format that stores only the voxels of the object surface in a sparse voxel grid. Each voxel contains local geometry (such as mesh vertices) and material properties. Both the conversion of the mesh to O-Voxel on the CPU and the reverse transformation on the GPU are completed in seconds. Structured Sparse Latents utilize only about 10% of the total grid voxels, eliminating empty space operations, allowing the shape flow DiT and texture flow DiT to operate as sparse transformers. In contrast, the sparse structure flow DiT operates as a dense transformer.
LoRA-Based Selective Fine-Tuning Strategy: What to Freeze and What to Train
The success of fine-tuning depends on the selection of training targets. The guide follows these principles:
- Inject LoRA adapters only into Sparse Structure Flow DiT and Shape Flow DiT: Since these two DiTs control object shapes and geometry, they directly relate to improving detailed geometries like shoe soles.
- Freeze Texture Flow DiT: The GSO dataset provides only Diffuse Color Maps and lacks separate material maps (metallic, roughness, alpha). Since lighting effects are baked into the diffuse map, training on this target risks catastrophic forgetting by mislearning lighting as surface properties or overwriting existing knowledge.
- Consider dataset size: The small dataset uses only 188 out of a total of 1,030 objects in the GSO, making LoRA more suitable than full fine-tuning. Full fine-tuning is significantly more costly and can damage the pre-existing knowledge (Priors) that the model already performs well on.
LoRA configuration details:
- Total trainable adapter parameters: approximately 9.3 million (combined for both DiTs)
- Sparse Structure Flow DiT: Rank 8 adapter for attention and feedforward (MLP) layers
- Shape Flow DiT: Rank 16 adapter for attention layers
Rank determines the dimensions of the adapter matrix, with Rank 16 having more expressive capacity than Rank 8. The shape flow DiT handles higher resolution (512³) geometry, thus a higher rank was assigned.
Experimental Design: Validation with GSO Shoe Dataset
The experiments were conducted with a subset of 188 shoe objects from the Google Scanned Objects (GSO) dataset. The pre-trained TRELLIS.2 generated the overall shape of the shoes convincingly, but the sole geometry was inaccurate. After LoRA fine-tuning, qualitative and quantitative evaluations were performed to assess whether the sole shape had significantly improved.
Data preparation requirements:
- Upload mesh files to Hugging Face Hub
- Issue HF_TOKEN
- Access to DINOv3 model required (gated model)
The training infrastructure was executed on cloud GPUs using containerized workloads via Hugging Face Jobs. It can be reproduced identically in local GPU environments using the provided Docker commands. Both preprocessing (mesh → O-Voxel conversion, etc.) and training were performed within Jobs.
Implementation Infrastructure and Reproducibility Guide
Hugging Face provides fine-tuning scripts and container images in a public repository. They can be executed immediately with just a few specified parameters, and customization is supported by modifying the internal logic. Key reproducibility points include:
- PEFT library for LoRA adapter injection and training management
- Hugging Face Jobs: Execute container workloads on cloud GPUs (preprocessing and training)
- Local Docker: Reproduce the same environment if you have your own GPU cluster
- Pre-requisites: HF_TOKEN, DINOv3 access, upload dataset to Hub
This guide serves as a practical template for developers looking to apply 3D generation models in domains requiring strict geometric constraints, such as robotics, simulation, media, and entertainment.
Key Takeaways for Developers
The technical implications of this guide can be summarized in three points:
1. Modular pipeline design enables selective fine-tuning: Thanks to TRELLIS.2's separation of structure, geometry, and materials, it was possible to safely perform geometry-specialized fine-tuning even under dataset constraints (absence of material maps). Knowing which components to leave untouched is as crucial as knowing what to train when adapting a general-purpose model to a domain. 2. LoRA is a practical solution for adapting while preserving prior knowledge in small domain datasets. Attempting full fine-tuning with 188 samples poses a high risk of overfitting and catastrophic forgetting, but LoRA, which trains only about 9.3 million parameters, preserves existing capabilities (texture quality, etc.) while improving only the target geometry by freezing the pre-trained weights. 3. Unified latent representations and intermediate representations like O-Voxel determine the scalability of fine-tuning pipelines. O-Voxel enables transformations on both CPU and GPU in seconds, alleviating data preprocessing bottlenecks and simultaneously achieving training and inference efficiency through sparse tensor operations. This suggests that the computational affinity of intermediate representations should be considered in next-generation 3D model design.