Skip to content

Should we normalize the image in train_text_to_image_sdxl.py and related scripts #6580

Closed Answered by linjiapro
linjiapro asked this question in Q&A
Discussion options

You must be logged in to vote

My bad. I just checked the torch normalization API definition, it does this:

x = (x-mean)/std

So mean = 0.5, and std = 0.5 makes lots of sense.

I thought the API would change the distribution of the pixel values to force the mean of the values to be 0.5, and the variance to be 0.5. That is why I filed this discussion.

Thanks for the clarification.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by sayakpaul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants