Hunyuan3D-2.1 / QUALITY_IMPROVEMENTS.md
asimfayaz's picture
Tweaked generation parameters and background removal
2c70ce8

A newer version of the Gradio SDK is available: 5.44.1

Upgrade

Hunyuan3D-2.1 Quality Improvements

This document summarizes the quality improvements made to the Hunyuan3D-2.1 model settings to achieve better generation results.

Changes Made

1. Inference Steps

  • Before: 30-50 steps (default)
  • After: 75 steps (default)
  • Impact: More detailed and refined 3D generation

2. Guidance Scale

  • Before: 7.5 (default)
  • After: 9.0 (default)
  • Impact: Better adherence to input prompts and reference images

3. Octree Resolution

  • Before: 256 (default)
  • After: 384 (default)
  • Impact: Higher resolution mesh generation with more detail

4. Texture Generation

  • Before: 8 views, 768 resolution
  • After: 9 views, 768 resolution
  • Impact: Better texture quality with more view angles

Files Modified

gradio_app.py

  • Updated default parameters in all generation functions:
    • _gen_shape()
    • generation_all()
    • shape_generation()
    • process_generation_job()
  • Updated UI slider defaults:
    • Inference Steps: 30 → 75
    • Octree Resolution: 256 → 384
    • Guidance Scale: 5.0 → 9.0

demo.py

  • Updated shape generation call with improved parameters
  • Updated texture generation settings:
    • Max views: 6 → 9
    • Resolution: 512 → 768

hy3dshape/minimal_demo.py

  • Updated shape generation call with improved parameters

Quality vs Performance Trade-offs

Improved Quality

  • Higher inference steps (75) provide more detailed generation
  • Higher guidance scale (9.0) ensures better prompt adherence
  • Higher octree resolution (384) creates more detailed meshes
  • More texture views (9) provide better texture coverage

Performance Impact

  • Memory Usage: Increased due to higher resolution and more steps
  • Generation Time: ~2-3x longer due to increased inference steps
  • GPU Requirements: Higher VRAM usage recommended

Recommended Hardware

For optimal performance with these quality settings:

  • GPU: NVIDIA RTX 3080 or better (12GB+ VRAM)
  • Memory: 16GB+ system RAM
  • Storage: SSD recommended for faster model loading

Polycount Recommendations by Use Case

When Lower Polycount is Better:

Use Case Recommended Faces Benefits
Web/Real-time 1,000 - 5,000 Faster rendering, smaller files
Mobile VR/AR 5,000 - 15,000 Better performance, battery life
Desktop VR 15,000 - 30,000 Smooth frame rates
Product Visualization 30,000 - 50,000 Good quality, reasonable performance
3D Printing 50,000 - 100,000 Maximum detail for physical models
Film/Animation 100,000+ Professional quality

Updated Model Settings:

  • Initial generation: ~200,000 faces (very high detail)
  • Face reduction: 15,000 faces (optimized for performance)
  • Texture generation: 15,000 faces (optimized for performance)
  • UI default: 15,000 faces (user-adjustable)

Performance Benefits:

  • 2-3x faster rendering compared to 40,000 faces
  • 5-10x smaller file sizes (1-5MB vs 10-50MB)
  • Better compatibility across devices and platforms
  • Lower memory usage and faster loading times

Usage Notes

  1. For High-End GPUs: These settings provide maximum quality
  2. For Mid-Range GPUs: Consider reducing steps to 50-60 if experiencing memory issues
  3. For Low-End GPUs: May need to reduce octree resolution to 256 and steps to 30-40
  4. For Web/Mobile: The new 15,000 face default provides optimal performance

Reverting Changes

If you need to revert to the original settings for performance reasons, you can modify the values back to:

  • steps=30
  • guidance_scale=7.5
  • octree_resolution=256
  • max_num_view=6 (for texture generation)
  • max_facenum=40000 (original high detail)