Ah, I wasn’t sure how transforms were written. It has the same results as the lambda approach, though–it won’t pickle if local and will endlessly loop when placed globally.
I was thinking the easiest way would be to subclass ImageFolder and alter the format before returning the item e.g.
class MyImageFolder(datasets.ImageFolder):        
    def __getitem__(self, index: int) -> Tuple[Any, Any]:
        
        sample, target = super().__getitem__(self, index)
        sample = sample.to(memory_format=torch.channels_last)
        
        return sample, target

But that hangs in the exact same manner as well. The model trains fine (if with a big penalty to performance) if the conversion is done with input within the training loop, or left implicitly (which oddly has a lower performance hit, but still about 4x vs not changing the channel format.