From 977213426fb32a5d4e054e698f013f15bd4cf97e Mon Sep 17 00:00:00 2001 From: Yu Wang Date: Sun, 30 Mar 2025 16:24:10 +0800 Subject: [PATCH] import torch first to load dll correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit when custom_rasterizer_kernel is imported before torch under cu128/python 3.12, the following error will raise: ImportError: DLL load failed while importing custom_rasterizer_kernel: 找不到指定的模块。 simply swapping these two imports will solve this issue --- hy3dgen/texgen/custom_rasterizer/custom_rasterizer/render.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hy3dgen/texgen/custom_rasterizer/custom_rasterizer/render.py b/hy3dgen/texgen/custom_rasterizer/custom_rasterizer/render.py index 743d4aa..eb237ac 100755 --- a/hy3dgen/texgen/custom_rasterizer/custom_rasterizer/render.py +++ b/hy3dgen/texgen/custom_rasterizer/custom_rasterizer/render.py @@ -22,8 +22,8 @@ # fine-tuning enabling code and other elements of the foregoing made publicly available # by Tencent in accordance with TENCENT HUNYUAN COMMUNITY LICENSE AGREEMENT. -import custom_rasterizer_kernel import torch +import custom_rasterizer_kernel def rasterize(pos, tri, resolution, clamp_depth=torch.zeros(0), use_depth_prior=0):