Skip to content
Automation
Skill

/troubleshooting

Common ComfyUI errors and fixes. OOM, missing nodes, dtype mismatches, black images, and debugging strategies

From plugin
comfyui-mcp
88442 skills4 agents11 commands1 MCP

Claude Code

$ npx -y skills add artokun/comfyui-mcp --skill troubleshooting --agent claude-code

SKILL.md

troubleshooting.SKILL.md
name: troubleshooting
description: Common ComfyUI errors and fixes. OOM, missing nodes, dtype mismatches, black images, and debugging strategies
globs:
  - "**/*.json"

ComfyUI Troubleshooting Guide

> Render completes but looks WRONG (artifacts, wrong subject/pose/color, a > ControlNet/mask/LoRA not taking, a refiner degrading it)? That's not an error. > Use the debug-render skill (`list_packs` with `action: "skill_read"`, > `name: "debug-render"`) to localize the bad stage with run-to-node > (`panel_run` `to_node_id`) by previewing intermediate steps. This guide is for > runs that fail with an error, OOM, or missing node.

Error Diagnosis Strategy

When a workflow fails, follow this approach:

1. Get the error. Use `get_history(action="diagnose")` to retrieve the execution result with the full traceback, plus any missing models/nodes 2. Check logs. Use `get_system_stats (action:"logs")` with keyword filters like `"error"`, `"warning"`, `"traceback"` 3. Identify the failing node. The history response includes the `node_id` and `node_type` that failed 4. Cross-reference inputs. Use `create_workflow (action:"node_info")` to verify the failing node's expected input schema 5. Check models. Use `list_local_models` to verify all referenced model files exist

Out of Memory (OOM)

Error Pattern

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate X MiB.
GPU 0 has a total capacity of 24.00 GiB of which X MiB is free.

Or:

RuntimeError: CUDA error: out of memory

Root Cause

The GPU does not have enough VRAM to hold the model weights, intermediate tensors, and latent images at the same time. Common triggers:

  • High resolution images (2048x2048+)
  • Multiple models loaded at the same time
  • FP32 precision models on limited VRAM
  • Video generation (LTXV, AnimateDiff) with many frames
  • Large batch sizes

Fixes (in order of preference)

1. Reduce resolution. Drop to the model's native resolution (512 for SD 1.5, 1024 for SDXL/Flux) 2. Use FP8/FP16 quantized models. FP8 Flux models use ~8GB vs ~24GB for FP16

  • Search for FP8 variants: `download_model({ action: "search", query: "flux fp8" })` or the same with `"sdxl fp8"`

3. Launch flags (the VRAM ladder). Offload via ComfyUI CLI flags:

  • `--lowvram` offloads text encoders / model parts to CPU
  • `--novram` is extreme offload, the go-to for long video (LTX 2 / WAN) OOM
  • `--cache-none` caches nothing (lowest RAM/VRAM); combine with `--novram`
  • `--reserve-vram N` reserves N GB so the GPU stops spilling into slow shared VRAM (Windows); typical `2` to `4`
  • `--disable-smart-memory` forces offload to RAM when a run gets stuck or OOMs intermittently
  • Full matrix and recipes: [`comfyui-launch-flags`](../comfyui-launch-flags/SKILL.md)

4. Free VRAM between generations. ComfyUI should auto-manage, but restarting clears leaked memory 5. Use tiled VAE decoding. For high-resolution images, tile the VAE decode step

  • Node: `VAEDecodeTiled` instead of `VAEDecode`
  • Breaks the image into tiles, decodes each separately, and stitches them together

6. Reduce batch size. Set batch_size to 1 in `EmptyLatentImage` 7. Avoid multiple models. Don't load two full checkpoints at the same time; use one checkpoint and LoRAs instead 8. For LTXV/video: always use FP8 quantized video models on 24GB cards

VRAM Estimates

| Model | FP32 | FP16 | FP8 | |-------|------|------|-----| | SD 1.5 | ~4GB | ~2GB | ~1GB | | SDXL | ~12GB | ~6GB | ~3GB | | Flux Dev | ~48GB | ~24GB | ~12GB | | Flux Schnell | ~48GB | ~24GB | ~12GB | | LTXV | ~20GB+ | ~10GB+ | ~6GB |

Launch Flags — VRAM / Cache / Attention / Precision

ComfyUI's startup flags tune the speed↔VRAM tradeoff. Match them to the detected GPU (the panel orchestrator reports VRAM/GPU/torch/sage in its env block; pick the tier from there). Set them on the process that launches ComfyUI (or the `--panel-orchestrator` / `connect` command's ComfyUI, not the agent).

VRAM mode (pick ONE by card size)

| Flag | Card | Behavior | |------|------|----------| | `--gpu-only` | 16GB+ | Everything (CLIP/VAE/UNet) stays on GPU — fastest, max VRAM | | `--highvram` | 12–16GB | Models stay resident in GPU after use, no CPU offload | | `--normalvram` | 8–12GB | Default balance — unload to CPU RAM when idle | | `--lowvram` | 6–8GB | Split the UNet, aggressive CPU offload — slower | | `--novram` | 4–6GB | Extreme split/offload — for OOM even on lowvram, or long videos | | `--cpu` | <4GB / no GPU | CPU only (very slow) |

`--reserve-vram N` (GB) leaves headroom for the OS and other apps. Bump it if you OOM intermittently mid-run (VAE decode / audio round-trips spike).

Cache (RAM vs re-run speed)

| Flag | Effect | |------|--------| | `--cache-classic` | Default aggressive caching (fastest re-runs, most RAM) | | `--cache-lru N` | Keep the last N node results (bounded RAM) | | `--cache-ram N` | Cap cache to N GB of headroom | | `--cache-none` | No caching — minimal RAM, re-runs every node |

Attention (speed vs compatibility)

| Flag | Notes | |------|-------| | `--use-sage-attention` | **Recommended** — fast + efficient (needs SageAttention + Triton; see `triton-sageattention`) | | `--use-flash-attention` | Very fast on supported GPUs | | `--use-pytorch-cross-attention` | PyTorch 2.x native — best compatibility | | `--use-split-cross-attention` | Lower VRAM, slower | | `--use-quad-cross-attention` | Sub-quadratic optimization | | (omit) | Auto-selects xFormers if available |

Precision (UNet)

| Flag | Effect | |------|--------| | `--fp16-unet` | Half precision, ~50% VRAM | | `--bf16-unet` | BFloat16, good balance (newer GPUs) | | `--fp8_e4m3fn-unet` | 8-bit float, max savings (newest GPUs) |

Typical recipes:

  • RTX 4090/5090 (24 to 32GB): `--gpu-only --use-sage-attention --cache-classic`
  • 12 to 16GB: `--highvram --use-sage-attention` (or `--fp8_e4m3fn-unet` for big models)
  • 8GB: `--normalvram --use-sage-attention --cache-lru 20`
  • 6GB: `--lowvram -
Read more
@artokun
Ships withcomfyui-mcp

<img src="docs/images/demo-poster.jpg" width="760" alt="The Agent panel driving ComfyUI end to end. Click to watch the demo"> The Agent panel driving ComfyUI end to end. It reads what is installed locally, wires the graph, frees VRAM, and runs the render.

88442 skills4 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
884
Star history of artokun/comfyui-mcp on GitHub, a chart by star-history.com

Other skills on comfyui-mcp.

ai-toolkit-trainer

ai-toolkit-trainer

Train custom LoRAs with ostris AI-Toolkit. Covers WAN 2.2/2.1 (people, styles, video motion) and Z-Image (Turbo & Base, low-VRAM…

@artokun@artokunInstall Skill
anima-base

anima-base

Anime/illustration text-to-image (ANIMA 1.0, ~2B Cosmos DiT). Use for anime, manga, illustrated characters; accepts Danbooru tags…

@artokun@artokunInstall Skill
anima-lora-trainer

anima-lora-trainer

Train a custom anime LoRA on the ANIMA base model with Citron's local Gradio trainer (kohya sd-scripts), <6GB VRAM,…

@artokun@artokunInstall Skill
civitai

civitai

Discover Civitai models with the BUILT-IN download_model action:"search_civitai" and install/generate them locally. Find a…

@artokun@artokunInstall Skill
color-correction

color-correction

Diagnose and fix video/image color OBJECTIVELY with the get_image (action:"analyze_color") tool (scopes/stats such as black/white…

@artokun@artokunInstall Skill
comfyui-core

comfyui-core

Core ComfyUI knowledge covering workflow format, node types, pipeline patterns, and MCP tool usage

@artokun@artokunInstall Skill

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n10d209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
agent-browser

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…

@vercel-labs-2@vercel-labs-2Install Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

@nanocoai@nanocoaiInstall Skill

Questions about troubleshooting.

Which coding agents can use troubleshooting?
troubleshooting installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.