ensure that ``nunchaku`` is installed into the Python environment bundled with ComfyUI. You can either:
- Use our **NunchakuWheelInstaller Node** in `ComfyUI-nunchaku <comfyui_nunchaku_>`_, or
- Manually install the wheel using the correct Python path.
Option 1: Using NunchakuWheelInstaller
""""""""""""""""""""""""""""""""""""""
With `ComfyUI-nunchaku <comfyui_nunchaku_>`_ v0.3.2+, you can install Nunchaku using the provided `workflow <comfyui_nunchaku_wheel_installation_workflow_>`_ directly in ComfyUI.
**For Linux (if** ``gcc/g++`` **is not recent enough):**
.. code-block:: shell
conda install -c conda-forge gxx=11 gcc=11
For Windows users, download and install the latest `Visual Studio <visual_studio_>`_ and use its development environment. See :doc:`Window Setup Guide <setup_windows>` for more details.
Set ``NUNCHAKU_INSTALL_MODE=ALL`` to ensure the wheel works on all supported GPU architectures. Otherwise, it may only run on the GPU type used for building.
Download and install the latest CUDA Toolkit from the official `NVIDIA CUDA Downloads <nvidia_cuda_downloads_>`_. After installation, verify the installation:
.. code-block:: bat
nvcc --version
2. Install Visual Studio C++ Build Tools
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Download from the official `Visual Studio Build Tools page <visual_studio_>`_. During installation, select the following workloads:
- **Desktop development with C++**
- **C++ tools for Linux development**
3. Install Git
^^^^^^^^^^^^^^
Download Git from `https://git-scm.com/downloads/win <git_downloads_win_>`_ and follow the installation steps.
4. (Optional) Install Conda
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Conda helps manage Python environments. You can install either Anaconda or Miniconda from the `official site <anaconda_download_>`_.
5. (Optional) Install ComfyUI
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You may have various ways to install ComfyUI. For example, you can use ComfyUI CLI.
Once Python is installed, you can install ComfyUI via the CLI:
.. code-block:: bat
pip install comfy-cli
comfy install
To launch ComfyUI:
.. code-block:: bat
comfy launch
Installing Nunchaku on Windows
-------------------------------
Step 1: Identify Your Python Environment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To ensure correct installation, you need to find the Python interpreter used by ComfyUI.
With `ComfyUI-nunchaku <comfyui_nunchaku_>`_ v0.3.2+, you can install Nunchaku using the provided `workflow <comfyui_nunchaku_wheel_installation_workflow_>`_ directly in ComfyUI.
Alternatively, install it using `ComfyUI-Manager <comfyui_manager_>`_ or ``comfy-cli``.
2. Download Models
^^^^^^^^^^^^^^^^^^
**Standard FLUX.1-dev Models**
Start by downloading the standard `FLUX.1-dev text encoders <https://huggingface.co/comfyanonymous/flux_text_encoders/tree/main>`__ and `VAE <https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/ae.safetensors>`__. You can also optionally download the original `BF16 FLUX.1-dev <https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/flux1-dev.safetensors>`__ model. An example command:
Next, download the Nunchaku 4-bit models to ``models/diffusion_models``:
- For **50-series GPUs**, use the `FP4 model <nunchaku_flux1_dev_fp4_>`_.
- For **other GPUs**, use the `INT4 model <nunchaku_flux1_dev_int4_>`_.
**(Optional): Download Sample LoRAs**
You can test with some sample LoRAs like `FLUX.1-Turbo <turbo_lora_>`_ and `Ghibsky <ghibsky_lora_>`_. Place these files in the ``models/loras`` directory:
To use the official workflows, download them from the `ComfyUI-nunchaku <comfyui_nunchaku_>`_ and place them in your ``ComfyUI/user/default/workflows`` directory. The command can be: