torch._inductor.config.coordinate_descent_check_all_directions = True For the full list of compiler flags, refer to this file. It is also important to change the memory layout of the UNet and the VAE to “channels_last” when compiling them. This ensures maximum speed:   Copied pipe.unet.to(memory_format=torch.channels_last)