Large ham weight losses (WL) in dry-curing are undesired as they lead to a loss of marketable product and penalise the quality of the dry-cured ham. The availability of early predictions of WL may ease the adaptation of the dry-curing process to the characteristics of the thighs and increase the effectiveness of selective breeding in enhancing WL. Aims of this study were (i) to develop Bayesian and Random Forests (RFs) regression models for the prediction of ham WL during dry-curing using on-site infrared spectra of raw ham subcutaneous fat, carcass and raw ham traits as predictors and (ii) to estimate genetic parameters for WL and their predictions (P-WL). Visible-near infrared spectra were collected on the transversal section of the subcutaneous fat of raw hams. Carcass traits were carcass weight, carcass backfat depth, lean meat content and weight of raw hams. Raw ham traits included measures of ham subcutaneous fat depth and linear scores for round shape, subcutaneous fat thickness and marbling of the visible muscles of the thigh. Measures of WL were available for 1672 hams. The best prediction accuracies were those of a Bayesian regression model including the average spectrum, carcass and raw ham traits, with R2 values in validation of 0.46, 0.55 and 0.62, for WL at end of salting (23 days), resting (90 days) and curing (12 months), respectively. When WL at salting was used as an additional predictor of total WL, the R2 in validation was 0.67. Bayesian regressions were more accurate than RFs models in predicting all the investigated traits. Restricted maximum likelihood (REML) estimates of genetic parameters for WL and P-WL at the end of curing were estimated through a bivariate animal model including 1672 measures of WL and 8819 P-WL records. Results evidenced that the traits are heritable (h2 ± SE was 0.27 ± 0.04 for WL and 0.39 ± 0.04 for P-WL), and the additive genetic correlation is positive and high (ra = 0.88 ± 0.03). Prediction accuracy of ham WL is high enough to envisage a future use of prediction models in identifying batches of hams requiring an adaptation of the processing conditions to optimise results of the manufacturing process. The positive and high genetic correlation detected between WL and P-WL at the end of dry-curing, as well as the estimated heritability for P-WL, suggests that P-WL can be successfully used as an indicator trait of the measured WL in pig breeding programs.