Comfyui_Hunyuan3D_EX

Comfyui_Hunyuan3D_EX
★ 7

Hunyuan3D兼容Trimesh替代PyTorch3D3D显示优化六视图输入
在ComfyUI中简化并优化Hunyuan3D的使用,去除PyTorch3D依赖改用Trimesh并提供更易安装的3D展示节点,便于处理六视图与网格数据。
💡 在ComfyUI流程中通过六视图和网格快速生成并展示3D模型。
🍴 1 Forks💻 Python🔄 2024-12-09
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/9d76119b2ef2
📦 requirements.txt
xatlas
trimesh
ipywidgets
IPython
stack_data
pure_eval
comm
libigl
rembg
imageio
PyMCubes
einops
jaxtyping
matplotlib
omegaconf
tqdm
SentencePiece
accelerate
open3d
workflow.png
📄 README

English | 简体中文

ComfyUI_Hunyuan3D_EX

The plugin mainly does some code optimization:

  • Optimized the internal code of Huyuan 3D, completely removed the Pytorch3d-related code and optimized it to Trimesh, which is a simple library to install. Note: Deleted the function of exporting animations and textures, which I think is very simple for 3D modelers.
  • Display part, considering that ComfyUI-3D-Pack library is very difficult to install, I optimized a version of the 3D display node based on ComfyUI-Flowty-TripoSR, which should solve most of the problems. However, I only tested it in my environment, so please feedback if there are any issues.
  • For the ComfyUI-run node of Huyuan 3D from Tencent, I optimized the running code of ComfyUI_Huyuan3D author.
  • Specific nodes:

  • EX_Hunyuan3DNode
  • sixImages: six view images, fixed size of 1024*1536, RGB format, Tencent Huyuan uses six view positions differently, if you want to use the six view images of other models, you need to convert them.
  • originalImages: original image, fixed size of 512*512, RGB format, it seems to have no effect on the model, adding it to the source code is a must, I don’t know what it’s used for during testing, it seems to have the same effect regardless of the image.
  • mesh: triMesh format 3D model.
  • other: other parameters, which are literally interpreted, enabling simplified model, and the maximum face number is useful.
  • EX_GenerateSixViews
  • rgba: An RGBA image format, the size of which should be a rectangle, otherwise it will be distorted, and the size should be over 1024 pixels. Comfyui itself has a function to mask an image to an RGBA image, which can be used to generate RGBA images.
  • sixImages: Six view images, output, one image, fixed size of 1024*1536, RGB format.
  • originalImages: Original images, output, one image, fixed size of 512*512, RGB format.
  • EX_TriMeshViewer
  • mesh: 3D model in triMesh format.
  • other: Other parameters, which are literal in meaning, are saved in the output folder.
  • EX_RemoveBackground
  • A very simple background removal node, takes an image as input and outputs an image with the background removed. The model can be customized, and the specific model can be downloaded from the RemBg author’s model download link.

  • EX_SquareImage
  • The nodes created by ComfyUI_Huyuan3D author have not been adjusted.

    Work flow

    Reference materials

  • Tencent/Hunyuan3D-1 – A Unified Framework for Text-to-3D and Image-to-3D Generation
  • ComfyUI_Huyuan3D – This is a custom node to support hunyuan3D in comfyui.
  • ComfyUI-Flowty-TripoSR – This is a custom node that lets you use TripoSR right from ComfyUI.