SDXL Model Layer Editor
Scale the base checkpoint's blocks, not just a LoRA's
- model
- model
- analysis
- analysis_json
Most of this pack's block-level tools work on a LoRA's weights. This one works on the SDXL checkpoint itself - scale a UNet block's contribution up or down as an edit to the base model, before any LoRA gets layered on top of it.
What it is and why you'd reach for it
SDXL's UNet has 12 input (encoder) blocks, a mid block, and 12 output (decoder) blocks, and this node gives each one an independent -2 to 2 strength multiplier, with 1.0 meaning unchanged. Because it edits the base model rather than a LoRA, it's the right tool when the thing you want to fix isn't tied to a specific LoRA at all - a checkpoint that's consistently a little too saturated, or a merge that leans too hard into one style, where you want the correction to apply universally rather than being reapplied per-LoRA.
It's one of six model layer editors in ShootTheSound/comfyUI-Realtime-Lora, and the node's own description gives you the same rough block guide the pack uses for its SDXL LoRA-loading nodes: input 0-11 handle structure and composition, the mid block holds high-level features, output 0-5 are the main decoder - with style concentrated around output 1-2 - and output 6-11 handle later, finer detail and texture.
Inputs and outputs that matter
- model - the SDXL checkpoint to edit.
- preset - Default, All Off, Half Strength, Outputs Only, Inputs Only, or Custom for hand-tuning.
- input_0 through input_11, mid, output_0 through output_11, plus other - 26 controls total, each with a toggle and a -2 to 2 strength slider.
- save_preset_name / delete_preset_name (optional) - save a configuration you like, or delete a saved one.
- save_model / save_path / save_filename (optional) - write the edited checkpoint to disk as its own
.safetensorsfile. - source_model_path (optional) - points the save step 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. Works immediately, no extra downloads - model layer editors run out of the box like the rest of the pack's non-training nodes.
Troubleshooting
Zeroed a block hoping for "no contribution" and got noise instead. A strength of exactly 0.0 tends to break a block's residual connection rather than cleanly disable it - stick to roughly 0.5-1.5 for actual adjustments and treat the extremes as deliberate stress-testing, not a normal setting.
Applied a LoRA before this node and the results feel off. Order matters: this is meant to sit upstream of your LoRA loader, editing the base checkpoint so a LoRA applied afterward patches on top of the edited version. Put a LoRA loader before it instead and you're scaling the LoRA's own already-patched weights, not the base model the block guide is describing.
A style edit on output_1 didn't move the needle. That block is the typical strongest style block for SDXL, based on how most fine-tunes distribute their training, but a checkpoint that was itself trained unusually (a heavy merge, or one trained with non-standard settings) can distribute style weight differently. Check analysis after a change rather than assuming the general guide applies to every checkpoint equally.
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 |