/Comfy3D-WinPortable

🧊ComfyUI-3D-Pack pre-built for Windows. | Comfy3D 整合包

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Comfy3D Windows Portable

Screenshot

A semi-portable package dedicated for running ComfyUI-3D-Pack on Windows.

What Can It Do?

This build, pt24-cu121, is based on PyTorch 2.4.0 with CUDA 12.1, targeting the Oct 18, 2024 version of ComfyUI-3D-Pack. Workflows that are "too new" or "too old" are not supported in this build.

I have tested all the example workflows on a fairly-old TITAN Xp GPU (12GB VRAM). The results are as follows:

Workflow Status Screenshot Memo

CharacterGen_Vanilla

🆗

🖼️

CharacterGen_to_Unique3D

🆗

🖼️

CharacterGen_InstantMesh

Out of memory at "InstantMesh Reconstruction Model" node.

CRM MVDiffusion_to_Craftsman

🆗

🖼️

CRM MVDiffusion_to_Unique3D

🆗

🖼️

CRM_Img_to_Multi-views_to_CCMs_to_Mesh

🆗

🖼️

CRM MVDiffusion_to_InstantMesh

PyTorch version incompatible.

CRM_T2I_V2
CRM_T2I_V3

Model not released yet.

Unique3D_All_Stages

🆗

🖼️

As well as Unique3D stage 0 to 3.

Unique3D_with_Era3D_All

PyTorch version incompatible.

[FlexiCubes] Multi-View Depth plus Optional Normal maps to 3D Mesh

🆗

🖼️

Era3D_to_InstantMesh

PyTorch version incompatible.

Multi-View-Images_to_Instant-NGP_to_ DiffRast_to_3DMesh

Throwing ('NoneType' object has no attribute 'ray_aabb_intersect') at "Instant NGP" node.

MVDream_to_Large_Multiview_Gaussian_ Model_to_3DGS and_3DMesh

Throwing ('NoneType' object has no attribute 'ray_aabb_intersect') at "Convert 3DGS to Mesh with NeRF and Marching Cubes" node.

Render_Mesh_and_3DGS_Example

🆗

🖼️

StableFast3D_to_Mesh

🆗

🖼️

Triplane_Gaussian_Transformers_to_ 3DGS_and_3DMesh

Throwing ('NoneType' object has no attribute 'ray_aabb_intersect') at "Convert 3DGS to Mesh with NeRF and Marching Cubes" node.

TripoSR_to_Mesh

🆗

🖼️

The "easy" model that always works.

Using_Stack_Orbit_Camera_Poses_ to_conditioning_StableZero123

🆗

🖼️

Wonder3D_to_Large_Multiview_ Gaussian_Model_to_3DGS and_3DMesh

Throwing ('NoneType' object has no attribute 'ray_aabb_intersect') at "Convert 3DGS to Mesh with NeRF and Marching Cubes" node.

Zero123Plus_to_InstantMesh

🆗

🖼️

Before You Go

Few things I want to mention first, that may save you A LOT of time…​

  1. If you’re looking for Stable Fast 3D, which generate 3D-mesh from single image, just use StableFast3D-WinPortable. It does only one thing and does it well.

  2. Everything in Comfy3D works more smoothly on Linux, as well as WSL2. Most 3D workflows are research-oriented and far from production-ready. By installing & running them you’re essentially replicating the development environment used by researchers. Many components need to be compiled before running, and this is exactly where Linux excels. Check out my Docker image if you’re familiar with containers.

  3. Know your GPU’s CUDA arch number. For example, RTX 2080 is 7.5, RTX 3090 is 8.6 and RTX 4090 is 8.9. You can find the number in this article.

Download, Install, Compile and Run

1. Basic Requirements

1.1. Install CUDA Toolkit 12.1.1 or CUDA Toolkit 12.4.1. Both are fine, choose 12.4.1 if you have other newer ComfyUI instances.

  • Only Libraries and Compilers are needed to install.

  • If your GPU driver is outdated (<530 for CUDA 12.1, <550 for CUDA 12.4), you can install the driver provided by the CUDA Toolkit installer. Otherwise, you don’t need to downgrade the driver version.

1.2. Install Visual Studio Build Tools 2022 ( Page | EXE ).

  • During the setup, select "Desktop development with C++" workload.

2. Download and Config

2.1. Download the package files from the release page:

2.2. Edit !FIRST_RUN-compile-install.bat

You can see the line:

set TORCH_CUDA_ARCH_LIST=6.1+PTX

Edit it according to your GPU arch. For example, for RTX 4060 Ti, it should be:

set TORCH_CUDA_ARCH_LIST=8.9

2.3. Edit run.bat

You can see the line:

set TORCH_CUDA_ARCH_LIST=5.2+PTX;6.0;6.1+PTX;7.5;8.0;8.6;8.9+PTX

Edit it like you just did in the last step.

There are few more settings available in this start script, such as:

  • Set proxy

  • Do not open browser after starting

Each line of configuration has a description above it. If needed, uncomment the according line (remove `rem ` at the beginning), edit it and save the file.

3. (Optional) Extra Config

3.1. The ComfyUI-Manager and AIGODLIKE-ComfyUI-Translation are installed but disabled. If you really want to use them, in ComfyUI\custom_nodes folder, rename them, remove the trailing .disabled so they will be loaded on start.

  • ComfyUI-Manager may damage the dependencies of Comfy3D, so it’s disabled by default.

  • AIGODLIKE-ComfyUI-Translation is for multilingual translation of ComfyUI.

3.2. If you want to use Sandboxie to isolate this instance, the following steps should be executed in a sandbox. In addition, I recommend to set the program folder (Comfy3D_WinPortable) to "Full Access" under "Sandbox Settings - Resource Access", to improve disk I/O.

4. First Start

4.1. Run !FIRST_RUN-compile-install.bat. Wait until it finish installation. If it fails, simply try again.

4.2. If you are going to run Unique3D workflows, run download-models-for-Unique3D.bat.

4.3. Run run.bat.After starting, the program will automatically open a browser, or you can visit: http://localhost:8188/

4.4. In the left sidebar, you can find the "Workflows" button, the example workflows are listed there. And the example input files are already in the input folder. Open a workflow and click "Queue" at bottom of the page to run the workflow.

Troubleshooting

Force-Update

It is not recommended to update any component of this package, whether it’s Python, ComfyUI or Custom Nodes ("If it works, don’t fix it").

But if you really need to update ComfyUI and Custom Nodes (except 3D-Pack), there’s a script to do that. Run this in your Git Bash:

bash force-update-all.sh

This script will force git-pull all the repositories.

Note that ComfyUI\custom_nodes\ComfyUI-3D-Pack folder is not a git repository, so it won’t be affected by this script.

Re-Compile and Re-Install Dependencies

Just like the FIRST_RUN script did, the reinstall-deps-for-3d.bat script will attempt to compile and install dependencies of 3D-Pack.

You need to edit this file and set TORCH_CUDA_ARCH_LIST as well.

There are few differences from the FIRST_RUN, this script will:

  • Download the latest source repos, not the targeted versions. This may help with compatibility issues when the FIRST_RUN doesn’t work.

  • Additionally compile-install kiuikit and nvdiffrast. In my tests, it’s not necessary to do so in the FIRST_RUN. I put them here for fail-safe.

  • Keep temporary files and save artifacts (.whl files) in the working folder tmp_build, allowing you to reuse them. Keep in mind they are not essentially portable.

What’s Next

The next package will be based on PyTorch 2.5.1 with CUDA 12.4. It will only focus on new workflows since November 2024, such as Hunyuan3D-1.