Nodes/Smart Memory Override/Disable Smart Memory (Model)
ComfyUI Node

Disable Smart Memory (Model)

The Node That Turns Off Smart Memory Without Restarting ComfyUI

By DHan315·Created 2 days ago·Updated a day ago· 0
Disable Smart Memory (Model)
  • model
  • model

You know the feeling: a workflow that ran fine yesterday starts OOM-ing or dragging the model off the SSD every single run after a ComfyUI update. Half of Reddit's fix for that is a launch flag - --disable-smart-memory - which works, except it means editing your startup command and restarting the whole app for one graph. Disable Smart Memory (Model) does the same flip from inside the workflow, at runtime, no restart.

It comes from a tiny pack, DHan315/ComfyUI-Smart-Memory-Override, that exists to answer one question: how do you control ComfyUI's Smart Memory per-workflow instead of per-launch?

What Smart Memory actually is

Smart Memory is ComfyUI's newer automatic model-memory manager - the thing that decides when a model stays resident, when it offloads to RAM, and what gets reloaded between runs. It's global ComfyUI state, and the flag it obeys is a single boolean, comfy.model_management.DISABLE_SMART_MEMORY, initialized at startup by the --disable-smart-memory launch flag.

This pack is careful to say it targets Smart Memory not Dynamic VRAM, the earlier (and also memory-related) system. If you're chasing a Dynamic VRAM quirk, this node is aimed at a different off-switch than the one you're hunting. The pack's README also warns you not to stack this with an old "Disable Dynamic VRAM" node when you want a clean test - two memory managers fighting each other makes the result meaningless.

How it works

Wire any loaded model into it and it does two things: sets mm.DISABLE_SMART_MEMORY = True (mirroring the same flag into ComfyUI's CLI args so they don't disagree), then passes your model through completely untouched. That's the whole mechanism - there is no model patching here. The model socket is basically a hanger: it's how the node gets placed in the graph's execution order so the flag flips at the right moment, right after the loader runs and before the sampler.

The pack's own suggested wiring: Klein Model Loader → Disable Smart Memory (Model) → sampler. It's aimed squarely at Klein (the small Flux 2 family) users A/B-testing the 4B vs 9B or base-vs-distilled checkpoints, where the memory manager's caching between runs muddies both timing and VRAM headroom.

The input that matters

There's exactly one: a MODEL in, and one MODEL out. No widgets, nothing to configure. Drop it between your model loader and sampler and you're done.

Installing it

Through ComfyUI Manager, search for Smart Memory Override (the pack title) and hit install. Manually, it's the usual:

cd ComfyUI/custom_nodes
git clone https://github.com/DHan315/ComfyUI-Smart-Memory-Override

Then restart ComfyUI. The good news: there are no extra dependencies (its package file lists zero), no model downloads, no requirements to fight. You do need a ComfyUI build new enough to have Smart Memory at all - that flag only exists in 2026-era releases.

The traps

The name is a small lie. "Disable Smart Memory (Model)" sounds per-model, but it isn't - Smart Memory is global state, and the README says so bluntly. Once flipped, it stays flipped until another override node changes it or you restart ComfyUI, and it affects every graph you run afterward in the same session. If you drop it into one workflow and then run another workflow that wanted Smart Memory on, the second one silently inherits "off."

Also remember it only fires when its branch actually executes. If the node is bypassed, or its branch isn't on the path to an output node, the flag never flips and you'll be staring at the same OOM wondering what went wrong. The only trace it ran is a console line - "[Smart Memory Override] Smart Memory DISABLED (DISABLE_SMART_MEMORY=True)." A restart returns you to whatever your launch flags say.

If you've just been bitten by a post-update regression and want your old behavior back without touching startup scripts, this is the one you'll reach for. If you want to flip back and forth, use its sibling Smart Memory Override (Model) instead, which has an on/off switch built in.

Categorymodel_patches/memory

Inputs (1)

NameTypeDefaultDescription
modelMODEL

Outputs (1)

NameTypeDescription
modelMODEL