jtydhr88 / ComfyUI-Unique3D

ComfyUI Unique3D is custom nodes that running AiuniAI/Unique3D into ComfyUI
Apache License 2.0
192 stars 13 forks source link

(this repo is archived, since ComfyUI-3D-Pack has other implemented for Unique3D, please refer to https://github.com/MrForExample/ComfyUI-3D-Pack.git)

ComfyUI Unique3D

ComfyUI Unique3D is custom nodes that running AiuniAI/Unique3D into ComfyUI

1

!!It is highly recommend that downloads a new ComfyUI bundle to try this!!

(Windows) VS Build Tool- Setup

It might require Visual Studio Build Tools. However, I am not sure because my local already installed previously. If it needs, you can find from Visual Studio Build Tools.

ComfyUI 3D Pack - Setup

  1. git clone https://github.com/MrForExample/ComfyUI-3D-Pack.git in custom_notes folder
  2. run install_windows_portable_win_py311_cu121.bat inside ComfyUI-3D-Pack
  3. run ComfyUI (run_nvidia_gpu.bat) to check 3D-Pack installed successfully.
    1. (On my local, it has error) pytorch3d import _C - ImportError: DLL load failed while importing _C: 找不到指定的程序
      1. {comfyUI_python_embeded}\python.exe -m pip uninstall pytorch3d
      2. {comfyUI_python_embeded}\python.exe -m pip install git+https://github.com/facebookresearch/pytorch3d.git@stable
    2. (On my local, it has error) python.exe 无法找到入口,_catter_cuda.pyd
      1. {comfyUI_python_embeded}\python.exe -m pip uninstall torch_scatter
      2. {comfyUI_python_embeded}\python.exe -m pip install torch_scatter
    3. run ComfyUI to check again.

please refer ComfyUI-3D-Pack for more details

ComfyUI Unique3D - Setup

  1. git clone https://github.com/jtydhr88/ComfyUI-Unique3D.git in custom_notes folder
  2. (Windows) Download the trition whl from https://huggingface.co/madbuda/triton-windows-builds, because it uses python 311, so download whl build for py311 and place it under ComfyUI-Unique3D folder.
  3. (Windows) run install_windows_portable_win_py311_cu121.bat inside ComfyUI-Unique3D
    1. answer Y while asking remove something
  4. Download the weights from huggingface spaces or Tsinghua Cloud Drive, and extract it to ckpt/*.
    ComfyUI-Unique3D
    ├──ckpt
        ├── controlnet-tile/
        ├── image2normal/
        ├── img2mvimg/
        ├── realesrgan-x4.onnx
        └── v1-inference.yaml

Runtime

  1. The output folder is your ComfyUI/output/Unique3D/
  2. You might see the error of onnxruntime, but it would not affect the generation of the mesh (maybe?)
    1. If you want to fix this the TensorRT error, you need to download TensorRT bundle for windows from https://github.com/NVIDIA/TensorRT, and configure TensorRT-10.0.1.6\lib in your PATH env variable. meanwhile it also needs to configure CUDA and cuDNN, please refer to github page for more details.

Workflow

I provided one example workflow, see example-workflow1

Another workflow I provided - example-workflow2, generate 3D mesh from ComfyUI generated image, it requires:

  1. Main checkpoint - ReV Animated
  2. Lora - Clay Render Style

It will generate gypsum style 3D model: example-workflow2

Node Explain

Currently, it has three custom nodes.

Unique3DLoadPipeline

TODO

Unique3DRun - MVPrediction

TODO

Unique3DRun - Geo Reconstruct

TODO

Credit

My extensions for ComfyUI

My extensions for stable diffusion webui