The invention relates to a virtual try-on method based on a
diffusion model,
computer equipment and a program product, and the virtual try-on method comprises the steps: obtaining a clothes graph and a
model graph, respectively obtaining a posture graph, a depth graph, a
mask graph, model potential features and clothes potential features, and inputting the posture graph, the depth graph, the
mask graph, the model potential features and the clothes potential features into a first
control network and a second
control network; performing
convolution on the posture graph and the clothing graph to obtain a posture feature graph, combining the
random noise, the model latent features and the posture feature graph, inputting the combination into a first
control network, and outputting a posture
control vector by the first control network; performing
convolution on the
depth map and the clothing map to obtain a depth feature map, combining the
random noise, the model latent features and the depth feature map, inputting the combination into a second control network, and outputting a depth
control vector by the second control network; injecting a posture
control vector and a depth control vector into an intermediate layer and a decoder of the first
diffusion model to output a fitting image; and comparing the difference loss of the fitting image and the model chart, and training the first control network and the second control network.