The invention discloses an
image generation method and
system based on
diffusion model adaptive reasoning. The method comprises the following steps: constructing a next
noise intensity prediction module TPM; improving an original
diffusion model, and adding a TPM; the improved
diffusion model is trained by using a
reinforcement learning method, the whole denoising process is expanded for multiple times, the next
time step is predicted in each iteration, an award is calculated according to the quality of a finally generated image and the number of steps, and TPM parameters are updated by using a PPO
loss function; in the actual reasoning process,
noise is randomly sampled from
Gaussian noise and input into the trained diffusion model, the diffusion model is used for predicting a denoising result, meanwhile, the TPM is used for outputting distribution of time steps based on next denoising, and a distribution mode is used as the next
time step used in actual reasoning; and when the predicted
time step is smaller than a set threshold value, a final
image generation result is obtained based on model output. According to the method, the
image generation process can be dynamically adjusted, and a reasoning result with both efficiency and quality is realized.