A computer-implemented method comprising: obtaining (i) an input image comprising a region to be inpainted, (ii) an indication of the region to be inpainted in the input image, and (iii) a guide image; determining, by an encoder model, (i) a first latent representation of the input image and (ii) a second latent representation of the guide image; generating a combined latent representation based on the first latent representation and the second latent representation; generating, by a style generative adversarial network (StyleGAN) model and based on the combined latent representation, an intermediate output image comprising inpainted image content for the region to be inpainted in the input image; and generating, based on the input image, the indication of the region to be inpainted, and the intermediate output image, an output image representing the input image with the region to be inpainted comprising the inpainted image content from the intermediate output image, wherein the StyleGAN model comprises a mapping network and a synthesis network, wherein the synthesis network comprises a plurality of style blocks, characterized in that the generating the intermediate output image comprises: generating, by the mapping network, an intermediate latent representation; determining a similarity metric indicative of a similarity between the input image and the guide image; generating, for a respective style block of the plurality of style blocks, an input similarity feature based on a comodulation of (i) an output of a preceding style block of the plurality of style blocks, (ii) the intermediate latent representation, and (iii) the first latent representation; generating, for the respective style block, a fused similarity feature based on a sum of (i) the input similarity feature and (ii) a product of the similarity metric and a comodulation of the input similarity feature and the second latent representation; generating, for the respective style block, an output similarity feature based on a convolution of (i) the input similarity feature and (ii) the fused similarity feature; and providing the output similarity feature as input to the respective style block. obtaining (i) an input image comprising a region to be inpainted, (ii) an indication of the region to be inpainted in the input image, and (iii) a guide image; determining, by an encoder model, (i) a first latent representation of the input image and (ii) a second latent representation of the guide image; generating a combined latent representation based on the first latent representation and the second latent representation; generating, by a style generative adversarial network (StyleGAN) model and based on the combined latent representation, an intermediate output image comprising inpainted image content for the region to be inpainted in the input image; and generating, based on the input image, the indication of the region to be inpainted, and the intermediate output image, an output image representing the input image with the region to be inpainted comprising the inpainted image content from the intermediate output image, wherein the StyleGAN model comprises a mapping network and a synthesis network, wherein the synthesis network comprises a plurality of style blocks, characterized in that the generating the intermediate output image comprises: generating, by the mapping network, an intermediate latent representation; determining a similarity metric indicative of a similarity between the input image and the guide image; generating, for a respective style block of the plurality of style blocks, an input similarity feature based on a comodulation of (i) an output of a preceding style block of the plurality of style blocks, (ii) the intermediate latent representation, and (iii) the first latent representation; generating, for the respective style block, a fused similarity feature based on a sum of (i) the input similarity feature and (ii) a product of the similarity metric and a comodulation of the input similarity feature and the second latent representation; generating, for the respective style block, an output similarity feature based on a convolution of (i) the input similarity feature and (ii) the fused similarity feature; and providing the output similarity feature as input to the respective style block. generating, by the mapping network, an intermediate latent representation; determining a similarity metric indicative of a similarity between the input image and the guide image; generating, for a respective style block of the plurality of style blocks, an input similarity feature based on a comodulation of (i) an output of a preceding style block of the plurality of style blocks, (ii) the intermediate latent representation, and (iii) the first latent representation; generating, for the respective style block, a fused similarity feature based on a sum of (i) the input similarity feature and (ii) a product of the similarity metric and a comodulation of the input similarity feature and the second latent representation; generating, for the respective style block, an output similarity feature based on a convolution of (i) the input similarity feature and (ii) the fused similarity feature; and providing the output similarity feature as input to the respective style block.