SD 1.5 Model Layer Editor
Scale the UNet's blocks before any LoRA is applied
- model
- model
- analysis
- analysis_json
SD 1.5's UNet is small and well understood - 12 input blocks, a mid block, 12 output blocks - which makes it a genuinely approachable target for block-level editing rather than something you need a huge analysis dashboard to reason about. This node scales each one independently, on the base checkpoint, before any LoRA touches it.
What it is and why you'd reach for it
This edits the model itself, not a LoRA's weights - every one of SD 1.5's 26 tracked block groups (12 input, mid, 12 output, plus a catch-all) gets its own -2 to 2 strength multiplier, with 1.0 unchanged. Because it operates upstream of the LoRA loader, a LoRA applied afterward is patching your already-adjusted base model rather than the two competing for the same weights. It's one of six model layer editors in ShootTheSound/comfyUI-Realtime-Lora, one per architecture the pack covers.
SD 1.5's UNet architecture is the oldest and most-documented in this pack's lineup - the standard "early input blocks handle structure, mid block handles high-level composition, late output blocks handle fine detail" intuition that underlies a lot of classic ControlNet and IP-Adapter block-targeting advice applies here directly, which makes this node a reasonable place to experiment if you've never touched block-level editing before and want a model small enough to hold the whole picture in your head.
Inputs and outputs that matter
- model - the SD 1.5 checkpoint to edit.
- preset - Default, All Off, Half Strength, or Custom for hand-tuning.
- input_0 through input_11 (12 encoder blocks), mid (the bottleneck), output_0 through output_11 (12 decoder blocks), plus other for anything outside the named set - each with its own toggle and a -2 to 2 strength slider.
- save_preset_name / delete_preset_name (optional) - save a configuration you like under a name, or remove one.
- save_model / save_path / save_filename (optional) - export the edited checkpoint as a standalone
.safetensorsfile. - source_model_path (optional) - points the save operation at the original checkpoint's location.
- Outputs: model (patched, feed to your sampler or a LoRA loader downstream), analysis (text summary), analysis_json (structured data for chaining).
Installing it
ComfyUI Manager: search "Realtime LoRA Trainer." Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ShootTheSound/comfyUI-Realtime-Lora
Restart ComfyUI. No further install needed - model layer editors work immediately, same as the pack's loaders and analyzers.
Troubleshooting
Set a block to 0 hoping for a clean "off" and got garbage instead. Zero is a much harder edit than it sounds - a strength that low can break the residual connections a UNet block relies on rather than cleanly removing its contribution. Stay closer to the 0.5-1.5 range unless you're deliberately breaking something to see what happens.
Put this after your LoRA loader and results got weird. This is meant to sit upstream - edit the base model, then let a LoRA patch on top of the edited version. Downstream of a LoRA loader, you're scaling the LoRA's own already-applied weights unevenly instead of the base checkpoint, which behaves very differently from what the block guide describes.
Edits that worked on one SD 1.5 checkpoint do nothing useful on another. SD 1.5 fine-tunes vary a lot in how their weight is distributed across blocks depending on what and how heavily they were trained - a mid-block edit that fixed a composition issue on one checkpoint isn't guaranteed to transfer to a differently-trained one. Treat any specific block value as a starting point per checkpoint, not a universal setting.
Inputs (61)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | Model from LoadCheckpoint or LoadDiffusionModel | |
| preset | COMBO | Default | Quick preset selection. Individual controls below override when changed. |
| input_0 | BOOLEAN | true | — |
| input_0_str | FLOAT | 1.00-2–2 | — |
| input_1 | BOOLEAN | true | — |
| input_1_str | FLOAT | 1.00-2–2 | — |
| input_2 | BOOLEAN | true | — |
| input_2_str | FLOAT | 1.00-2–2 | — |
| input_3 | BOOLEAN | true | — |
| input_3_str | FLOAT | 1.00-2–2 | — |
| input_4 | BOOLEAN | true | — |
| input_4_str | FLOAT | 1.00-2–2 | — |
| input_5 | BOOLEAN | true | — |
| input_5_str | FLOAT | 1.00-2–2 | — |
| input_6 | BOOLEAN | true | — |
| input_6_str | FLOAT | 1.00-2–2 | — |
| input_7 | BOOLEAN | true | — |
| input_7_str | FLOAT | 1.00-2–2 | — |
| input_8 | BOOLEAN | true | — |
| input_8_str | FLOAT | 1.00-2–2 | — |
| input_9 | BOOLEAN | true | — |
| input_9_str | FLOAT | 1.00-2–2 | — |
| input_10 | BOOLEAN | true | — |
| input_10_str | FLOAT | 1.00-2–2 | — |
| input_11 | BOOLEAN | true | — |
| input_11_str | FLOAT | 1.00-2–2 | — |
| mid | BOOLEAN | true | — |
| mid_str | FLOAT | 1.00-2–2 | — |
| output_0 | BOOLEAN | true | — |
| output_0_str | FLOAT | 1.00-2–2 | — |
| output_1 | BOOLEAN | true | — |
| output_1_str | FLOAT | 1.00-2–2 | — |
| output_2 | BOOLEAN | true | — |
| output_2_str | FLOAT | 1.00-2–2 | — |
| output_3 | BOOLEAN | true | — |
| output_3_str | FLOAT | 1.00-2–2 | — |
| output_4 | BOOLEAN | true | — |
| output_4_str | FLOAT | 1.00-2–2 | — |
| output_5 | BOOLEAN | true | — |
| output_5_str | FLOAT | 1.00-2–2 | — |
| output_6 | BOOLEAN | true | — |
| output_6_str | FLOAT | 1.00-2–2 | — |
| output_7 | BOOLEAN | true | — |
| output_7_str | FLOAT | 1.00-2–2 | — |
| output_8 | BOOLEAN | true | — |
| output_8_str | FLOAT | 1.00-2–2 | — |
| output_9 | BOOLEAN | true | — |
| output_9_str | FLOAT | 1.00-2–2 | — |
| output_10 | BOOLEAN | true | — |
| output_10_str | FLOAT | 1.00-2–2 | — |
| output_11 | BOOLEAN | true | — |
| output_11_str | FLOAT | 1.00-2–2 | — |
| other | BOOLEAN | true | — |
| other_str | FLOAT | 1.00-2–2 | — |
| save_preset_nameopt | STRING | Enter preset name, then click Save Preset button (or leave for file sync on execute) | |
| delete_preset_nameopt | STRING | Preset to delete (filled automatically by Delete button) | |
| browser_presets_jsonopt | STRING | {} | JSON of all browser presets (auto-filled by JS for sync) |
| save_modelopt | BOOLEAN | false | Save modified model to disk (large files!) |
| save_pathopt | STRING | Directory to save modified model | |
| save_filenameopt | STRING | Filename for saved model (timestamp added) | |
| source_model_pathopt | STRING | Path to original model file (for copying metadata). Required for saved model to load correctly. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| model | MODEL | Model with block modifications applied |
| analysis | STRING | Text analysis of model structure |
| analysis_json | STRING | JSON analysis data |