T2I-Adapter icon indicating copy to clipboard operation
T2I-Adapter copied to clipboard

What is the purpose of * 2-1 operations on images during?

Open westfish opened this issue 1 year ago • 2 comments

What is the purpose of performing * 2-1 operations on images during the first stage of encoding during training?This differs from standard SD training, wouldn't it lead to poor encoding in VAE?

image

https://github.com/TencentARC/T2I-Adapter/blob/main/train_seg.py

westfish avatar Apr 13 '23 13:04 westfish

The input of the encoder should range from -1 to 1. The make_batch function in official SD: https://github.com/CompVis/stable-diffusion/blob/main/scripts/inpaint.py#L29:~:text=batch%5Bk%5D%20%3D%20batch%5Bk%5D*2.0%2D1.0

MC-E avatar Apr 14 '23 01:04 MC-E

@westfish Hi, Could you please add your WeChat and ask some questions about training? my email is [email protected].

dmmSJTU avatar Dec 26 '23 15:12 dmmSJTU