mirror of
https://git.datalinker.icu/kijai/ComfyUI-Hunyuan3DWrapper.git
synced 2025-12-13 23:04:33 +08:00
LoadCustomMesh
This commit is contained in:
parent
9f59f92943
commit
8fecedb105
23
nodes.py
23
nodes.py
@ -3,6 +3,7 @@ import torch
|
|||||||
from PIL import Image
|
from PIL import Image
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
import trimesh
|
||||||
|
|
||||||
from .hy3dgen.shapegen import Hunyuan3DDiTFlowMatchingPipeline, FaceReducer, FloaterRemover, DegenerateFaceRemover
|
from .hy3dgen.shapegen import Hunyuan3DDiTFlowMatchingPipeline, FaceReducer, FloaterRemover, DegenerateFaceRemover
|
||||||
|
|
||||||
@ -138,6 +139,28 @@ class DownloadAndLoadHy3DDelightModel:
|
|||||||
|
|
||||||
return (delight_pipe,)
|
return (delight_pipe,)
|
||||||
|
|
||||||
|
class LoadCustomMesh:
|
||||||
|
@classmethod
|
||||||
|
def INPUT_TYPES(s):
|
||||||
|
return {
|
||||||
|
"required": {
|
||||||
|
"glb": ("STRING", {"default": "", "tooltip": "The glb path with mesh to load. Tested only for now with other hunyuan3d-2 glbs"}),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RETURN_TYPES = ("HY3DMESH",)
|
||||||
|
RETURN_NAMES = ("mesh",)
|
||||||
|
OUTPUT_TOOLTIPS = ("The glb model with mesh to texturize.",)
|
||||||
|
|
||||||
|
FUNCTION = "main"
|
||||||
|
CATEGORY = "Hunyuan3DWrapper"
|
||||||
|
DESCRIPTION = "Encodes a text prompt using a CLIP model into an embedding that can be used to guide the diffusion model towards generating specific images."
|
||||||
|
|
||||||
|
def main(self, glb):
|
||||||
|
|
||||||
|
mesh = trimesh.load(glb, force="mesh")
|
||||||
|
|
||||||
|
return (mesh,)
|
||||||
|
|
||||||
class Hy3DDelightImage:
|
class Hy3DDelightImage:
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(s):
|
def INPUT_TYPES(s):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user