Skip to content

Instantly share code, notes, and snippets.

@FNGarvin
Created May 20, 2026 16:51
Show Gist options
  • Select an option

  • Save FNGarvin/c0ab5e1dff2a71e83e6f767eb930518b to your computer and use it in GitHub Desktop.

Select an option

Save FNGarvin/c0ab5e1dff2a71e83e6f767eb930518b to your computer and use it in GitHub Desktop.
Working Nunchaku Build Steps

If you don't have the required cuda dev kit already, installing it is a pita in itself (assuming apt-based os and cu13 target, adjust as necessary):

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
dpkg -i cuda-keyring_1.1-1_all.deb
apt update
apt install -y cuda-toolkit-13-0

Now clone and build Nunchaku:

source [your venv folder]/bin/activate
#not mentioned, but probably necessary
pip install uv
uv pip install setuptools\<82 ninja wheel build
git clone --recurse-submodules https://github.com/nunchaku-tech/nunchaku.git
cd nunchaku
#tuned for moderate RAM.  Build is really aggressive and has to be toned down if you have garbage RAM.
MAX_JOBS=4 NUNCHAKU_INSTALL_MODE=ALL NUNCHAKU_BUILD_WHEELS=1 pip wheel . --no-deps --no-build-isolation

This should leave you with a wheel suitable for your specific python, your specific cuda (13.0 in this example), and your specific pytorch. You can install it with uv pip install [wheel_filename.whl], archive it in case you need to use it again, etc.

@FNGarvin

Copy link
Copy Markdown
Author

ps, now adding nunchaku-ai/ComfyUI-nunchaku#817 and corresponding back-end changes.

IIRC, there is also a similar need for patches for lora loading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment