In order to realize the fast simulation and prediction of solidification defects,a molding defect prediction model of melt-cast explosives was proposed based on conditional variational autoencoder(CVAE).Taking the process parameters such as injection temperature,riser preheating temperature and so on as conditions,the conditional probability model of the rela-tionship between the melt-cast explosives defects and the process parameters was established by the CVAE.For RHT and DNP-based melt-cast explosives,the prediction of melt-casting defects was implemented by training the models of the multilayer neural network combined with the variational inference method.The results show that,compared with the results of the direct numerical calculations of finite elements,the prediction accuracy of the CVAE algorithm in calculating the defect location rea-ches 99%,and the computation time is less than 2 s.The CVAE has an excellent performance in the modeling of the probability distribution of defects in melt-cast explosives with a strong generalization,and the trained models can be used to realize intelli-gent prediction of molding defects of melt-cast explosives.