# Troubleshooting & FAQ Quick fixes for the errors you will run into most often when setting up PyTorch, models, custom nodes, and large workflows. > [!IMPORTANT] > **Check these 4 official fixes first before deep debugging:** > 1. **Update PyTorch:** NVIDIA RTX 20-series and newer GPUs require CUDA `cu130` or higher (if your PyTorch install is more than 6 months old, update it). > 2. **Remove all GGUF files and nodes:** delete GGUF models and third-party GGUF node packs, and switch to native Comfy formats (`convrot int8`, `w6a8`, `FP8`, `NVFP4`) for more than 2x faster performance. > 3. **Isolate custom nodes:** launch with `python main.py --disable-all-custom-nodes` to check whether a third-party extension is causing crashes or slowdowns. > 4. **Remove extra CLI flags:** strip old "performance" launch flags (`--lowvram`, `--novram`, `--fast`, `--force-fp16`) and test clean defaults first. ## CUDA out of memory `Allocation on device` or `CUDA out of memory` means a node tried to allocate more GPU memory than Dynamic VRAM can fit alongside your OS. 1. **Remove legacy flags:** clear `--highvram`, `--gpu-only`, or `--disable-dynamic-vram` so Dynamic VRAM and async weight streaming can offload layers automatically. 2. **Lower resolution or batch size:** verify your empty latent node is near native training size (`1024 x 1024`, `batch_size = 1`) rather than `2048 x 2048`. 3. **Switch to Tiled VAE:** if sampling hits 100% and crashes right during decode, replace `VAE Decode` with `VAE Decode (Tiled)` (`tile_size: 512`, `overlap: 64`). 4. **Use native quantized weights:** swap unquantized 16-bit diffusion models and text encoders for native `convrot int8`, `w6a8`, `FP8`, or `NVFP4` `.safetensors` files (do not use GGUF). 5. **Leave OS headroom and clear cache:** launch with `--vram-headroom 1.0` if other GPU apps (browsers, games) stay open, add `--fast-disk` on fast NVMe SSDs if system RAM is low, and click **Unload Models / Free Memory** in ComfyUI's top menu. ## Missing custom nodes Opening someone else's PNG or JSON workflow often shows red-bordered nodes and a `Missing Node Types` modal. 1. Make sure [ComfyUI-Manager](./installation.md#comfyui-manager) is active (pre-installed on Desktop App, or enabled with `pip install -r manager_requirements.txt` and `python main.py --enable-manager`). 2. Open **Manager -> Install Missing Custom Nodes** inside ComfyUI. 3. Review the list, click **Install** on the matching packages, and **Restart** ComfyUI completely. 4. If a node still shows red after restarting, check the ComfyUI console or bottom Logs panel (`` Ctrl + ` ``) for `ModuleNotFoundError` tracebacks and install its dependencies inside your ComfyUI environment: ```bash # Run from inside your ComfyUI virtual environment (or python_embeded on Windows Portable) pip install -r custom_nodes//requirements.txt ``` > [!WARNING] > Custom nodes execute arbitrary Python code on your machine. Only install node packs from repositories and Comfy Registry publishers you recognize and trust. ## Black or NaN outputs If images render solid black, neon noise, or trigger `NaN` / `invalid value` errors: * **Wrong VAE:** SDXL, SD 1.5, Flux (`ae.safetensors` vs Flux.2 VAE), Qwen-Image 2.1, Wan, and SD 3.5 each require their own matching VAE. Mixing VAEs causes black images or distorted colors. * **Wrong latent node:** match the channel count to the architecture (`Empty Flux 2 Latent` 32-ch for Flux.2, `Empty SD3 Latent Image` 16-ch for Flux.1 / SD 3.5 / Z-Image / Anima, `Empty Latent Image` 4-ch for SDXL / SD 1.5). * **SDXL FP16 VAE overflow:** older SDXL 1.0 VAEs can overflow in FP16. Use `sdxl_vae_fp16fix` or pass `--bf16-vae` / `--fp32-vae`. * **Excessive CFG or LoRA strength:** check model-specific CFG (`1.0` for distilled/Turbo models and `Qwen-Image 2.1`; `1.0` + `FluxGuidance` for Flux.1 Dev), and keep stacked LoRA weights balanced. * **Precision / compiler flags:** remove `--fast` flags, test `--force-upcast-attention` if black outputs persist on older GPUs, or test `--disable-cuda-graphs` only to check for kernel bugs. ## PyTorch and launch issues ### `Torch not compiled with CUDA enabled` Your Python environment installed CPU-only PyTorch instead of the CUDA build. Reinstall PyTorch with `cu130` (for NVIDIA RTX 20-series+) inside your active venv: ```bash pip uninstall -y torch torchvision torchaudio pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130 ``` If you are on a legacy GTX 10-series or older card, use the `cu126` index instead. ### `Address already in use` on port `8188` Another ComfyUI instance (or orphaned background `python` process) is still bound to port `8188`: ```bash python main.py --port 8189 ``` Or close the previous terminal window / terminate the leftover `python` process first. ### Slow model loading on every run * Store `ComfyUI/models/` on an internal NVMe SSD instead of a spinning HDD or external USB drive. * Make sure you are using native `.safetensors` quantized weights rather than GGUF files or bloated unquantized FP32 checkpoints. * Add sufficient system RAM (32 GB+ recommended for 12B+ models) or try `--fast-disk` on fast NVMe storage if system RAM is constrained. ### Recovering from a broken custom node update If ComfyUI fails to boot or freezes after installing or updating a custom node pack: 1. Test core ComfyUI first with `python main.py --disable-all-custom-nodes`. 2. Bring back packs selectively with `--whitelist-custom-nodes pack_a pack_b` (or list broken node IDs in `--disabled-nodes-config path.yaml`). 3. Alternatively, open `ComfyUI/custom_nodes/` and append `.disabled` to the problem folder name so ComfyUI skips it on startup. ### Disabling Partner Nodes or running fully offline * **Hide paid API nodes only:** start ComfyUI with `--disable-partner-nodes` while keeping frontend features such as Manager and template updates online. * **Strict air-gapped mode:** start with `--offline` to disable Partner Nodes and apply a restrictive Content Security Policy blocking external frontend network access. Ready to build your own nodes in Python? Read [Custom Node Development](./custom-nodes.md).