Skip to content

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

License

Notifications You must be signed in to change notification settings

YanWenKun/Comfy3D-WinPortable

Repository files navigation

Comfy3D Windows Portable

Screenshot

English | 中文说明

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

What Can It Do?

This build, pt25-cu124, is based on PyTorch 2.5.1 with CUDA 12.4, targeting the Dec 18, 2024 version of ComfyUI-3D-Pack.

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

Workflow Status Screenshot Memo

(NEW) Trellis_Image_to_Mesh

🆗

🖼️

Default to xFormers for compatibility. To enable Flash Attention, see Make Your Own.

(NEW) Hunyuan3D_V1

🆗

🖼️

Default to xFormers for compatibility. To enable Flash Attention, see Make Your Own.

(NEW) StableFast3D / sf3d_by_stability_ai

🆗

🖼️

Workflow from Stability AI.

StableFast3D_to_Mesh

🆗

🖼️

Workflow from 3D-Pack.

CharacterGen_Vanilla

🆗

🖼️

For compatibility with CharacterGen Loader, an older version of diffusers is used. May drop support in the future to avoid impacting the use of new models.

CharacterGen_to_Unique3D

🆗

🖼️

Workflow executes successfully, however the generated mesh is broken.

CharacterGen_InstantMesh

CharacterGen: 🆗; InstantMesh: OOM.

CRM MVDiffusion_to_Craftsman

🆗

🖼️

For compatibility with CRM Loader, an older version of open-clip-torch is used, which does not affect other models.

CRM MVDiffusion_to_Unique3D

🆗

🖼️

CRM_Img_to_Multi-views_to_CCMs_to_Mesh

🆗

🖼️

CRM MVDiffusion_to_InstantMesh

Incompatible InstantMesh node.

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

🆗

🖼️

Previously incompatible, now working.

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

🆗

🖼️

Era3D_to_InstantMesh

🖼️

Era3D: 🆗; InstantMesh: OOM or cube.

Multi-View-Images_to_Instant-NGP_to_ DiffRast_to_3DMesh

🆗

🖼️

Previously incompatible, now working.

MVDream_to_Large_Multiview_Gaussian_ Model_to_3DGS and_3DMesh

🆗

🖼️

Previously incompatible, now working.

Render_Mesh_and_3DGS_Example

🆗

🖼️

Triplane_Gaussian_Transformers_to_ 3DGS_and_3DMesh

🆗

🖼️

Previously incompatible, now working.

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

🆗

🖼️

Previously incompatible, now working.

Zero123Plus_to_InstantMesh

🆗

🖼️

  • Compared to the previous pt24-cu121 build, the new pt25-cu124 shows no regression in compatibility. All workflows that worked previously continue to function in the new build.

Before You Start…​

  1. 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.

  2. (Optional) If you want to use Stable Fast 3D, you need a Hugging Face access token to download it.

Download, Install, Compile and Run

1. Basic Requirements

1.1. Install CUDA Toolkit 12.4.1.

  • Only Libraries and Compilers are needed to install.

  • If your GPU driver is outdated (<550), 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.

  • (Just in case) If new major version of Visual Studio is released, you need to manually select version 17.x (e.g. 17.12) and MSVC v143. Referring to CUDA 12.4 compiler support.

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 an RTX 4060 Ti, it should be:

set TORCH_CUDA_ARCH_LIST=8.9

2.3. Edit run.bat

You can see the line (again):

set TORCH_CUDA_ARCH_LIST=6.1+PTX

Edit it like you just did in the last step.

3. (Optional) Extra Config

3.1. There are few more settings available in the start script run.bat, 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.2. If you are going to run Stable Fast 3D workflows, you need to edit the start script run.bat, find the line:

rem set HF_TOKEN=

and edit it to:

set HF_TOKEN=hf_your_token

For example:

set HF_TOKEN=hf_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefgh

3.3. If you run multiple ComfyUI instances in Sandboxie, as a reminder, the .bat scripts 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.

  • Depending on hardware, it may take 5~30 minutes.

  • If it fails, simply run the script 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/

  • In the left sidebar, you can find the "Workflows" button, the example workflows are listed there. 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.

  • To shutdown the program, simply close the console window.

  • To start the program in the future, simply run run.bat.

Troubleshooting

A. 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.

B. 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 the 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, utils3d 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 that they are not essentially portable.

C. Last and Guaranteed - Linux

If you run into complicated compatibility issues, try Linux.

Everything in Comfy3D works more smoothly on Linux. 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 Dockerfile or my Docker image if you’re familiar with containers.

Make Your Own

You can build this package using GitHub Actions. Simply fork this repo and go to "Actions" page, find "Build & Upload pt25-cu124 Package" and then find "Run workflow".

The GitHub workflow takes about 20 minutes to finish. After that, you can find the 7z files in the "Releases" page.

Examples of custom modification:

  • If you never use CharacterGen, you can delete diffusers==0.29.1 in pakB.txt.

  • If you never use CRM, you can delete open-clip-torch==2.24.0 in pakB.txt.

  • If you are using Ampere or later GPUs, you can enable Flash Attention in pak8.txt.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published