Hitting a weird error to do with RNGs in Scan in a custom function inside a Potential

You don’t even need consider_constants, the old grad call should work fine. Just ignore *args in the inner function.