How to revert to stock and/or OpenWRT?

I am going to start testing LEDE on my tp-link boxes.
Unless I've missed something from both the Wiki and the documentation, I cannot find the directions for reverting back to stock firmware (very unlikely) or to OpenWRT.
Any hint?

It may be target specific, as each target has its own sysupgrade helper.

Thanks for the answer. I knew this from OpenWRT.
Somehow I was expecting some general information at least to go OpenWRT-->LEDE and LEDE-->OpenWRT.
Would it be safe to just flash LEDE over OpenWRT and viceversa?

Yes. To go back and forth between LEDE and OpenWrt use sysupgrade compatible images, as if you'd upgrade/downgrade OpenWrt.

Is there any guidance for going back to OpenWRT variants, like Gargoyle?

Still the sysupgrade image, but is it possible to do via the GUI, or does it need to be forced (-f) from the command line?

I'd bet it's the same for OpenWRT.

To go to stock (Factory Firmware) It is the same proceduce for tp-links that is was for OpenWRT, you should remove some bytes from header of the .bin stock file (in DD-WRT web there is plenty of already modified files ready to be downloaded)... and you sysupgrade to it...

To go to OpenWRT just sysupgrade as normal, I already tried on more than 10 different tp-link models, had no problems at all.