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

Enable Smart Memory (Model)

Turning Smart Memory Back On, Right There in the Graph

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

Of the three nodes in DHan315/ComfyUI-Smart-Memory-Override, this is the one people forget exists until they need it. Enable Smart Memory (Model) is the mirror image of Disable Smart Memory (Model): where that node flips ComfyUI's Smart Memory off at runtime, this one flips it back on - same pass-through, same global side effect, opposite direction.

Why you'd ever want the "on" version

Because Smart Memory is global, sticky state, turning it off is easy and turning it back on is annoyingly easy to forget. If you've spent a session with a disable node at the top of a workflow - chasing a post-update OOM, or doing a clean Klein A/B test where the memory manager's caching was contaminating your timings - then switched to your normal production workflow, you've probably watched that workflow behave oddly while quietly wondering why.

Normally the fix is a ComfyUI restart, which resets everything to your launch flags. This node does it mid-session: wire a loaded model through it, and Smart Memory is enabled again for everything that executes after that point. It's the undo button the other two nodes forgot to ship with.

The most common use is as a scope-closer in one graph: disable Smart Memory for the heavy, memory-hungry section of a workflow (say, a Klein 9B edit pass), then re-enable it downstream so the rest of the graph and any workflow you queue afterwards run the way the memory manager intended. Ordering is the whole trick - the node fires when its branch executes, so where you place it in the chain decides how long "off" lasts.

What it does to your model

Nothing. MODEL goes in, the identical MODEL comes out. Under the hood it sets comfy.model_management.DISABLE_SMART_MEMORY = False (and mirrors that into ComfyUI's CLI args so the two don't drift apart), logging "[Smart Memory Override] Smart Memory ENABLED." There is no patching, no weights touched, no per-model scoping - this is a control node wearing a model socket so it runs at the right point in the graph.

Inputs and outputs

One required input, model (MODEL); one output, model (MODEL). No widgets, no choices, nothing to misconfigure. If it's taking you more than ten seconds to wire, you're overthinking it.

Installing it

Same as its siblings. In ComfyUI Manager, search Smart Memory Override and install, or:

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

Restart after. No extra dependencies and no model files - this pack is pure Python glue over ComfyUI's own memory flags, so there's nothing else to download or fight.

When not to bother

If you only ever run one workflow and it's the one that needs Smart Memory off, you never need this node - restarting once with --disable-smart-memory in your launch command does the job for the whole session. Enable earns its place when you're toggling state within a running session: shared machines, long-running servers, batch queues that mix memory-hungry and normal workflows, or anyone else who'd rather not babysit a restart between tests.

If you find yourself swapping this node in and out of a graph constantly, stop and grab the pack's third node, Smart Memory Override (Model), which bundles both directions into one toggle instead of forcing you to switch nodes.

Categorymodel_patches/memory

Inputs (1)

NameTypeDefaultDescription
modelMODEL

Outputs (1)

NameTypeDescription
modelMODEL