The embodiment of the invention discloses an
image editing and generating method and device,
electronic equipment and a storage medium, and relates to the technical field of
image generation, and the method comprises the steps: obtaining a to-be-processed image and a target instruction, constructing an
image description of the to-be-processed image according to a scene in the to-be-processed image, converting the
image description into a text mark, and storing the text mark in the target instruction; the method comprises the steps of obtaining a to-be-processed image, embedding a text mark into a high-dimensional space through an embedding model to obtain text embedding, obtaining an element vector of the to-be-processed image according to the to-be-processed image and the text embedding through a
diffusion model, designing an editing operator according to a target instruction, updating the element vector by using the editing operator, and generating a result image according to the updated element vector through the
diffusion model. According to the method, efficient, accurate and flexible editing of the image is realized by combining the
diffusion model and the editing operator, and the problems that the expression of the model on a specific target category cannot be improved, the problem of long
tail distribution cannot be solved and data similar to a real scene cannot be generated in the prior art are solved.