Skip to main content
NVIDIA
Explore
Models
Skills
Blueprints
GPUs
Docs
Help Center
Getting Started
  1. Create and verify your account to unlock full access to NVIDIA NIM APIs.
ResourcesDeveloper ForumsContact Support
FAQs
  • Generate Images and Videos with ComfyUI

    45 MIN

    Node-based diffusion workflows for images and videos with FLUX, Wan, HunyuanVideo, and Stable Diffusion

    • ComfyUI
    • Content Creation
    • DGX Spark
    • DGX Station
    • Docker
    • Image Generation
    View on GitHub
    OverviewOverviewImage Gen Quick StartImage Gen Quick StartVideo Gen WorkflowVideo Gen WorkflowTroubleshootingTroubleshooting

    NOTE

    These instructions target Linux. This tab is a lightweight host Python install for Stable Diffusion–class image generation — a good first try on any supported hardware platform. For FLUX, Wan, HunyuanVideo, Cosmos, and playbook workflows, continue to the Video Gen Workflow tab.

    Quick start (optional)

    If you prefer an automated setup, download and run the provided script to perform Steps 1–6 in one go (prerequisite check, virtual environment, PyTorch, ComfyUI, dependencies, and model download):

    curl -fsSL "https://raw.githubusercontent.com/NVIDIA/dgx-spark-playbooks/refs/heads/main/nvidia/playbook-comfyui/assets/setup.sh" | bash
    

    When it finishes, launch the server from the same directory where you ran setup.sh (it expects comfyui-env/ and ComfyUI/ in the current directory):

    curl -fsSL "https://raw.githubusercontent.com/NVIDIA/dgx-spark-playbooks/refs/heads/main/nvidia/playbook-comfyui/assets/launch.sh" | bash
    

    Then continue from Step 8. Validate installation.

    To learn what each step does, follow the manual instructions below instead.

    Step 1
    Verify system prerequisites

    Check that your hardware platform meets the requirements before proceeding with installation.

    python3 --version
    pip3 --version
    nvidia-smi
    

    Expected output should show Python 3.8+, pip available, and GPU detection.

    Step 2
    Create Python virtual environment

    You will install ComfyUI on your host system, so you should create an isolated environment to avoid conflicts with system packages.

    python3 -m venv comfyui-env
    source comfyui-env/bin/activate
    

    Verify the virtual environment is active by checking the command prompt shows (comfyui-env).

    Step 3
    Install PyTorch with CUDA support

    Install PyTorch with CUDA 13.0 support.

    pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu130
    

    This installation targets CUDA 13.0 compatibility with Blackwell architecture GPUs.

    Step 4
    Clone ComfyUI repository

    Download the ComfyUI source code from the official repository.

    git clone --branch v0.33.2 https://github.com/comfyanonymous/ComfyUI.git
    cd ComfyUI/
    

    Step 5
    Install ComfyUI dependencies

    Install the required Python packages for ComfyUI operation.

    pip install -r requirements.txt
    

    This installs all necessary dependencies including web interface components and model handling libraries.

    Step 6
    Download model checkpoint that will be used in Step 9

    cd models/checkpoints/
    wget https://huggingface.co/Lykon/DreamShaper/resolve/main/DreamShaper_8_pruned.safetensors
    cd ../../
    

    The download will be approximately 2GB and may take several minutes depending on network speed.

    Step 7
    Launch ComfyUI server

    Start the ComfyUI web server with network access enabled.

    python main.py --listen 0.0.0.0
    

    The server will bind to all network interfaces on port 8188, making it accessible from other devices.

    Step 8
    Validate installation

    The server from Step 7 keeps running in the foreground, so run the following in a second terminal.

    Check that ComfyUI is running correctly and accessible via your web browser.

    curl -I http://localhost:8188
    

    Expected output should show HTTP 200 response indicating the web server is operational.

    Open a web browser and navigate to http://<HARDWARE_IP>:8188 where <HARDWARE_IP> is your device's IP address.

    Step 9
    Run a template flow

    Test the installation with a basic image generation workflow:

    1. Access the web interface at http://<HARDWARE_IP>:8188

      NOTE

      If the page fails to load, make sure the device you are browsing from is allowed to access your local network:

      • macOS: Open System Settings → Privacy & Security → Local Network and enable access for your browser. macOS blocks local-network connections until an app is granted this permission. See Control access to your local network on Mac.
      • Windows: Set your network profile to Private (not Public) so the device can reach others on the network. See Make a Wi-Fi network public or private in Windows.
    2. Load a starter workflow:

      1. Click Templates on the left side of the menu (skip this if the template window pops up automatically)
      2. Choose Getting Started on the left side of the template window
      3. Choose 1.1 Starter-Text to Image
      4. Click the Run button at the top right
    3. Monitor GPU usage with nvidia-smi in a separate terminal

    The image generation should complete within 30 seconds.

    Step 10
    Optional - Cleanup and rollback

    If you need to remove the installation completely, follow these steps:

    WARNING

    This will delete all installed packages and downloaded models.

    deactivate
    rm -rf comfyui-env/
    rm -rf ComfyUI/
    

    To rollback during installation, press Ctrl+C to stop the server and remove the virtual environment.

    Resources

    • ComfyUI Documentation
    • ComfyUI (GitHub)
    • ComfyUI Examples
    • FLUX.1 on HuggingFace
    • Wan 2.1 on HuggingFace
    • NVIDIA Cosmos-Predict2
    • DGX Spark Documentation
    • DGX Spark Forum
    • DGX Station Support
    • NVIDIA Developer Forums
    Terms of Use
    Privacy Policy
    Your Privacy Choices
    Contact

    Copyright © 2026 NVIDIA Corporation