lthero-big / A-watermark-for-Diffusion-Models

This is an unofficial implementation of the Paper by Kejiang Chen et.al. on Gaussian Shading: Provable Performance-Lossless Image Watermarking for Diffusion Models
GNU General Public License v3.0
31 stars 2 forks source link

The images generated before watermarking and after watermarking are different (but in the paper they are the same) #3

Open SLU010 opened 7 months ago

SLU010 commented 7 months ago

Hi, thanks for the awesome work!

May I ask why the generated images before watermarking and after watermarking are different? Since the results in the paper indicate the watermarked image and the original image are almost the same.

lthero-big commented 7 months ago

I think the paper named the gs_watermarked image as the original image, so the fact is , there is no actual original image. Gaussian Shading achieves this by mapping the watermark to latent representations that follow a standard Gaussian distribution, the new latent representation will be totally different from the original latent representation which could generate 'original image' , hence, the watermarked image and the original image are different.

SLU010 commented 7 months ago

Thank you for your reply. Ummm, but then what is the advantage of this compared with tree-ring?

Figure 10 shows that the watermarked process would not lead the generation to be different from the unwatermarked one.

SLU010 commented 7 months ago

Figure 1, 9, and 10 all indicate that the generated images from the watermarked model will be the same with those generated by the original model.

Not only the distribution of the latents would be the same, but also the generation results are exactly the same.

How should we understand that?

lthero-big commented 7 months ago

The latent representation is directly sampled from the encryption message as Figure 3 , it shouldn't have the original representation .Compared to TreeRing, the distrubution presverving method maybe the new feature.

SLU010 commented 7 months ago

Thank you for your nice clarifying!

Then I wonder how the 2nd (Original) and 4th (Ours) columns of Figure 10 are generated? Why they are the same?

lthero-big commented 7 months ago

Notice that there is no the diff image between Ours and Original in Figure 9. So I think the paper use the image generated by GS method as the Original one, then just use this image in different watermark methods. But it's really confusing whether there is a Original image.

SLU010 commented 7 months ago

If you see Figure 1, you should understand original means the images generated by un-watermarked model (or model without watermark).

So Figure 1 (d) is wrong, it should be a different image with Figure 1 (a), similar to the situation in Figure 1 (c).

Figures 9 and 10 are delivering the same information.

lthero-big commented 7 months ago

Yeah, that's so confusing that the concept from Fig 2 is different from Fig 1 .The z_T sampled from the method GaussianDistributionSampling shouldn't be the same as the z_T sampled from the method DistributionPreservingSampling. So I do think the Fig 1(d) isn't correct , the Fig 9 and 10 as well

SLU010 commented 7 months ago

I agree. Thank you for your patient explanation! It does help me understand more.