torch._inductor.config.coordinate_descent_check_all_directions = True It is also important to change the UNet and VAE’s memory layout to “channels_last” when compiling them to ensure maximum speed.   Copied pipe.unet.to(memory_format=torch.channels_last)