ComfyUI Node
Inverted Pruning
A ComfyUI node in network_bending with 9 inputs and 1 output.
Inverted Pruning
- model
- model
◄pruning_modemagnitude_inverted►
◄threshold0.10►
◄target_layersall►
◄preserve_functionality0.0►
◄seed-1►
◄gradient_accumulation_steps1►
◄use_actual_gradientstrue►
◄gradient_loss_typereconstruction►
Categorynetwork_bending
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | The model to apply inverted pruning to | |
| pruning_mode | COMBO | magnitude_inverted | Type of inverted pruning to apply |
| threshold | FLOAT | 0.100–0.99 | Percentage of weights to remove (0.1 = remove top 10% most important) |
| target_layers | STRING | all | Comma-separated layer patterns (e.g., 'attention', 'conv', 'mlp') |
| preserve_functionality | FLOAT | 0.00–1 | How much to preserve base functionality (0=pure degradation, 1=mild effect) |
| seed | INT | -1-1–4294967295 | Random seed for reproducible pruning (-1 for random) |
| gradient_accumulation_stepsopt | INT | 11–10 | Number of gradient accumulation steps for more stable importance estimation |
| use_actual_gradientsopt | BOOLEAN | true | Use actual gradient computation (slower but more accurate) or simplified method |
| gradient_loss_typeopt | COMBO | reconstruction | Loss function for gradient computation |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | Model with inverted pruning applied |