Continuous-variable quantum key distribution (CV-QKD) has made significant progress in the field of quantum communication, operating under strict conditions such as optical diffraction limit, maximum communication distance, and photoelectric detection limit. The optimization of protocol parameters, particularly the modulation variance ($ {V}_{\mathrm{A}} $), is crucial for the feasibility of CV-QKD. However, in space-to-ground CV-QKD scenarios, the high-speed relative motion between low-earth-orbit satellites and ground stations, coupled with limited on-board computing resources, poses challenges for traditional optimization algorithms to meet the real-time demands of rapidly changing space channels.To cope with these challenges, a novel method of optimizing Gaussian-modulation CV-QKD in space channels using a Unet-based approach is proposed in this work. A comprehensive simulation platform for CV-QKD links, generating a substantial training dataset of 126575 samples by changing parameters such as orbital height and zenith angle, is developed in this work. The Unet network, renowned for its symmetric architecture and powerful feature fusion capabilities, is utilized to achieve near-real-time prediction of modulation variance. Our simulation results demonstrate the effectiveness of the proposed method, with the Unet network achieving a remarkable prediction accuracy of 99.25%–99.41% on 6328 datasets, orbital heights between 510 and 710 km, and excess noise levels between 0.01 and 0.03.Compared with the local search algorithm, which takes 14754 s, the Unet-based approach significantly reduces the inference time to just 1.08 s, representing a speed-up ratio of 1.48 × 106. These findings provide a solid theoretical foundation for optimizing real-time parameters in future space-channel CV-QKD experiments, and have made significant progress in the field of quantum communication. The proposed method not only enhances the efficiency of parameter optimization but also ensures the security and reliability of CV-QKD in dynamic space environments.