lllyasviel / sd-forge-layerdiffuse

[WIP] Layer Diffusion for WebUI (via Forge)
Apache License 2.0
3.86k stars 331 forks source link

Why are image values ​​normalized to [0, 1] instead of [-1, 1] #36

Closed xiaohu2015 closed 8 months ago

xiaohu2015 commented 8 months ago

https://github.com/layerdiffusion/sd-forge-layerdiffusion/blob/main/lib_layerdiffusion/utils.py#L7-L10 vae should use [-1, 1] to encode image

layerdiffusion commented 8 months ago

https://github.com/lllyasviel/stable-diffusion-webui-forge/blob/b9705c58f66c6fd2c4a0168b26c5cf1fa6c0dde3/modules_forge/forge_loader.py#L239

https://github.com/lllyasviel/stable-diffusion-webui-forge/blob/b9705c58f66c6fd2c4a0168b26c5cf1fa6c0dde3/ldm_patched/modules/sd.py#L308

xiaohu2015 commented 8 months ago

thanks a lot