mirror of
https://git.datalinker.icu/kijai/ComfyUI-Hunyuan3DWrapper.git
synced 2025-12-08 20:34:28 +08:00
update
This commit is contained in:
parent
17e58345bc
commit
f35870528f
@ -31,6 +31,8 @@ import trimesh
|
|||||||
|
|
||||||
from .models.vae import Latent2MeshOutput
|
from .models.vae import Latent2MeshOutput
|
||||||
|
|
||||||
|
import folder_paths
|
||||||
|
|
||||||
|
|
||||||
def load_mesh(path):
|
def load_mesh(path):
|
||||||
if path.endswith(".glb"):
|
if path.endswith(".glb"):
|
||||||
@ -65,7 +67,7 @@ def remove_floater(mesh: pymeshlab.MeshSet):
|
|||||||
|
|
||||||
def pymeshlab2trimesh(mesh: pymeshlab.MeshSet):
|
def pymeshlab2trimesh(mesh: pymeshlab.MeshSet):
|
||||||
# Create temp directory with explicit permissions
|
# 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)
|
os.makedirs(temp_dir, exist_ok=True)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -97,7 +99,7 @@ def pymeshlab2trimesh(mesh: pymeshlab.MeshSet):
|
|||||||
|
|
||||||
def trimesh2pymeshlab(mesh: trimesh.Trimesh):
|
def trimesh2pymeshlab(mesh: trimesh.Trimesh):
|
||||||
# Create temp directory with explicit permissions
|
# 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)
|
os.makedirs(temp_dir, exist_ok=True)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
5
nodes.py
5
nodes.py
@ -24,9 +24,6 @@ class Hy3DModelLoader:
|
|||||||
return {
|
return {
|
||||||
"required": {
|
"required": {
|
||||||
"model": (folder_paths.get_filename_list("diffusion_models"), {"tooltip": "These models are loaded from the 'ComfyUI/models/diffusion_models' -folder",}),
|
"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"
|
FUNCTION = "loadmodel"
|
||||||
CATEGORY = "Hunyuan3DWrapper"
|
CATEGORY = "Hunyuan3DWrapper"
|
||||||
|
|
||||||
def loadmodel(self, model, base_precision, load_device):
|
def loadmodel(self, model):
|
||||||
device = mm.get_torch_device()
|
device = mm.get_torch_device()
|
||||||
|
|
||||||
config_path = os.path.join(script_directory, "configs", "dit_config.yaml")
|
config_path = os.path.join(script_directory, "configs", "dit_config.yaml")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user