Skip to content

Conversation

liangxg787
Copy link

@liangxg787 liangxg787 commented Jul 29, 2025

【问题描述】目前代码环境配置都是在CUDA环境中,如何在macos中运行Hunyuan3D-2.1
【期望改进】在macos中运行Hunyuan3D-2.1
【完成方式】给出环境配置文档和代码

Summary of Changes

  1. Added README_for_apple_silicon.md with setup instructions for Apple Silicon.

  2. Added demo_for_apple_silicon.py as a usage example on Apple M-series chips.

  3. Added device parameter to gradio_app.py for hardware flexibility.

  4. Added compile_mesh_painter_for_apple_silicon.sh script for compiling on Apple Silicon.

  5. Introduced new CPU-specific scripts for building custom_rasterizer:

    • grid_neighbor_cpu.cpp
    • rasterizer_cpu.cpp
    • rasterizer_cpu.h
    • setup.py
  6. Added device parameter to textureGenPipeline.py.

  7. Added new parameter face_count in simplify_mesh_utils.py, compatible with the latest trimesh version. Because the trimesh==4.4.7 could not work on MacOS.

  8. Added requirements_for_apple_silicon.txt for environment setup on Apple Silicon.

Testing

  • Platform: Apple Silicon (Apple M-series chip)

Notes

  1. If you encounter a segmentation fault, it might be due to insufficient RAM on macOS.

  2. Running the rasterizer in Hunyuan3DPaintPipeline on CPU is significantly slower. It is recommended to either:

    • Use an alternative rasterization method (to-do), or
    • Run Hunyuan3DPaintPipeline on a GPU for better performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant