comfyui-launch-flags

Selects ComfyUI startup flags for VRAM management, attention backends, and caching strategies.

715|111|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/artokun/comfyui-mcp --skill comfyui-launch-flags
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: comfyui-launch-flags
Source: https://github.com/artokun/comfyui-mcp/tree/main/plugin/skills/comfyui-launch-flags
Command: npx skills add https://github.com/artokun/comfyui-mcp --skill comfyui-launch-flags

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ComfyUI graphs frequently fail with CUDA out-of-memory errors, crawl due to shared-VRAM spill on Windows, or produce black output from incompatible attention backends, and choosing the right launch flags to fix these issues requires deep knowledge of ComfyUI's CLI options.

Core Features & Use Cases

  • Symptom-to-Flag Decision Matrix: Maps concrete failure symptoms (OOM on long video, shared-VRAM creep, RAM blowup when switching models) directly to the correct flags like --novram, --reserve-vram, and --cache-none.
  • Attention Backend Selection: Compares --use-ck-attention, --use-sage-attention, --use-flash-attention, and --use-pytorch-cross-attention, including the known Z-Image incompatibility with SageAttention.
  • Use Case: When an LTX 2 or WAN video workflow OOMs on a 24GB GPU, use this Skill to determine the --novram --cache-none combination, or when Z-Image renders black output, switch to --use-pytorch-cross-attention.

Quick Start

Ask the AI which ComfyUI launch flags to use to fix an out-of-memory error when running a WAN video workflow on a 24GB GPU.

Frequently Asked Questions about comfyui-launch-flags

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix ComfyUI out of memory errors on long video workflows?

Launch ComfyUI with --novram combined with --cache-none for long video models like LTX 2 or WAN. If the run still stalls, add --disable-smart-memory to force aggressive offloading to regular RAM.

Which attention backend should I use for ComfyUI?

Use --use-ck-attention if comfy-kitchen INT8 attention is available on your GPU, otherwise --use-sage-attention for 20-40% faster sampling. The --use-pytorch-cross-attention flag is the highest-quality fallback that always works with no extra dependencies.

Why does Z-Image produce black or garbled output in ComfyUI?

Z-Image does not sample correctly under --use-sage-attention, producing black or garbled results. Relaunch ComfyUI with --use-pytorch-cross-attention instead, which is the safe fallback for Z-Image Turbo and Base.

How do I stop ComfyUI from using shared GPU memory on Windows?

Use --reserve-vram N to reserve N gigabytes of VRAM for the OS, typically 2 to 4 GB. This prevents the Windows WDDM failure mode where the GPU spills into shared memory and throughput collapses mid-run.

What ComfyUI flag helps when switching between large models?

Use --cache-none, which disables result caching and forces every node to re-execute, giving the lowest RAM and VRAM footprint. This is essential when a huge text encoder like FLUX 2's Mistral must fully unload between model switches.

Can I set ComfyUI launch flags through the MCP restart tool?

Not currently. The restart_comfyui tool replays the exact argv of the previous run, so set flags yourself on the python main.py command line, in a run.bat file, or in the SwarmUI backend args box, and the tool preserves them on restart.