ZYM-PKU / UDiffText

UDiffText: A Unified Framework for High-quality Text Synthesis in Arbitrary Images via Character-aware Diffusion Models
MIT License
192 stars 16 forks source link

The image contrast change in the demo image of Fig. 1 #8

Open HaisongDing opened 7 months ago

HaisongDing commented 7 months ago

image

The resulting image seems darker than the input image, is it expected or a bug in the inference code, or a mistack when drawing the demo picture? To my understanding, if you only need to change the "text" within a given mask, the other pixels in the image should not change at all.

Sundragon1993 commented 7 months ago

https://github.com/ZYM-PKU/UDiffText/assets/9301684/18d880c1-f3b3-4913-be74-60b04868372c In my case, the resulting image seems brighter ... @ZYM-PKU could you help to check?

ZYM-PKU commented 7 months ago

The other pixels in the image also change because the model generate the whole image rather than only the masked region. The change of brightness or contrast may be due to:

  1. The intrinsic gap of the pixel distribution between the real-world images (training set) and AI-generated images (testing cases).
  2. The accumulative error in the inference process.