Skip to content

**Tutorial: Setting Up ONNX and InsightFace for ComfyUI's PuLID\_Flux\_ll Node (NVIDIA RTX 50-Series, Python 3.12+)** #2779

Description

@Jaybo1389

I worked back and forth with ChatGPT, CoPilot, Gemini, and Claude to get SageAttention, Xformers, Triton, & InsightFace installed to use LLMs and PuLID in ComfyUI following the process of [overload1337] from 4-19-25. It is now working fully with ComfyUI Portable on my rig with an NVIDIA RTX 5070TI GPU so I had Gemini create this tutorial.
Thanks to:
overload1337

Tutorial: Setting Up ONNX and InsightFace for ComfyUI's PuLID_Flux_ll Node (NVIDIA RTX 50-Series, Python 3.12+)

This guide provides a comprehensive, step-by-step process for building and injecting compatible versions of ONNX (1.18.0) and InsightFace (0.7.3) into a ComfyUI Portable installation that uses Python 3.12+ (common for NVIDIA RTX 50-series GPUs with CUDA 12.8). This setup is crucial for nodes like ComfyUI_PuLID_Flux_ll that rely on these libraries.

Why this is necessary:
Standard pip install commands often fail for InsightFace (due to its ONNX dependency) when used with newer Python versions (3.12+) and CUDA 12.8, leading to errors. This tutorial demonstrates how to compile these libraries from source for full compatibility.
Throughout this guide, replace <YOUR_COMFYUI_PORTABLE_PATH> with the actual absolute path to your ComfyUI Portable installation (e.g., D:\AI-Models\ComfyUI_Portable or C:\ComfyUI).

Prerequisites & Downloads

Before you begin, ensure you have the following downloaded and installed:

  1. Python 3.12.10 (64-bit):

    • Purpose: This will be your system Python environment used for building the ONNX and InsightFace wheels. It must match ComfyUI's embedded Python version for ABI compatibility.
    • Download Link: Python 3.12.10 (Windows installer 64-bit)
    • Save to: Your Downloads folder (e.g., C:\Users\YourUser\Downloads\python-3.12.10-amd64.exe).
  2. Visual Studio 2022 Build Tools:

    • Purpose: Provides the necessary C++ compiler (MSVC cl.exe) and SDKs required to compile ONNX and InsightFace from source.
    • Download Link: Visual Studio 2022 Build Tools (Scroll down to "Tools for Visual Studio" and click "Download" next to "Build Tools for Visual Studio 2022").
    • Installation: During installation, select the "Desktop development with C++" workload. Ensure "MSVC v143 - VS 2022 C++ x64/x86 build tools" and "Windows 10 SDK" (or 11 SDK) components are checked.
  3. NVIDIA CUDA Toolkit 12.8:

    • Purpose: Essential for GPU-accelerated operations for many AI libraries. Your RTX 50-series GPU with ComfyUI will likely use this.
    • Download Link: CUDA Toolkit 12.8 Downloads (Select your OS, Architecture, and Version).
    • Installation: Follow the installer prompts. A "Custom" install might be preferred to select specific components, but a "Express" install is usually fine for most users.
  4. Git for Windows:

    • Purpose: To clone the ONNX and InsightFace source code repositories.
    • Download Link: Git for Windows
    • Installation: Follow the default installer prompts.
  5. ComfyUI Portable Installation:

    • Purpose: The target environment for injecting the custom-built libraries.
    • Download your preferred ComfyUI Portable version (ensure it includes a python_embeded directory with Python 3.12.x).
    • Recommended: Create a backup of your ComfyUI_Portable folder before proceeding with this tutorial. Simply copy and paste the entire folder to a safe location.
  6. ComfyUI Portable Setup, Run, and Verification Scripts:

    • Purpose: These batch and Python scripts automate the initial setup, launching, and verification of your ComfyUI Portable environment. They should be placed directly in your main ComfyUI Portable directory (i.e., <YOUR_COMFYUI_PORTABLE_PATH>).
    • comfyui_setup_NVIDIA RTX 50XX GPU.bat
      • Description: This script prepares the ComfyUI Portable environment by upgrading pip, installing PyTorch, Xformers, Triton, SageAttention, and basic InsightFace dependencies using pip. It also creates log files and performs initial checks.

    @echo off
    chcp 65001 > nul
    setlocal enableextensions

    echo \===============================  
    echo   ComfyUI RTX 50XX Series Builder  
    echo   PyTorch 2.7.0 \+ CUDA 12.8  
    echo   Xformers \+ SageAttention \+ Triton \+ InsightFace  
    echo \===============================  
    echo.
    
    :: Metadata  
    :: Generated: 2025-06-17  
    :: Target GPU: NVIDIA RTX 50XX Series  
    :: Environment: ComfyUI Portable  
    :: Author: ChatGPT \+ Copilot (Final Optimized Version)
    
    :: Create folders for logging and backups  
    if not exist "%\~dp0logs" mkdir "%\~dp0logs"  
    if not exist "%\~dp0backup\_configs" mkdir "%\~dp0backup\_configs"
    
    :: Generate timestamp for log filenames  
    for /f %%a in ('powershell \-NoProfile \-Command "Get-Date \-Format %%Y-%%m-%%d\_%%H-%%mm-%%ss"') do set LOGSTAMP=%%a
    
    :: Check embedded Python version  
    echo 🔍 Checking embedded Python version...  
    python\_embeded\\python.exe \--version \> nul 2\>&1  
    if %errorlevel% neq 0 (  
        echo ❌ Error: Embedded Python is missing or inaccessible\!  
        timeout /t 10  
        exit /b 1  
    )  
    python\_embeded\\python.exe \--version \> logs\\python\_version\_%LOGSTAMP%.log 2\>&1  
    echo.
    
    :: Check NVIDIA driver availability  
    echo 🔍 Checking for NVIDIA GPU drivers...  
    nvidia-smi \> nul 2\>&1  
    if %errorlevel% neq 0 (  
        echo ❌ Error: No NVIDIA GPU detected or drivers missing\!  
        timeout /t 10  
        exit /b 1  
    )
    
    :: Setup environment  
    set PATH=%\~dp0python\_embeded;%PATH%  
    set PYTHONPATH=%\~dp0  
    set CUDA\_VISIBLE\_DEVICES=0  
    set PYTORCH\_CUDA\_ALLOC\_CONF=max\_split\_size\_mb:512
    
    :: Create pip.ini if missing  
    if not exist "%\~dp0python\_embeded\\pip.ini" (  
        echo 🔧 Configuring pip.ini (creating if missing)...  
        echo \[global\]\> "%\~dp0python\_embeded\\pip.ini"  
        echo user \= false\>\> "%\~dp0python\_embeded\\pip.ini"  
        echo timeout \= 60\>\> "%\~dp0python\_embeded\\pip.ini"  
        echo disable\_pip\_version\_check \= true\>\> "%\~dp0python\_embeded\\pip.ini"  
        echo no-cache-dir \= false\>\> "%\~dp0python\_embeded\\pip.ini"  
        echo find-links \= https://download.pytorch.org/whl/cu128\>\> "%\~dp0python\_embeded\\pip.ini"  
    )
    
    :: Purge pip cache  
    echo 💡 Purging pip cache...  
    python\_embeded\\python.exe \-m pip cache purge \> logs\\pip\_cache\_purge\_%LOGSTAMP%.log 2\>&1
    
    :: Step 1 \- Upgrade pip toolchain  
    echo 🛠️ Installing/Upgrading pip, setuptools, wheel...  
    python\_embeded\\python.exe \-m pip install \-U pip setuptools wheel \> logs\\step1\_pip\_tools\_%LOGSTAMP%.log 2\>&1  
    if %errorlevel% neq 0 (  
        echo ❌ Pip toolchain install failed – see logs\\step1\_pip\_tools\_%LOGSTAMP%.log  
        timeout /t 10  
        exit /b 1  
    )
    
    :: Step 2 \- Install PyTorch  
    echo 🔥 Installing PyTorch 2.7.0 \+ CUDA 12.8...  
    python\_embeded\\python.exe \-m pip install torch==2.7.0+cu128 torchvision torchaudio \--index-url https://download.pytorch.org/whl/cu128 \> logs\\step2\_pytorch\_%LOGSTAMP%.log 2\>&1  
    if %errorlevel% neq 0 (  
        echo ❌ PyTorch installation failed – see logs\\step2\_pytorch\_%LOGSTAMP%.log  
        timeout /t 10  
        exit /b 1  
    )
    
    :: Step 3 \- Install xformers  
    echo 🧠 Installing xformers...  
    python\_embeded\\python.exe \-m pip install \-U xformers \--index-url https://download.pytorch.org/whl/cu128 \> logs\\step3\_xformers\_%LOGSTAMP%.log 2\>&1
    
    :: Step 4 \- Install Triton  
    echo ⚙️ Installing Triton...  
    python\_embeded\\python.exe \-m pip install \-U "triton-windows\<3.4" \> logs\\step4\_triton\_%LOGSTAMP%.log 2\>&1  
    if %errorlevel% neq 0 (  
        echo ❌ Triton installation failed – see logs\\step4\_triton\_%LOGSTAMP%.log  
        timeout /t 10  
        exit /b 1  
    )
    
    :: Step 5 \- Install SageAttention  
    echo 🧠 Installing SageAttention...  
    python\_embeded\\python.exe \-m pip install https://github.com/woct0rdho/SageAttention/releases/download/v2.1.1-windows/sageattention-2.1.1+cu128torch2.7.0-cp312-cp312-win\_amd64.whl \> logs\\step5\_sageattention\_%LOGSTAMP%.log 2\>&1
    
    :: Step 6 \- Install InsightFace (Pre-built wheel \+ dependencies)  
    echo 👁️ Installing InsightFace with required dependencies...  
    python\_embeded\\python.exe \-m pip install insightface \--prefer-binary \> logs\\step6\_insightface\_%LOGSTAMP%.log 2\>&1  
    python\_embeded\\python.exe \-m pip install onnxruntime-gpu \> logs\\step7\_onnxruntime\_%LOGSTAMP%.log 2\>&1  
    if %errorlevel% neq 0 (  
        echo ❌ InsightFace or ONNXRuntime installation failed – see logs\\step6\_insightface\_%LOGSTAMP%.log  
        timeout /t 10  
        exit /b 1  
    )
    
    :: Final Verification  
    echo ✅ Running installation verification...  
    python\_embeded\\python.exe verify\_install.py \> logs\\step8\_verify\_install\_%LOGSTAMP%.log 2\>&1  
    type logs\\step8\_verify\_install\_%LOGSTAMP%.log
    
    echo.  
    echo 🎉 Setup complete\!  
    echo 💡 Tip: Use mklink to symlink shared model folders (checkpoints, VAEs, LoRAs) for a clean and portable setup.  
    echo.  
    echo ▶ Launch ComfyUI with:  
    echo    python\_embeded\\python.exe main.py \--use-sage-attention \--fast \--highvram  
    timeout /t 5 \> nul  
    pause
    
    • verify_install.py
      • Description: This Python script checks the versions and successful loading of critical Python packages (PyTorch, CUDA, Xformers, Triton, SageAttention, InsightFace) within ComfyUI's embedded environment.

    import sys
    import torch

    print("\\n=========================================")  
    print("  \[OK\] ComfyUI Installation Verification")  
    print("=========================================\\n")
    
    failures \= \[\]
    
    print(f"🔍 Python Executable (should be embedded): {sys.executable}")  
    print(f"🔍 Python Version: {sys.version}\\n")
    
    \# Check PyTorch  
    try:  
        print(f"🔥 PyTorch Version: {torch.\_\_version\_\_}")  
        print(f"🔍 CUDA Available: {torch.cuda.is\_available()}")  
        if torch.cuda.is\_available():  
            print(f"🚀 GPU Detected: {torch.cuda.get\_device\_name(0)}")  
    except Exception as e:  
        failures.append(f"❌ FAILED: PyTorch error – {e}")
    
    \# Check Triton (before SageAttention)  
    try:  
        import triton  
        print(f"✅ Triton Version: {triton.\_\_version\_\_}")  
    except Exception as e:  
        failures.append(f"❌ FAILED: Triton not found – {e}")
    
    \# Check Xformers  
    try:  
        import xformers  
        print(f"✅ Xformers Version: {xformers.\_\_version\_\_}")  
    except Exception as e:  
        failures.append(f"❌ FAILED: Xformers not found – {e}")
    
    \# Check SageAttention  
    try:  
        import sageattention  
        print("✅ SageAttention detected (version info not available)")  
    except Exception as e:  
        failures.append(f"❌ FAILED: SageAttention not found – {e}")
    
    \# Check InsightFace  
    try:  
        import insightface  
        print(f"✅ InsightFace Version: {insightface.\_\_version\_\_}")  
    except Exception as e:  
        failures.append(f"❌ FAILED: InsightFace not found – {e}")  
        print("   (This is critical for PuLID\_Flux\_ll nodes. Check for mesh\_core\_cython.pyd issues.)")
    
    print("\\n=========================================")
    
    \# Print failures if any  
    if failures:  
        print("\\n🚨 Issues Detected:")  
        for failure in failures:  
            print(failure)  
        print("\\n❌ Verification FAILED. Fix errors above before proceeding.")  
        sys.exit(1)  
    else:  
        print("\\n✅ All packages verified successfully\!")  
        sys.exit(0)
    
    • run_comfyui_NVIDIA 50XX GPU.bat
      • Description: This script simply launches ComfyUI with recommended flags for NVIDIA GPUs (SageAttention, fast, high VRAM) and automatically opens the web UI in your browser.

@echo off
chcp 65001 > nul
setlocal

echo ===============================
echo Launching ComfyUI (RTX 50XX Series)
echo Optimized: PyTorch 2.7.0 + CUDA 12.8
echo Includes: SageAttention, Triton, Xformers, InsightFace
echo ===============================

start http://localhost:8188
python_embeded\python.exe ComfyUI\main.py --use-sage-attention --fast --highvram

pause

Initial ComfyUI Portable Setup & Core Dependencies

This section covers the initial setup of ComfyUI Portable, including extracting its files and running the provided setup script to install core Python dependencies like PyTorch, Xformers, Triton, SageAttention, and ONNXRuntime-GPU.

  1. Extract ComfyUI Portable:
    • If you downloaded ComfyUI Portable as a .zip or .7z file, extract its contents to your desired location. This will be your <YOUR_COMFYUI_PORTABLE_PATH>.
    • Example: Extract to D:\AI-Models\ComfyUI_Portable or C:\ComfyUI.
    • Important: Note this full path, as you'll use it to replace <YOUR_COMFYUI_PORTABLE_PATH> throughout the tutorial.
  2. Place Custom Scripts:
    • Place the comfyui_setup_NVIDIA RTX 50XX GPU.bat, verify_install.py, and run_comfyui_NVIDIA 50XX GPU.bat files directly into your <YOUR_COMFYUI_PORTABLE_PATH> directory.
  3. Run Initial ComfyUI Setup Script:
    • Navigate to <YOUR_COMFYUI_PORTABLE_PATH> in File Explorer.
    • Double-click comfyui_setup_NVIDIA RTX 50XX GPU.bat to run it.
    • Purpose: This script will automatically install core dependencies for ComfyUI. While it attempts to install InsightFace and ONNXRuntime, our subsequent steps will ensure more compatible versions of ONNX and InsightFace are used.
    • Expected Behavior: The script will open a command prompt, perform various checks and installations, and log its progress. This process can take a significant amount of time as it downloads and installs PyTorch and other large libraries.
    • Wait for the script to complete. It will pause at the end, displaying "Setup complete!".
  4. Initial Verification (Optional, but Recommended):
    • After comfyui_setup_NVIDIA RTX 50XX GPU.bat finishes, you can check its success by looking at the logs folder it created and reviewing the output of verify_install.py that it displays. This confirms basic functionality before proceeding to the custom builds.

Section 1: Prepare Your System Build Environment

This section ensures your Windows system has the correct Python version and development tools installed for compilation.

  1. Install Python 3.12.10 (if not already done correctly):
    • Run the Python 3.12.10 installer executable (e.g., python-3.12.10-amd64.exe) as Administrator (right-click -> "Run as administrator").
    • On the first screen: Check "Add python.exe to PATH".
    • Click "Customize installation".
    • On "Optional Features": Ensure all boxes are checked. Click "Next".
    • On "Advanced Options":
      • Check: "Associate files with Python", "Create shortcuts", "Add Python to environment variables".
      • UNCHECK: "Install Python 3.12 for all users".
      • Change "Customize install location" to: C:\Program Files\Python312\ (This is where the installer often defaults even if another custom path is specified on older attempts, and it's a reliable location).
    • Click "Install" and wait for completion.
    • Verify Installation (Crucial!):
      • Close all open Command Prompt windows.
      • Open a NEW Standard Windows Command Prompt.
      • Run: "C:\Program Files\Python312\python.exe" --version
      • Expected Output: Python 3.12.10
      • Run: "C:\Program Files\Python312\python.exe" -m pip --version
      • Expected Output: Pip version information for Python 3.12.
  2. Verify Visual Studio 2022 Build Tools and CUDA Toolkit:
    • Ensure both Visual Studio 2022 Build Tools (with C++ Desktop development workload) and NVIDIA CUDA Toolkit 12.8 are installed. No commands are needed here, just a check that they are present on your system.

Section 2: Clone and Prepare Source Repositories

This section sets up the source code for ONNX and InsightFace in dedicated build folders.

  1. Open the x64 Native Tools Command Prompt for VS 2022:
    • Search for "x64 Native Tools Command Prompt for VS 2022" in your Windows Start Menu.
    • Click on it to open it. This prompt correctly sets up environment variables for C++ compilation. All subsequent commands in Sections 2, 3, and 4 will be run in this specific prompt.
  2. Create Build Folders:
    • In the x64 Native Tools Command Prompt, run:
      C:
      cd \AI-Builds
      mkdir onnx
      mkdir insightface

    • Reason: Provides dedicated, clean directories for the source code.

  3. Clone and Prepare ONNX Source (v1.18.0):
    • In the x64 Native Tools Command Prompt, run:
      rmdir /S /Q onnx 2>nul
      git clone https://github.com/onnx/onnx.git onnx
      cd onnx
      git checkout v1.18.0 # Checkout the specific release tag
      git submodule update --init --recursive # Download necessary submodules (like pybind11)
      cd .. # Go back to C:\AI-Builds

    • Reason: Clones the ONNX repository, checks out the compatible v1.18.0 tag, and crucially, downloads its submodules (like pybind11) which are required for compilation.

  4. Clone and Prepare InsightFace Source (master branch):
    • In the x64 Native Tools Command Prompt, run:
      rmdir /S /Q insightface 2>nul
      git clone https://github.com/deepinsight/insightface.git insightface
      cd insightface
      git checkout master # Use the main branch as v0.7.3 tag is not always present

    • Reason: Clones the InsightFace repository and ensures you're on the master branch.

  5. Modify InsightFace requirements.txt:
    • Purpose: To prevent InsightFace from attempting to install an incompatible version of ONNX from PyPI during its build.
    • Action: Open File Explorer and navigate to: C:\AI-Builds\insightface\.
    • Open the file named requirements.txt in a text editor (Notepad, VS Code, etc.).
    • Find the line that says onnx and comment it out by adding a # at the beginning.
      • Before: onnx (or onnx==x.x.x)
      • After: # onnx
    • Save the requirements.txt file.

Section 3: Build and Install Custom ONNX Wheel

This section compiles ONNX into a Python wheel and installs it into your system Python.

  1. Install ONNX Build Dependencies:
    • In the x64 Native Tools Command Prompt (navigate to C:\AI-Builds\onnx if not already there: cd C:\AI-Builds\onnx), run:
      "C:\Program Files\Python312\python.exe" -m pip install --upgrade pip
      "C:\Program Files\Python312\python.exe" -m pip install build wheel numpy protobuf typing_extensions

    • Reason: Updates pip and installs the specific Python packages necessary for the build module to compile ONNX. We manually list these to avoid issues with requirements.txt.

  2. Build the ONNX Wheel:
    • In the x64 Native Tools Command Prompt (still in C:\AI-Builds\onnx), run:
      "C:\Program Files\Python312\python.exe" -m build --wheel

    • Reason: Compiles the ONNX source code into a .whl file, located in C:\AI-Builds\onnx\dist\. This step involves C++ compilation using MSVC.

    • Expected Output: Look for a line similar to Successfully built onnx-1.18.0-cp312-cp312-win_amd64.whl.

  3. Install ONNX Wheel to System Python:
    • In the x64 Native Tools Command Prompt, navigate back to C:\AI-Builds:
      cd C:\AI-Builds

    • Install the newly built ONNX wheel:
      "C:\Program Files\Python312\python.exe" -m pip install onnx\dist\onnx-1.18.0-cp312-cp312-win_amd64.whl

    • Reason: Installs ONNX into your system Python 3.12.10. This acts as a crucial safeguard, ensuring InsightFace's build process finds the correct ONNX version if it attempts to resolve dependencies.

Section 4: Build and Install Custom InsightFace Wheel

This section compiles InsightFace into a Python wheel and installs it into your system Python.

  1. Install InsightFace Build Requirements:
    • In the x64 Native Tools Command Prompt, navigate to InsightFace's python-package directory:
      cd C:\AI-Builds\insightface\python-package

    • Install the dependencies listed in requirements.txt (which you previously modified to exclude ONNX):
      "C:\Program Files\Python312\python.exe" -m pip install -r ..\requirements.txt

    • Reason: Installs all required Python packages for InsightFace's compilation (e.g., Cython, cmake, facexlib, filterpy). The ..\requirements.txt path correctly points to the file in the parent directory.

  2. Build the InsightFace Wheel:
    • In the x64 Native Tools Command Prompt (still in C:\AI-Builds\insightface\python-package), run:
      "C:\Program Files\Python312\python.exe" -m build --wheel

    • Reason: Compiles the InsightFace source code into a .whl file, located in C:\AI-Builds\insightface\python-package\dist\.

    • Expected Output: Look for a line similar to Successfully built insightface-0.7.3-cp312-cp312-win_amd64.whl.

  3. Install InsightFace Wheel to System Python:
    • In the x64 Native Tools Command Prompt, navigate back to C:\AI-Builds:
      cd C:\AI-Builds

    • Install the newly built InsightFace wheel (using the exact filename):
      "C:\Program Files\Python312\python.exe" -m pip install insightface\python-package\dist\insightface-0.7.3-cp312-cp312-win_amd64.whl

    • Reason: Installs InsightFace into your system Python 3.12.10, completing the build environment setup.

Section 5: Inject Custom Packages into ComfyUI Portable

This is the final injection step, placing your custom-built ONNX and InsightFace into ComfyUI's embedded Python environment.

Important Backup Point: Before running these injection commands, it is highly recommended to create another backup of your <YOUR_COMFYUI_PORTABLE_PATH> folder. This acts as a safeguard if anything goes wrong during the final file replacement.

  1. Install Custom-Built ONNX into ComfyUI Portable (Force Reinstall):
    • Close all open Command Prompt windows.

    • Open a NEW Standard Windows Command Prompt.

    • Run the following command to install the custom ONNX wheel into ComfyUI's embedded Python. The --force-reinstall ensures it overwrites any older versions. Remember to replace <YOUR_COMFYUI_PORTABLE_PATH> with your actual path.
      "<YOUR_COMFYUI_PORTABLE_PATH>\python_embeded\python.exe" -m pip install --force-reinstall C:\AI-Builds\onnx\dist\onnx-1.18.0-cp312-cp312-win_amd64.whl

    • Reason: Directly installs your custom-built ONNX into ComfyUI's isolated Python environment.

  2. Install Custom-Built InsightFace into ComfyUI Portable (Force Reinstall):
    • In the same Standard Windows Command Prompt, run. Remember to replace <YOUR_COMFYUI_PORTABLE_PATH> with your actual path.
      "<YOUR_COMFYUI_PORTABLE_PATH>\python_embeded\python.exe" -m pip install --force-reinstall C:\AI-Builds\insightface\python-package\dist\insightface-0.7.3-cp312-cp312-win_amd64.whl

    • Reason: Directly installs your custom-built InsightFace into ComfyUI's isolated Python environment, replacing any incompatible older versions.

  3. Verify Installations in ComfyUI:
    • In the same Standard Windows Command Prompt, run. Remember to replace <YOUR_COMFYUI_PORTABLE_PATH> with your actual path.
      "<YOUR_COMFYUI_PORTABLE_PATH>\python_embeded\python.exe" -c "import onnx; import insightface; print(f'ONNX Version in ComfyUI: {onnx.__version__}'); print(f'InsightFace Version in ComfyUI: {insightface.__version__}')"

    • Expected Output:
      ONNX Version in ComfyUI: 1.18.0
      InsightFace Version in ComfyUI: 0.7.3

    • Reason: Confirms that the correct versions of both libraries are now accessible within ComfyUI's Python environment.

Section 6: Final Verification and Launch

  1. Close all open Command Prompt windows.
  2. Launch ComfyUI Portable:
    • Navigate to your <YOUR_COMFYUI_PORTABLE_PATH> directory.
    • Double-click run_comfyui_NVIDIA 50XX GPU.bat (this script handles the launch and initial browser opening).
  3. Install ComfyUI_PuLID_Flux_ll Node (if not already installed):
    • Once ComfyUI loads in your browser, click on "Manager" (button at the bottom).
    • Click "Install Custom Nodes".
    • Search for PuLID_Flux_ll and install it.
    • Restart ComfyUI after installation (as prompted by the manager).
  4. Test a Workflow:
    • Load an example workflow that uses the PuLID_Flux_ll node.
    • Queue a prompt and verify that the node runs successfully without any InsightFace or ONNX-related errors appearing in the ComfyUI console window (run_comfyui_NVIDIA 50XX GPU.bat window) or the ComfyUI web UI.

Here's the post I used to keep the LLM's on task:

from overload1337:

if you are using the current nightly of comfyui with cuda 12.8 for rtx 50 series, the embedded version of python is 3.12+. i'm not sure if it was provided like this or if i updated it, mine is 3.13.2 currently. i experienced the same issues and almost tried everything. the reason and solution is simple. python 3.13.2 is not supported for onnx 1.17.0, which is the reason building the .toml / wheel fails. same will happen when you try to install insightface, which follows the same process as it installs onnx 1.17.0 as requirement for installation. either you downgrade your python to 3.11.9. onnx / insightface installation will work, but maybe the comfyui nightly will not. cu128 packages and whatever. so what i did:

  1. installed the same version of python on my pc 3.13.2
  2. installed visual studio 2022 components (Windows SDK 10 + 11, Build Tools, etc.)
  3. installed Nvidia CUDA 12.8 SDK
  4. download source files for onnx-1.18.0rc1 + insightface 0.7.3
  5. build the installation wheels yourself.
  6. install the wheels on your python, make sure you comment out requirements for older onnx installations etc.
  7. copy the folders from your python "site-packages" to the "site-packages" folder of your comfyui python embedded
  8. start comfyui, install node with insightface requirement via comfyui manager

you find more detailed process steps with google / chatgpt

Originally posted by @Jaybo1389 in #2576

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions