Nodes/SP-Nodes/ComfyuiRuntimeArgs
ComfyUI Node

ComfyuiRuntimeArgs

Tune ComfyUI's launch flags without touching the .bat file

By bananasss00·Created 2 years ago·Updated 6 days ago· 20
ComfyuiRuntimeArgs
  • opt_in
  • out
  • args_str
fp8_mode
attention
fastfalse
extra_reserved_vram_mb600
disable_smart_memoryfalse

Performance and memory flags like --fp8_e4m3fn-unet or --use-sage-attention normally live in your launch script - change one and you're editing a batch file and restarting the whole server. This node puts a chunk of those same knobs inside the graph itself, which is genuinely useful if you're on a machine where you don't control the launch script, or you're trying to A/B different backends without restarting ComfyUI every time.

How it works

Each input here mirrors a real ComfyUI command-line flag:

  • fp8_mode - off, fp8_e4m3fn, or fp8_e5m2, matching the pair of fp8 storage formats behind ComfyUI's --fp8_e4m3fn-unet / --fp8_e5m2-unet flags. Lower memory, some precision traded away.
  • attention - sage, sdp, or xformers, the three attention backends ComfyUI can run on. sdp is PyTorch's built-in scaled-dot-product attention, xformers is the older third-party backend, and sage is generally the fastest of the three when it's actually installed and compiled correctly.
  • fast - toggles ComfyUI's experimental --fast optimizations.
  • extra_reserved_vram_mb (400–24576, default 600) - mirrors --reserve-vram, extra headroom left unallocated so your OS and other apps don't get starved.
  • disable_smart_memory - mirrors --disable-smart-memory, ComfyUI's automatic model-offloading heuristic. Turning it off trades some optimization for more predictable memory behavior.

It's an output node with two outputs: out (a pass-through * for chaining), and args_str (a string summary of what got configured - handy for logging exactly what settings a given run actually used). There's also an optional opt_in input for wiring in a pass-through condition from elsewhere in the graph.

The honest caveat

Most of these flags configure how weights get loaded and cast - attention backend and fp8 mode especially. That generally happens at model-load time, so don't assume flipping this node mid-session retroactively changes a model that's already loaded into memory. If you change a setting here, the safest bet is to expect it to take effect on the next load, not instantly on the currently-resident model.

How to install it

Through ComfyUI Manager: search "SP-Nodes," install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/bananasss00/ComfyUI-SP-Nodes

Restart ComfyUI afterward.

Common issues

If a setting doesn't seem to take effect, check whether the model in question was already loaded before this node ran - try again after a fresh load rather than assuming the node is broken. Selecting sage for attention specifically requires the sageattention package to already be installed and compiled on your system; picking it here doesn't install anything for you, it just tells ComfyUI to try using it, and if it's missing you'll get an error or a silent fallback rather than a working sage-attention setup.

CategorySP-Nodes

Inputs (6)

NameTypeDefaultDescription
fp8_modeCOMBO3 options: off, fp8_e4m3fn, fp8_e5m2
attentionCOMBO3 options: sage, sdp, xformers
fastBOOLEANfalse
extra_reserved_vram_mbINT600400–24576
disable_smart_memoryBOOLEANfalse
opt_inopt*

Outputs (2)

NameTypeDescription
out*
args_strSTRING