>>939538773
add this to the first place you see os.environ

os.environ['PYTORCH_MPS_HIGH_WATERMARK_RATIO'] = '0.0'

that made the out of memory error disappear, but it's still not properly working as it's now complaining about the tensor (the input image to the upscaler) being too large even though it's just 1400x1400. So something's definitely wrong.