  The new framework for the simulations of hard diffractive events in
photoproduction within Pythia 8 is presented. The model, originally introduced
for proton-proton collisions, applies the dynamical rapidity gap survival
probability based on the multiparton interaction model in Pythia. These
additional interactions provide a natural explanation for the observed
factorization-breaking effects in hard diffraction by filling up the rapidity
gaps used to classify the events of diffractive origin. The generated cross
sections are well in line with the existing data from HERA experiments and
predictions for the future electron-ion collider are presented. In addition,
also predictions for ultra-peripheral collisions at the LHC have been
calculated where the factorization-breaking effects are found to be more
pronounced.
