comput3ai/c3-trellis-gradio

0

stars

0

commits

Python

primary language

Jul 4, 2025

updated

README

๐ŸŽจ C3-TRELLIS-Gradio

A comprehensive comparison and implementation of different TRELLIS model variants for 3D asset generation from images. This project analyzes and consolidates multiple TRELLIS implementations to create an optimized Gradio interface.

๐ŸŽฏ Project Overview

This project examines four different TRELLIS implementations:

  • ๐Ÿ”ง FurkanGozukara-TRELLIS: Extended implementation with API and additional features
  • โšก TRELLIS-Imagen3D: Simplified, working implementation by cavargas10
  • ๐ŸŽฏ TRELLIS-innoai: Multi-image support with both single and multi-image tabs
  • ๐ŸŒ microsoft-TRELLIS: The original official implementation

The main contribution is creating a unified app.py for TRELLIS-innoai that combines the best features from all implementations while removing unnecessary dependencies.

๐Ÿš€ Key Features

โœจ Unified Implementation

  • ๐ŸŽญ Dual-mode interface: Single image and multi-image 3D generation in one app
  • ๐Ÿ”ง No LitModel3D dependency: Uses standard Gradio components for better compatibility
  • โœ‚๏ธ Split image functionality: Automatically splits concatenated multi-view images
  • โœจ Clean UI: Based on the working TRELLIS-Imagen3D interface design

๐Ÿ–ผ๏ธ Multi-Image Support

  • ๐Ÿ“ท Upload multiple views of the same object for improved 3D reconstruction
  • ๐ŸŽฒ Supports both stochastic and multidiffusion algorithms
  • ๐Ÿงช Experimental feature that works best with consistent object views

๐Ÿ“ฆ Export Options

  • ๐ŸŽฎ GLB files: Industry-standard 3D format with texture
  • โœจ Gaussian splats: PLY format for 3D Gaussian representation
  • ๐Ÿ›๏ธ Adjustable mesh simplification and texture resolution

๐Ÿ“‹ Implementation Details

๐Ÿ”„ Key Changes Made

  1. ๐Ÿšซ Removed gradio_litmodel3d dependency: Replaced with standard gr.Model3D
  2. โœ… Preserved split_image functionality: Essential for processing multi-view images
  3. ๐Ÿ”— Unified configuration: Server runs on 0.0.0.0:7860 like Imagen3D
  4. ๐Ÿงค Simplified codebase: Removed unnecessary docstrings while maintaining functionality

โš™๏ธ Technical Architecture

# Core pipeline configuration
pipeline = TrellisImageTo3DPipeline.from_pretrained("jetx/trellis-image-large")
pipeline.cuda()

# Two-stage generation process
# Stage 1: Sparse Structure Generation (guidance: 7.5, steps: 12)
# Stage 2: Detail Enhancement (guidance: 3.0, steps: 12)

๐Ÿ”ง Installation

  1. Clone the repository:
git clone https://github.com/yourusername/c3-trellis-gradio.git
cd c3-trellis-gradio
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application:
python app.py

The application will be available at http://localhost:7860

๐Ÿ† Honorable Mentions

This project builds upon and references several TRELLIS implementations:

๐Ÿ›๏ธ Original Implementation

๐Ÿค— Hugging Face Spaces

๐Ÿง  Model Weights

๐Ÿ’ก Usage Example

import os
os.environ['SPCONV_ALGO'] = 'native'

from PIL import Image
from trellis.pipelines import TrellisImageTo3DPipeline
from trellis.utils import render_utils, postprocessing_utils

# Load pipeline
pipeline = TrellisImageTo3DPipeline.from_pretrained("jetx/trellis-image-large")
pipeline.cuda()

# Single image generation
image = Image.open("path/to/image.png")
outputs = pipeline.run(image, seed=1)

# Extract outputs
glb = postprocessing_utils.to_glb(
    outputs['gaussian'][0],
    outputs['mesh'][0],
    simplify=0.95,
    texture_size=1024
)
glb.export("output.glb")

๐Ÿ› ๏ธ Project Structure

c3-trellis-gradio/
โ”œโ”€โ”€ TRELLIS-innoai/          # Unified implementation
โ”‚   โ”œโ”€โ”€ app.py               # Main Gradio interface
โ”‚   โ”œโ”€โ”€ requirements.txt     # Dependencies (no litmodel3d)
โ”‚   โ””โ”€โ”€ assets/              # Example images
โ”œโ”€โ”€ TRELLIS-Imagen3D/        # Reference implementation
โ”œโ”€โ”€ FurkanGozukara-TRELLIS/  # Extended features
โ””โ”€โ”€ microsoft-TRELLIS/       # Original implementation

๐Ÿ“„ License

This project is licensed under the MIT License, following the original TRELLIS licensing.

๐Ÿ™ Acknowledgments

Special thanks to:

  • ๐Ÿ’™ The Microsoft Research team for creating TRELLIS
  • โญ cavargas10 for the clean Imagen3D implementation
  • ๐ŸŒŸ innoai for the multi-image support implementation
  • ๐Ÿค— The Hugging Face community for hosting the demos and models

๐Ÿ“œ Citation

If you use this project, please cite the original TRELLIS paper:

@article{xiang2024structured,
    title   = {Structured 3D Latents for Scalable and Versatile 3D Generation},
    author  = {Xiang, Jianfeng and Lv, Zelong and Xu, Sicheng and Deng, Yu and Wang, Ruicheng and Zhang, Bowen and Chen, Dong and Tong, Xin and Yang, Jiaolong},
    journal = {arXiv preprint arXiv:2412.01506},
    year    = {2024}
}

comput3ai/c3-trellis-gradio

0

stars

0

commits

Python

primary language

Jul 4, 2025

updated

README

๐ŸŽจ C3-TRELLIS-Gradio

A comprehensive comparison and implementation of different TRELLIS model variants for 3D asset generation from images. This project analyzes and consolidates multiple TRELLIS implementations to create an optimized Gradio interface.

๐ŸŽฏ Project Overview

This project examines four different TRELLIS implementations:

  • ๐Ÿ”ง FurkanGozukara-TRELLIS: Extended implementation with API and additional features
  • โšก TRELLIS-Imagen3D: Simplified, working implementation by cavargas10
  • ๐ŸŽฏ TRELLIS-innoai: Multi-image support with both single and multi-image tabs
  • ๐ŸŒ microsoft-TRELLIS: The original official implementation

The main contribution is creating a unified app.py for TRELLIS-innoai that combines the best features from all implementations while removing unnecessary dependencies.

๐Ÿš€ Key Features

โœจ Unified Implementation

  • ๐ŸŽญ Dual-mode interface: Single image and multi-image 3D generation in one app
  • ๐Ÿ”ง No LitModel3D dependency: Uses standard Gradio components for better compatibility
  • โœ‚๏ธ Split image functionality: Automatically splits concatenated multi-view images
  • โœจ Clean UI: Based on the working TRELLIS-Imagen3D interface design

๐Ÿ–ผ๏ธ Multi-Image Support

  • ๐Ÿ“ท Upload multiple views of the same object for improved 3D reconstruction
  • ๐ŸŽฒ Supports both stochastic and multidiffusion algorithms
  • ๐Ÿงช Experimental feature that works best with consistent object views

๐Ÿ“ฆ Export Options

  • ๐ŸŽฎ GLB files: Industry-standard 3D format with texture
  • โœจ Gaussian splats: PLY format for 3D Gaussian representation
  • ๐Ÿ›๏ธ Adjustable mesh simplification and texture resolution

๐Ÿ“‹ Implementation Details

๐Ÿ”„ Key Changes Made

  1. ๐Ÿšซ Removed gradio_litmodel3d dependency: Replaced with standard gr.Model3D
  2. โœ… Preserved split_image functionality: Essential for processing multi-view images
  3. ๐Ÿ”— Unified configuration: Server runs on 0.0.0.0:7860 like Imagen3D
  4. ๐Ÿงค Simplified codebase: Removed unnecessary docstrings while maintaining functionality

โš™๏ธ Technical Architecture

# Core pipeline configuration
pipeline = TrellisImageTo3DPipeline.from_pretrained("jetx/trellis-image-large")
pipeline.cuda()

# Two-stage generation process
# Stage 1: Sparse Structure Generation (guidance: 7.5, steps: 12)
# Stage 2: Detail Enhancement (guidance: 3.0, steps: 12)

๐Ÿ”ง Installation

  1. Clone the repository:
git clone https://github.com/yourusername/c3-trellis-gradio.git
cd c3-trellis-gradio
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application:
python app.py

The application will be available at http://localhost:7860

๐Ÿ† Honorable Mentions

This project builds upon and references several TRELLIS implementations:

๐Ÿ›๏ธ Original Implementation

๐Ÿค— Hugging Face Spaces

๐Ÿง  Model Weights

๐Ÿ’ก Usage Example

import os
os.environ['SPCONV_ALGO'] = 'native'

from PIL import Image
from trellis.pipelines import TrellisImageTo3DPipeline
from trellis.utils import render_utils, postprocessing_utils

# Load pipeline
pipeline = TrellisImageTo3DPipeline.from_pretrained("jetx/trellis-image-large")
pipeline.cuda()

# Single image generation
image = Image.open("path/to/image.png")
outputs = pipeline.run(image, seed=1)

# Extract outputs
glb = postprocessing_utils.to_glb(
    outputs['gaussian'][0],
    outputs['mesh'][0],
    simplify=0.95,
    texture_size=1024
)
glb.export("output.glb")

๐Ÿ› ๏ธ Project Structure

c3-trellis-gradio/
โ”œโ”€โ”€ TRELLIS-innoai/          # Unified implementation
โ”‚   โ”œโ”€โ”€ app.py               # Main Gradio interface
โ”‚   โ”œโ”€โ”€ requirements.txt     # Dependencies (no litmodel3d)
โ”‚   โ””โ”€โ”€ assets/              # Example images
โ”œโ”€โ”€ TRELLIS-Imagen3D/        # Reference implementation
โ”œโ”€โ”€ FurkanGozukara-TRELLIS/  # Extended features
โ””โ”€โ”€ microsoft-TRELLIS/       # Original implementation

๐Ÿ“„ License

This project is licensed under the MIT License, following the original TRELLIS licensing.

๐Ÿ™ Acknowledgments

Special thanks to:

  • ๐Ÿ’™ The Microsoft Research team for creating TRELLIS
  • โญ cavargas10 for the clean Imagen3D implementation
  • ๐ŸŒŸ innoai for the multi-image support implementation
  • ๐Ÿค— The Hugging Face community for hosting the demos and models

๐Ÿ“œ Citation

If you use this project, please cite the original TRELLIS paper:

@article{xiang2024structured,
    title   = {Structured 3D Latents for Scalable and Versatile 3D Generation},
    author  = {Xiang, Jianfeng and Lv, Zelong and Xu, Sicheng and Deng, Yu and Wang, Ruicheng and Zhang, Bowen and Chen, Dong and Tong, Xin and Yang, Jiaolong},
    journal = {arXiv preprint arXiv:2412.01506},
    year    = {2024}
}

Languages

Python

46.5%

C++

33.8%

Cuda

16.9%

C

2.5%