This commit is contained in:
kijai 2025-01-21 23:40:10 +02:00
parent 17e58345bc
commit f35870528f
2 changed files with 5 additions and 6 deletions

View File

@ -31,6 +31,8 @@ import trimesh
from .models.vae import Latent2MeshOutput
import folder_paths
def load_mesh(path):
if path.endswith(".glb"):
@ -65,7 +67,7 @@ def remove_floater(mesh: pymeshlab.MeshSet):
def pymeshlab2trimesh(mesh: pymeshlab.MeshSet):
# Create temp directory with explicit permissions
temp_dir = os.path.join(os.getcwd(), 'temp')
temp_dir = folder_paths.temp_directory
os.makedirs(temp_dir, exist_ok=True)
try:
@ -97,7 +99,7 @@ def pymeshlab2trimesh(mesh: pymeshlab.MeshSet):
def trimesh2pymeshlab(mesh: trimesh.Trimesh):
# Create temp directory with explicit permissions
temp_dir = os.path.join(os.getcwd(), 'temp')
temp_dir = folder_paths.temp_directory
os.makedirs(temp_dir, exist_ok=True)
try:

View File

@ -24,9 +24,6 @@ class Hy3DModelLoader:
return {
"required": {
"model": (folder_paths.get_filename_list("diffusion_models"), {"tooltip": "These models are loaded from the 'ComfyUI/models/diffusion_models' -folder",}),
"base_precision": (["fp32", "bf16"], {"default": "bf16"}),
"load_device": (["main_device", "offload_device"], {"default": "main_device"}),
},
}
@ -35,7 +32,7 @@ class Hy3DModelLoader:
FUNCTION = "loadmodel"
CATEGORY = "Hunyuan3DWrapper"
def loadmodel(self, model, base_precision, load_device):
def loadmodel(self, model):
device = mm.get_torch_device()
config_path = os.path.join(script_directory, "configs", "dit_config.yaml")