ComfyUI Node
Edit Lock π
Keeps every part of your picture that an edit did not change exactly where it was, with the colors it had. Edit models redraw the whole picture, so untouched parts often come back slightly zoomed, shifted or tinted. Put this between the model and the sampler and give it the picture you are editing. It needs no mask: it sees what the edit changes while the picture is made. When the edit changes the whole picture (a new style, new light, new weather) it steps aside. Add Edit Lock Restore π after the decode to get your own pixels back in the untouched parts.
Edit Lock π
- model
- vae
- image
- mask
- model
- edit_lock
βlockautoβΊ
βtolerance1.00βΊ
Categoryπ AusBoss/Image
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | The edit model. Patch last, after any LoRAs. | |
| vae | VAE | The same VAE the workflow decodes with. | |
| image | IMAGE | The picture you are editing, at the size of the result. Use the same picture the edit model gets. | |
| lock | COMBO | auto | auto locks the untouched parts and steps aside when the whole picture changes. always locks even then. off does nothing. |
| tolerance | FLOAT | 1.000.25β4 | How big a change must be to count as part of the edit. Raise it if the lock lets small unwanted changes through; lower it if it holds back part of your edit. |
| maskopt | MASK | Optional. White marks where the edit may happen; everything else is locked. With a mask the node does not look for the change itself. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | MODEL | The model with the lock on. Plug it into the sampler. |
| edit_lock | AUSBOSS_EDIT_LOCK | What the lock kept. Plug it into Edit Lock Restore π after the decode. |