Machine fault diagnosis (FD) is a critical task for predictive maintenance, enabling early fault detection and preventing unexpected failures.Existing FD models have limited generalization across diverse datasets, making them operation-specific.UniFault is a foundation model for fault diagnosis that addresses the challenges of diverse and heterogeneous FD datasets.UniFault achieves state-of-the-art performance, setting a new benchmark for fault diagnosis models in predictive maintenance.