ComfyuiRuntimeArgs
Tune ComfyUI's launch flags without touching the .bat file
- opt_in
- out
- args_str
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, orfp8_e5m2, matching the pair of fp8 storage formats behind ComfyUI's--fp8_e4m3fn-unet/--fp8_e5m2-unetflags. Lower memory, some precision traded away.attention-sage,sdp, orxformers, the three attention backends ComfyUI can run on.sdpis PyTorch's built-in scaled-dot-product attention,xformersis the older third-party backend, andsageis generally the fastest of the three when it's actually installed and compiled correctly.fast- toggles ComfyUI's experimental--fastoptimizations.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.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| fp8_mode | COMBO | 3 options: off, fp8_e4m3fn, fp8_e5m2 | |
| attention | COMBO | 3 options: sage, sdp, xformers | |
| fast | BOOLEAN | false | — |
| extra_reserved_vram_mb | INT | 600400–24576 | — |
| disable_smart_memory | BOOLEAN | false | — |
| opt_inopt | * | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| out | * | — |
| args_str | STRING | — |