Nodes/OmniNodes/Model Block Freeze 🧊
ComfyUI Node

Model Block Freeze 🧊

Freeze parts of a model mid-graph to see what each block actually does

By TensorVizionΒ·Created 3 months agoΒ·Updated about 8 hours agoΒ· 0
Model Block Freeze 🧊
  • model
  • model
  • freeze_summary
β—„freeze_inputfalseβ–Ί
β—„freeze_middlefalseβ–Ί
β—„freeze_outputfalseβ–Ί
β—„input_block_start0β–Ί
β—„input_block_end3β–Ί
β—„output_block_start8β–Ί
β—„output_block_end11β–Ί
β—„freeze_strength0.00β–Ί

Here's a workflow-level experiment most people never try: what does a model actually contribute if you zero out its input blocks, or its middle, or its decoder? Model Block Freeze 🧊 lets you answer that in about thirty seconds. It applies zero-weight patches to selected block ranges of a diffusion model, effectively turning those blocks off during inference, and hands you back a working MODEL plus a summary of what got frozen.

Reach for it when you're doing ablation work - style experiments, "is the encoder or decoder doing the heavy lifting here" questions, or teaching yourself what U-Net block ranges mean by seeing their absence. It is not a training tool; it's an inference-time experiment tool. If you were hoping for a LoRA-style partial fine-tune, this isn't that.

How it works

The node clones your model, reads its key patches, and for every key in the ranges you selected adds a patch with freeze_strength weighting. freeze_strength of 0.0 means fully frozen - the default, and what you want for a clean "turned off" ablation; values toward 1.0 keep more of the original weight's effect, so you can dial in partial freezing rather than a hard zero.

The block groups map to the standard diffusion architecture:

  • input blocks - early encoder layers (input_blocks), indexed 0–11 with input_block_start/end defaulting to 0–3
  • middle block - the bottleneck, on/off as a unit
  • output blocks - the decoder (output_blocks), with its own start/end, defaulting to 8–11

The block indices are read straight out of the model's actual key names, and the output freeze_summary tells you how many keys were frozen and which groups - wire it into a text display. If you enable nothing, nothing freezes, and the summary will call that out rather than silently doing nothing.

The inputs that matter

model is the only required wire. After that it's three boolean toggles (freeze_input, freeze_middle, freeze_output) plus the block range integers and freeze_strength. Outputs are the patched model and freeze_summary. Feed the patched model into any sampler and compare against the unpatched version with a fixed seed - that's the discipline that makes ablation results mean anything: change one variable, keep everything else locked.

Installing it

It's part of OmniNodes:

cd ComfyUI/custom_nodes/
git clone https://github.com/TensorVizion/OmniNodes

Restart ComfyUI (or search "OmniNodes" in ComfyUI Manager). No extra dependencies - it uses ComfyUI's own model-patching API, which ships with the app. It registers under TensorVizion/Model Utilities. If it doesn't appear after install, restart completely and check the terminal for [OmniNodes] βœ… Loaded lines.

The honest caveat: freezing blocks is a blunt instrument. Zeroing the middle block can produce garbage that tells you nothing, and results vary wildly by architecture and checkpoint. Treat it as a diagnostic you run for ten minutes, not a production technique.

CategoryTensorVizion/Model Utilities

Inputs (9)

NameTypeDefaultDescription
modelMODELβ€”
freeze_inputBOOLEANfalseβ€”
freeze_middleBOOLEANfalseβ€”
freeze_outputBOOLEANfalseβ€”
input_block_startINT00–11β€”
input_block_endINT30–11β€”
output_block_startINT80–11β€”
output_block_endINT110–11β€”
freeze_strengthFLOAT0.000–1β€”

Outputs (2)

NameTypeDescription
modelMODELβ€”
freeze_summarySTRINGβ€”