Difference between the Space version and Github version.

#2
by Rurrres - opened

Hello @yuvalkirstain , I tried the Github version: https://github.com/yuvalkirstain/PickScore on google colab, but the output probabilities are always slightly different from the output probabilities on https://huggingface.co/spaces/yuvalkirstain/PickScore. I tried many groups of images and prompts on these 2 platforms. And even though the probabilities are different, they are still very similar, usually the difference is from 0.01 to 0.03. Could you please explain why there is such difference?

Are the models different? How do you instantiate each one?

For the one on https://huggingface.co/spaces/yuvalkirstain/PickScore, I didn't change anything or settings on this page, I simply uploaded the images onto it and checked the outputs.

For the one on https://github.com/yuvalkirstain/PickScore, I used google colab notebook and ran the code: "! git clone https://github.com/yuvalkirstain/PickScore" and then I ran "! pip install -r requirements.txt" in the "PickScore" folder. At last, I ran this code(the one from the README.md on github):
image.png

Perhaps it’s different torch versions? Seems like you are using the same model weights, right?

I tried again on google colab, but I didn't change the torch version on colab, it is still "2.0.1+cu118"(I don't know which version it is on Space). And this time I used the code from this(see the image below) instead of the screenshot I showed you about github, I only used the code from line 1 to line 64, and then the output probabilities on colab match the ones on Space. I succeed this time but I still don't know why, but thank you very much.
image.png

Hi there, I found that if both of the images are .png, I can get the same probabilities on Space and google colab, but if one image is .jpeg and one is png, the probabilities on Space and google colab are different(but still very similar).

Sign up or log in to comment