A multistage machining process is employed to machine the blades with low stiffness. Nonetheless, machining errors can be transferred and accumulate throughout the multistage machining process, complicating the precise prediction of the final accuracy of thin-walled blades. Consequently, this paper introduces a machining accuracy prediction model for thin-walled blades that takes into account initial error. The machining error prediction model of thin-walled blades is developed using Gaussian process regression optimized by the sparrow search algorithm (SSA-GPR) with the initial contour error, depth of cut, feed per tooth, and spindle speed as inputs, and the machining error as the output. And the results show that the prediction accuracy of the SSA-GPR is 6.73 % higher than that of the Gaussian process regression (GPR), 13.73 % higher than that of the back propagation neural network (BPNN), and 32.32 % higher than that of the support vector machine regression (SVR). The influence of the initial error and milling parameters on the machining error is analyzed through the length-scales of the Gaussian kernel function. The findings indicate that the depth of cut, feed per tooth and initial error significantly affect the machining error, whereas the spindle speed has a minor impact on the machining error. Furthermore, the 3D graph based on the SSA-GPR shows that the increase of the initial error will increase the machining error of thin-walled blades. This research provides a theoretical foundation for the process optimization of thin-walled blades.