The new error is raised by the internally used torchvision.transforms, which only accept a single input.
The linked post shows a custom Compose implementation, which accepts two inputs. However, note that internally a custom transform_ToNumpy transformation was used, which also accepts two inputs.
In your case you could thus apply the torchvision.transforms on both inputs separately.