A lightweight extension for SD WebUI Forge / reForge that automatically enables ADetailer when you trigger a post-process hires fix on an already-generated image, then disables it once generation completes.
Running ADetailer on every generation is expensive — it adds a full inpaint pass even when you don't need it. But clicking ✨ (hires fix post-process) without ADetailer means faces won't be corrected at the final resolution. Manually toggling the checkbox each time is friction.
This extension hooks into the ✨ hires fix button and manages the ADetailer checkbox automatically:
- You click ✨ on a finished image.
- If ADetailer is off — the extension enables it and remembers it did so.
- Generation runs (hires pass + ADetailer inpaint).
- When generation completes — ADetailer is automatically turned back off.
- If ADetailer was already on when you clicked ✨ — it is left on and not touched on completion.
Via URL:
- Open Extensions -> Install from URL
- Paste:
https://github.com/KazeKaze93/adetailer-hires-sync.git - Click Install, then Apply and restart UI
Manual:
Clone or download this repo into your extensions/ folder, then restart the WebUI.
- SD WebUI Forge or reForge (tested on reForge by Panchovix)
- ADetailer extension installed and configured
Pure frontend — no Python backend. A single JS file is injected via the standard WebUI script loading mechanism.
- Watches
#txt2img_upscale(the ✨ button) for click events - Toggles
[id*="adetailer"] input[type="checkbox"](ADetailer enable toggle) - Uses
MutationObserveron#txt2img_interruptstyle attribute to detect generation start/end - Observer is created fresh on each ✨ click and disconnects after completion
If the extension does not trigger, verify selectors in DevTools (F12 -> Console):
// ADetailer checkbox
gradioApp().querySelector('[id*="adetailer"] input[type="checkbox"]')
// Hires fix button
gradioApp().querySelector('#txt2img_upscale')
// Interrupt button (used for completion detection)
gradioApp().querySelector('#txt2img_interrupt')All three must return an element, not null. If any returns null, the selectors in javascript/adetailer_hires_sync.js need to be updated to match your build.
MIT