Bake PBR channels such as specular/roughness/opcaity via the Python API?

Hi, Im writing a little script to automate some asset prep tasks and Im looking to be able to bake all commnonly usedPBR channels, (albedo, metallic, specular, roughness, emission, alpha, normal, subsurface and ao).

However since


are all missing in the Cycles baker, are there any workarounds that I could use to bake these channels anyway?

The only “solution” that Ive found so far is be duplicating the material and pluggingthe desired pbr channel input types into the emission inputs (and then baking the specular/roughness/opcaity channels as emission), however obviously that would not really work with all shader setups if you’re using shader nodes such as the specular node (etc).

Are there any other possible solutions to achieve this kind of baking?