yuval-alaluf / SAM

Official Implementation for "Only a Matter of Style: Age Transformation Using a Style-Based Regression Model" (SIGGRAPH 2021) https://arxiv.org/abs/2102.02754
https://yuval-alaluf.github.io/SAM/
MIT License
632 stars 151 forks source link

replicate does not upload images #40

Closed loboere closed 2 years ago

yuval-alaluf commented 2 years ago

Hi, this seems to be an issue with Replicate itself as some other demos are also currently unable to upload images. @bfirsh @andreasjansson Hi guys! Is there something we need to update in our predict / cog files? @loboere, for now, you can try using the Colab notebooks provided in the repo

andreasjansson commented 2 years ago

@loboere do you get an error message? I tried with a png image and got this error: The size of tensor a (4) must match the size of tensor b (3) at non-singleton dimension 0. PNGs have alpha channels which probably should be removed. It could be fixed by adding something like this: https://github.com/eladrich/pixel2style2pixel/blob/c836a3e87c1404005abb7e915798a40a4b244e8a/predict.py#L87

yuval-alaluf commented 2 years ago

Hi @andreasjansson It's interesting that you were able to upload an image. It seems like the area to select or drop an image is grayed out for me so I am unable to upload an image. In the meantime, I'll make the fix to handle PNGs.

andreasjansson commented 2 years ago

@yuval-alaluf that's odd! Were you signed in to Replicate and it was still grayed out?

yuval-alaluf commented 2 years ago

Whoops. Wasn't signed in :) Totally missed that part!
Thanks for the quick response!

yuval-alaluf commented 2 years ago

Just pushed a new Replicate docker with the update to handle PNGs. @andreasjansson Thanks again for the really quick response!

loboere commented 2 years ago

The solution is to create a github account and then in replicate log in with the black button below "upload images", then the upload images button is enabled