Hi,
Could you crop the large images into small patches as preprocess, and then create your custom dataset on small images normally, though this approach makes the extract phase and load separately, but I think it is not complex, so you can have a try.
Best regrads