This article discusses the use of advanced accelerator-based light sources, specifically free electron lasers, for dynamic imaging in structural biology. It introduces a non-invasive virtual diagnostic tool for precise control of electron beams, which is essential for producing high-quality light flashes. The tool is based on a generative conditional diffusion model and has been successfully demonstrated on experimental data from the European X-ray FEL.