Hello willcodeforfoo,
Unfortunately, creating the masks "manually" via Python may take even longer time, as it will be required to loop through all the pixels of the PhotoScan.Mask() class instance for every image.
As a workaround I can suggest to script the following: sort the images according to their resolution, create the mask for each group using such "manual" approach and apply to each image in the group.