Spaces:
Runtime error
Runtime error
Commit ·
4cd032d
1
Parent(s): edf8619
Remove kaolin
Browse filesFiles changed (4)
1234513 unmodified lines19202122232425--extra-index-url https://download.pytorch.org/whl/cu121--find-links https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.4.0_cu121.htmltorch==2.4.0torchvision==0.19.013 unmodified linesigraph==0.11.8git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8xformers==0.0.27.post2kaolin==0.17.0spconv-cu120==2.3.6transformers==4.46.3gradio_litmodel3d==0.0.1123413 unmodified lines181920212223--extra-index-url https://download.pytorch.org/whl/cu121torch==2.4.0torchvision==0.19.013 unmodified linesigraph==0.11.8git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8xformers==0.0.27.post2spconv-cu120==2.3.6transformers==4.46.3gradio_litmodel3d==0.0.1
5 unmodified lines6789101112131415165 unmodified lines# distribution of this software and related documentation without an express# license agreement from NVIDIA CORPORATION & AFFILIATES is strictly prohibited.import torchtry:import kaolin as kalimport nvdiffrast.torch as drexcept :print("Kaolin and nvdiffrast are not installed. Please install them to use the mesh renderer.")from easydict import EasyDict as edictfrom ..representations.mesh import MeshExtractResultimport torch.nn.functional as F5 unmodified lines67891011125 unmodified lines# distribution of this software and related documentation without an express# license agreement from NVIDIA CORPORATION & AFFILIATES is strictly prohibited.import torchimport nvdiffrast.torch as drfrom easydict import EasyDict as edictfrom ..representations.mesh import MeshExtractResultimport torch.nn.functional as F
8 unmodified lines91011121314151617188 unmodified linesfrom ...modules.sparse import SparseTensorfrom easydict import EasyDict as edictfrom .utils_cube import *try:from .flexicube import FlexiCubesexcept:print("Please install kaolin and diso to use the mesh extractor.")class MeshExtractResult:8 unmodified lines91011121314158 unmodified linesfrom ...modules.sparse import SparseTensorfrom easydict import EasyDict as edictfrom .utils_cube import *from .flexicube import FlexiCubesclass MeshExtractResult:
7 unmodified lines89101112131434 unmodified lines4950515253545556575859606162636465666768697071727374757677787 unmodified linesimport torchfrom .tables import *from kaolin.utils.testing import check_tensor__all__ = ['FlexiCubes'34 unmodified linesdef __call__(self, voxelgrid_vertices, scalar_field, cube_idx, resolution, qef_reg_scale=1e-3,weight_scale=0.99, beta=None, alpha=None, gamma_f=None, voxelgrid_colors=None, training=False):assert torch.is_tensor(voxelgrid_vertices) and \check_tensor(voxelgrid_vertices, (None, 3), throw=False), \"'voxelgrid_vertices' should be a tensor of shape (num_vertices, 3)"num_vertices = voxelgrid_vertices.shape[0]assert torch.is_tensor(scalar_field) and \check_tensor(scalar_field, (num_vertices,), throw=False), \"'scalar_field' should be a tensor of shape (num_vertices,)"assert torch.is_tensor(cube_idx) and \check_tensor(cube_idx, (None, 8), throw=False), \"'cube_idx' should be a tensor of shape (num_cubes, 8)"num_cubes = cube_idx.shape[0]assert beta is None or (torch.is_tensor(beta) andcheck_tensor(beta, (num_cubes, 12), throw=False)), "'beta' should be a tensor of shape (num_cubes, 12)"assert alpha is None or (torch.is_tensor(alpha) andcheck_tensor(alpha, (num_cubes, 8), throw=False)), "'alpha' should be a tensor of shape (num_cubes, 8)"assert gamma_f is None or (torch.is_tensor(gamma_f) andcheck_tensor(gamma_f, (num_cubes,), throw=False)), "'gamma_f' should be a tensor of shape (num_cubes,)"surf_cubes, occ_fx8 = self._identify_surf_cubes(scalar_field, cube_idx)if surf_cubes.sum() == 0:return (7 unmodified lines891011121334 unmodified lines4849505152537 unmodified linesimport torchfrom .tables import *__all__ = ['FlexiCubes'34 unmodified linesdef __call__(self, voxelgrid_vertices, scalar_field, cube_idx, resolution, qef_reg_scale=1e-3,weight_scale=0.99, beta=None, alpha=None, gamma_f=None, voxelgrid_colors=None, training=False):surf_cubes, occ_fx8 = self._identify_surf_cubes(scalar_field, cube_idx)if surf_cubes.sum() == 0:return (
requirements.txt-2
trellis/renderers/mesh_renderer.py+1-5
trellis/representations/mesh/cube2mesh.py+1-4
trellis/representations/mesh/flexicube.py-25