The invention discloses a
diffusion model migration method based on
prediction residual guidance and a related device, and relates to the technical field of
diffusion model knowledge migration, and the method comprises the steps: taking
noise data as input at each denoising
time step, and carrying out denoising on the
noise data; determining a first prediction
noise, a second prediction noise and a third prediction noise by using the basic model, the adaptive model and the target model respectively, calculating a deviation between the first prediction noise and the second prediction noise to obtain a
prediction residual error, performing weighted summation on the third prediction noise and the
prediction residual error to obtain a guide prediction noise, and outputting the guide prediction noise. And on the basis of the noise data and the guide prediction noise, noise data of the next denoising
time step is calculated until the last denoising
time step is reached, and an output result of the target model is obtained, and the output result is a picture, a video, a voice or a text. According to the method, the knowledge migration of the
diffusion model can be completed on the premise of not accessing original training data and not training.