Our research introduces an advanced deep learning-based quality control system for Fused Deposition Modeling (FDM) 3D printing, leveraging the Data-efficient Image Transformer (DeiT) to detect defects like warping, layer delamination, and raster gaps with 99.3% accuracy. The system ensures real-time monitoring with a response time of 0.1121 seconds, paving the way for smarter, more efficient Industry 4.0 manufacturing.