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
27 stars 2 forks source link

Magic number when recovering latent from the autoencoder #5

Closed yryMax closed 1 month ago

yryMax commented 1 month ago

https://github.com/lthero-big/A-watermark-for-Diffusion-Models/blob/052b5cbf81492c1930dd57e44d53077c1596b13c/extract.py#L43

Hello, first of all thanks for your great work on implementing Gaussian shading! Could you explain how 0.18215 comes from in your method img_to_latents, does that mean scaling the latent after vae encoding? why it has to be this number? Thanks in Advance

lthero-big commented 1 month ago

https://github.com/huggingface/diffusers/issues/437

Sure, there's a discussion about this number, i'm sure u'll get more details on it.