Global Edit Guard
An Automatic 'Don't Lock This One' Switch for Pixel Lock
- bypass
If you use Pixel Lock Composite long enough, you'll hit the case where it's flat-out wrong. "Make it night." "Oil painting." "Replace the background." Those edits should change everything - but a style transfer moves the whole image gently, so the pixel-diff map looks tiny and the lock pastes back almost nothing, silently reverting your edit. In the pack's 374-edit validation sweep, roughly 8% of global edits got wrongly erased this way. Global Edit Guard is the automatic escape hatch: it reads your edit prompt and tells the lock to step aside.
It's the companion node to PixelLockComposite, and it does exactly one thing - no image inputs, no masking, no GPU work. You paste your edit prompt into it, its bypass output goes into Pixel Lock Composite.bypass, done.
How it works (and its honest limits)
Here's the thing you need to know: this is not an LLM, it's a keyword matcher. The node lowercases your prompt and checks it against a hardcoded list of bypass triggers baked into the pack's source - painting styles ("oil paint", "watercolor", "sketch", "anime", "cartoon", "comic"), conversion phrases ("convert to", "turn into", "make it a"), time-of-day ("night", "sunset", "dusk", "dawn", "midnight"), weather and seasons, relighting ("relight", "golden hour", "overcast"), and background replacement ("replace the background", "change the background", "new background"). Any hit returns bypass=True.
The bias is deliberately toward bypass, because a wrong bypass is safe - the raw edit just passes through, which is what you'd have without the lock at all. A wrong lock, meanwhile, erases the edit. So the guard errs on the side of letting things through.
That keyword approach has real consequences. Wording matters: "Make it a watercolor" hits the list, but "paint this like Monet" doesn't. Your escape hatch is the extra_keywords input - comma-separated extra bypass triggers, appended to the built-in list. If you do a lot of "solarize this" or "tilt-shift it" edits, drop those in there.
Inputs and output
- edit_prompt (STRING, multiline) - the same edit instruction you're feeding Qwen-Edit. The more it matches real wording, the better the guard works.
- extra_keywords (STRING, optional) - comma-separated extra bypass triggers.
- Output: bypass (BOOLEAN) - wire this into
PixelLockComposite.bypass.
That's the whole surface. There's no threshold to tune, no confidence slider.
Install and gotchas
Same story as the rest of the pack: search PixelLock in ComfyUI-Manager, or git clone https://github.com/GritAI-Labs/ComfyUI-PixelLock into custom_nodes, restart, done. Zero dependencies, and this node needs even less than the composite - it's a string comparison.
Two failure modes to recognize when things behave oddly. First, a style edit still gets reverted: the guard returned False because your phrasing missed the keyword list - check the bypass value in the UI and add your phrase to extra_keywords. Second, an edit passes through un-locked that you wanted locked: a false positive (say, a "change the sky to sunset" edit tripping "sunset"). You can't remove built-in triggers, so the move there is to reword the prompt or just set bypass manually on the composite. Neither case is a bug in the node; it's what you signed up for with a keyword guard instead of an expensive text model - and for the price of one string comparison, that trade is usually worth it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| edit_prompt | STRING | — | |
| extra_keywordsopt | STRING | Comma-separated extra bypass triggers. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| bypass | BOOLEAN | — |