I have done this for a direct vision finder - the principle should apply to any front-masked viewer. If you have a frame mask for a known size, then measure the vertical and horizontal dimensions. You probably need calipers for this to get it as accurate as possible.
Get the horizontal and vertical measurements for the actual film formats - the one for the existing mask and the one you plan to use. Work out the scale of one dimension to the equivalent on the other format. Then multiply each one by the frame dimension you measured. For a horizontal 4x5in. mask it will be shorter vertically and a little shorter horizontally to get a 6x12 cm mask. Position the new mask aperture so it has the same center location.
If you are being careful, you need to know the actual exposed film dimensions for the two formats. My 6x12 has an image length of 111mm, for example. But the size of the mask is likely small, so errors of measurement there will dominate minor differences is actual film gate size. Take a test picture to see how far off you are if you do not have a ground glass option.
I did this to get a 6x12 frame on this finder:
https://www.thingiverse.com/thing:4424619
I use it with a Will Travel 90mm and Edgar Kech's 6x12 3D printed back.