This passage employs the U2-Net model to segment images of spontaneous combustion gangue coarse aggregate (SCGCA) concrete cross-section and randomly placed aggregate library. These methods are used to construct the dataset and subsequently establish and train the diffusion model. Based on this model, a two-dimensional micro-mechanical model of SCGCA concrete was constructed, accurately reproducing the distribution, grading, and shape of the aggregate in the concrete. The size effect of SCGCA concrete is analyzed through experimentation and numerical simulation of two-dimensional micro-models. The findings of the study reveal that the dimension conversion factors for the 100 mm and 200 mm cubic specimens are 0.92 and 1.12 respectively, which demonstrates the evident size effect of SCGCA concrete. The remarkable coherence between the empirical results and the computational simulation results serves as a powerful validation of the durability and efficacy of the model delineated in this paper. In accordance with the theory of Bažant's size effect, this paper elucidates the size effect law of uniaxial compressive strength in SCGCA concrete models ignited spontaneously at different dimensions.