renamed mesh_processor

This commit is contained in:
DenisKochetov
2025-09-01 13:04:58 +02:00
parent 9ab02eb440
commit ae3156305d
14 changed files with 19 additions and 1606 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ from CRM.util.renderer import Renderer
from CRM.model.archs.mlp_head import SdfMlp, RgbMlp
import xatlas
from mesh_processer.mesh import Mesh
from mesh_processor.mesh import Mesh
class Dummy:
@@ -1,7 +1,6 @@
from setuptools import setup, find_packages
import platform
# Определяем платформу для правильного именования wheel
if platform.system() == "Windows":
plat_name = "win_amd64"
elif platform.system() == "Darwin":
@@ -13,14 +12,14 @@ setup(
name="mesh_inpaint_processor",
version="1.0.0",
description="Fast C++ mesh inpainting processor with Python fallback",
long_description="Компилированный модуль для быстрой обработки инпейнтинга мешей",
long_description="Compiled module for fast mesh inpainting processing",
author="Hunyuan3D Team",
packages=find_packages(),
package_data={
'mesh_inpaint_processor': [
'*.pyd', # Включаем .pyd файлы
'*.so', # На случай Linux версии
'*.py' # Python fallback файлы
'*.pyd',
'*.so', # For Linux version
'*.py' # Python fallback files
]
},
include_package_data=True,
@@ -41,7 +40,6 @@ setup(
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
],
# Указываем что это binary distribution
zip_safe=False,
has_ext_modules=lambda: True, # Указывает что есть нативные модули
has_ext_modules=lambda: True,
)
@@ -15,8 +15,8 @@ from kiui.op import inverse_sigmoid
from kiui.cam import orbit_camera, get_perspective
from kiui.nn import MLP, trunc_exp
from mesh_processer.mesh import Mesh
from mesh_processer.mesh_utils import marching_cubes_density_to_mesh, color_func_to_albedo
from mesh_processor.mesh import Mesh
from mesh_processor.mesh_utils import marching_cubes_density_to_mesh, color_func_to_albedo
from LGM.core.options import Options
from LGM.core.gs import GaussianRenderer
from LGM.core.utils import get_rays
@@ -540,7 +540,7 @@ def prepare_tg2mv_pipeline(
if hasattr(pipe, 'enable_model_cpu_offload'):
if not use_mmgp:
pipe.enable_model_cpu_offload()
print("[INFO] Включен CPU offload для экономии VRAM")
print("[INFO] CPU offload for memory optimization")
if use_mmgp and MMGP_AVAILABLE:
torch.cuda.empty_cache()
@@ -13,7 +13,7 @@ from ..utils.ops import scale_tensor
from .networks import MLP
from einops import rearrange, reduce
from mesh_processer.mesh_utils import construct_list_of_gs_attributes, write_gs_ply
from mesh_processor.mesh_utils import construct_list_of_gs_attributes, write_gs_ply
inverse_sigmoid = lambda x: np.log(x / (1 - x))
+1 -1
View File
@@ -4,7 +4,7 @@ import torch
import torch.nn as nn
from mcubes import marching_cubes
from mesh_processer.mesh_utils import switch_vector_axis
from mesh_processor.mesh_utils import switch_vector_axis
class IsosurfaceHelper(nn.Module):
@@ -12,7 +12,7 @@ from pytorch3d.renderer import (
FoVOrthographicCameras,
)
from pytorch3d.renderer import MeshRasterizer
from mesh_processer.mesh import Mesh
from mesh_processor.mesh import Mesh
def get_camera(world_to_cam, fov_in_degrees=60, focal_length=1 / (2**0.5), cam_type='fov'):
# pytorch3d expects transforms as row-vectors, so flip rotation: https://github.com/facebookresearch/pytorch3d/issues/1183