Nodes/MD Nodes/MD: Model State Reset (Anti-Static)
ComfyUI Node

MD: Model State Reset (Anti-Static)

A ComfyUI node in MD_Nodes/Maintenance with 7 inputs and 2 outputs.

By MDMAchine·Created about a year ago·Updated 2 months ago· 14
MD: Model State Reset (Anti-Static)
  • model
  • clip
  • sanitized_model
  • sanitized_clip
enforce_evaltrue
force_precision_fp32false
unload_vramfalse
debug_mode1 - Info
enable_profilingfalse
CategoryMD_Nodes/Maintenance

Inputs (7)

NameTypeDefaultDescription
modelMODELMODEL INPUT • Purpose: The diffusion model to sanitize. • Requirement: Connect this immediately before your KSampler.
enforce_evalBOOLEANtrueFORCE EVAL MODE • Purpose: Recursively sets .eval() on model components. • Effect: Disables Dropout/Training layers that cause noise. • Fixes: 'Static' degradation and 'glitchy' artifacts in ACE 1.5. ⭐ Recommended: Enabled
force_precision_fp32BOOLEANfalseFORCE FP32 PRECISION • Purpose: Forces the model to run in 32-bit floating point. • Effect: Fixes 'Static' or 'Black Image' outputs caused by FP16 overflow. • Trade-offs: Uses approx 2x more VRAM for weights. ⭐ Recommended: Disabled (Faster, unless experiencing glitches).
unload_vramBOOLEANfalseUNLOAD VRAM (THE NUCLEAR OPTION) • Purpose: Forcefully unloads ALL models from GPU memory. • Effect: Clears 'ghost' tensors that survive soft cache clears. • Trade-offs: Slows down generation (must reload model from RAM). ⭐ Recommended: Disabled (Unless you get persistent OOM errors).
debug_modeCOMBO1 - InfoLOGGING VERBOSITY • Purpose: Controls console output detail level. • Options: 0 (Silent), 1 (Analytics Report), 2 (Full trace). ⭐ Recommended: 1 - Info (to verify fix works).
enable_profilingBOOLEANfalsePERFORMANCE PROFILING • Purpose: Enable detailed operation timing. • Note: Automatically enabled when debug_mode >= 1.
clipoptCLIPCLIP INPUT (OPTIONAL) • Purpose: The Text Encoder to sanitize. • Connect this to reset conditioning state accumulation.

Outputs (2)

NameTypeDescription
sanitized_modelMODEL
sanitized_clipCLIP