How to get Stable Fast 3D working on a Dedicated Package version of ComfyUI
Credit
This package was created entirely by Yan Wenkun:
Git: https://github.com/YanWenKun/StableFast3D-WinPortable
I am reposting the details here (with his permission) as his work is useful and he should be recognized for his contributions to the AI community.
Introduction
Have you tried to get Stable-Fast-3D to work on ComfyUI with the ComfyUI-3D-Pack nodes and installation instructions? Did you have fun?
Problem: Getting Stable-Fast-3D to work on ComfyUI is an absolute NIGHTMARE, even for experienced coders and professionals. Then, when you do finally get it working, you discover that your other workflows are now broken because of all the changes made to your python env and CUDA setup. It's a real fun time.
Solution: Yan Wenkun went ahead and built a dedicated package (a standalone version of ComfyUI) with all of the nodes pre-installed and functional. You can now use that to run Stable-Fast-3D independently of your main ComfyUI package. Brilliant.
Instructions
I've included my personal notes with these official instructions as I required additional details from Yan with regard to the installation process (I am an artist, not a programmer).
You need an NVIDIA GPU with at least 8GB VRAM.
Install Visual Studio Build Tools 2022 (bottom of the linked page) with the "Desktop development with C++" workload.
Extra notes for simpletons like me:
After installing VS Build Tools, run the VS Installer app again (it should now be in your start menu)
Next to Build Tools, select "Modify"
Now check the "Desktop development with C++" workload
In the panel on the right (Installation Details), you need to also include the optional "MSVC v143..." and "C++ CMake tools" components
Download and install it all
Install CUDA Toolkit, with version no later than 12.4.1.
You only need to install the Libraries and Compilers:
On Hugging Face:
Go to the Stable Fast 3D repository, fill in and agree to Stability AI’s License Agreement.
Go to Access Tokens, create a read-only token.
In the StableFast3D-WinPortable/releases page, download SF3D.7z, then extract it to a convenient place.
EDIT run.bat, find & replace "hf_your_token" with the read-only access token you just created in step 4.
Run the run.bat file.
When the startup is complete, it will auto-launch the ComfyUI package in your browser at http://localhost:8188/
In the left sidebar, locate the sample workflow (ComfyUI/input), load it, and try it out :)
Your output files will be sent to ComfyUI/output
Troubleshooting
Initial download freezes during startup (seen in the cmd window) >
Edit your run.bat file and remove the following line to prevent the experimental high-speed download process: set HF_HUB_ENABLE_HF_TRANSFER=1
Note: You should probably just do this anyway, as the experimental high speed download is very unstable
You get a "Header Deserialization" error when you try to run the prompt >
This means that one or more of the models (safetensors) were not downloaded correctly, and are now corrupted. I solved this issue by manually downloading the model.safetensors files for the "stable-fast-3d" and "dinov2-large" models directly from Huggingface
I then opened the HuggingFaceHub folder inside the extracted SF3D directory --> Opened the relevant subfolders for the models, then pasted the new downloads into their respective "blob" subfolders
Now note which of the files already in the blob folder has the same size as the safetensors file you just imported --> Copy the name of that blob file (the long string of letters and numbers) --> delete that blob file --> Rename your safetensors file with that exact same name of the blob file you just deleted (and remove the ".safetensors" extension)
You're basically replacing that blob file with the new safetensors file you just downloaded, giving it the same name and removing the extension --> Do the same for both models
These are the only errors I encountered and they were both solved with Yan's help. SF3D is now working perfectly (and fast) on my system.
Dedication
If Yan's package helps you get it working, please send him a thank you email. His email address is available on his Git page.
Stay fresh, cheese bags!