I think you could create both Datasets and pass them to a custom Dataset, which concatenates the samples of both underlying Datasets.
I’ve created a small example using ImageFolder:

dataset1 = datasets.ImageFolder(
    root='YOUR_PATH',
    transform=transforms.ToTensor())
dataset2 = datasets.ImageFolder(
    root='YOUR_PATH',
    transform=transforms.ToTensor())


class MyDataset(Dataset):
    def __init__(self, dataset1, dataset2):
        self.dataset1 = dataset1
        self.dataset2 = dataset2
        
    def __getitem__(self, index):
        x1, y1 = self.dataset1[index]
        x2, y2 = self.dataset2[index]
        
        x = torch.stack((x1, x2))
        y = torch.stack((torch.tensor(y1), torch.tensor(y2)))
        
        return x, y
    
    def __len__(self):
        return len(self.dataset1)

dataset = MyDataset(dataset1, dataset2)

loader = DataLoader(
    dataset,
    batch_size=10,
    shuffle=False,
    num_workers=2
)

for data, target in loader:
    data = data.view(-1, *data.size()[2:])
    target = target.view(-1)
    print(data.shape)
    print(target.shape)

As you can see, you will double the actual batch size.
Would that work for you?