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.

@PeteHaughie
Copy link

Can you tell me what Python version you're running to build this because I can't find release which satisfies both scipy 1.14.1 and bpy 4.0

@liangxg787
Copy link
Author

Can you tell me what Python version you're running to build this because I can't find release which satisfies both scipy 1.14.1 and bpy 4.0

Python 3.10.18

@PeteHaughie
Copy link

Then something has changed requirements since you made this pull request. The following was captured from 3.10.18

ERROR: Ignored the following versions that require a different python version: 1.16.0 Requires-Python >=3.11; 1.16.0rc1 Requires-Python >=3.11; 1.16.0rc2 Requires-Python >=3.11; 1.16.1 Requires-Python >=3.11; 1.16.2 Requires-Python >=3.11; 1.6.2 Requires-Python >=3.7,<3.10; 1.6.3 Requires-Python >=3.7,<3.10; 1.7.0 Requires-Python >=3.7,<3.10; 1.7.1 Requires-Python >=3.7,<3.10; 2.3.0 Requires-Python >=3.11; 2.3.1 Requires-Python >=3.11; 2.3.2 Requires-Python >=3.11; 2.3.3 Requires-Python >=3.11; 2.3.4 Requires-Python >=3.11
ERROR: Could not find a version that satisfies the requirement bpy==4.0 (from versions: none)
ERROR: No matching distribution found for bpy==4.0

There is no available overlap between the python versions required by scipy and bpy.

@liangxg787
Copy link
Author

Then something has changed requirements since you made this pull request. The following was captured from 3.10.18

ERROR: Ignored the following versions that require a different python version: 1.16.0 Requires-Python >=3.11; 1.16.0rc1 Requires-Python >=3.11; 1.16.0rc2 Requires-Python >=3.11; 1.16.1 Requires-Python >=3.11; 1.16.2 Requires-Python >=3.11; 1.6.2 Requires-Python >=3.7,<3.10; 1.6.3 Requires-Python >=3.7,<3.10; 1.7.0 Requires-Python >=3.7,<3.10; 1.7.1 Requires-Python >=3.7,<3.10; 2.3.0 Requires-Python >=3.11; 2.3.1 Requires-Python >=3.11; 2.3.2 Requires-Python >=3.11; 2.3.3 Requires-Python >=3.11; 2.3.4 Requires-Python >=3.11
ERROR: Could not find a version that satisfies the requirement bpy==4.0 (from versions: none)
ERROR: No matching distribution found for bpy==4.0

There is no available overlap between the python versions required by scipy and bpy.

I think you can try to remove the version number and then install scipy and bpy.

@PeteHaughie
Copy link

After removing the pinned version numbers I was able to install with 3.11.13 as scipy wants a higher version than 13.10 now.

I did get a segmentation fault on an M2 with 32GB though which came as a surprise.

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.

2 participants