LPengYang / FreeDrag

Official Implementation of FreeDrag (CVPR 2024)
https://lin-chen.site/projects/freedrag/
409 stars 20 forks source link

Usage - requirements - custom pictures - questions #2

Closed gee666 closed 1 year ago

gee666 commented 1 year ago

I am sorry for a lot of questions in the same card. Actually everything eventually works on my side and these are more questions and "smart remarks" than actual issues. Thank you very much for the attention and answers and for the amazing instrument.

  1. I try to follow the installation instructions:

Then download the pre-trained models of stylegan2 bash download_models.sh

this didn't work because of the first line cd checkpoints - it says there's no such directory. And then when it didn't switch, it tries to execute the second line rm * being still in the root directory of the repository, actually destroying the repository. But it all was solved just by adding mkdir checkpoints

  1. Whould it be possible to add the requirements.txt file to the repository? it would be helpful to have it.

  2. And one more question to add attr share to the gradio launch function. For now I added it manually into the code to be able to launch the shared interface.

  3. And then I am not able to upload my own picture. Though it works beautifully on the sample pictures, The picture appears in the interface, I can put the dots blue and red on the custom picture, but when I run it, when I press "drag it", it shows me the orginal picture back instead of my custom picture.

LPengYang commented 1 year ago

Hi, thanks a lot for your valuable feedback, the point-to-point responses are listed as follows:

  1. We have added "mkdir checkpoints" in the download_models.py
  2. The requirements.txt and license files will be available in a few days.
  3. We have modified FreeDrag_gradio.py (add "share=True") to enable a shared interface.
  4. Based on the ethical consideration, the current version does not support the editing of uploaded real images, we are considering a solution to make a balance.
aimarxjg commented 1 year ago

伦理考虑???!!!

LPengYang commented 1 year ago

伦理考虑???!!!

Hi, 为了避免对真实人脸图片的恶意编辑,所以目前版本没有接入对真实图片的编辑功能,我们会在这周/下周更新中加入对真实图片的编辑功能,同时对编辑的真实人脸图片打上水印来避免恶意编辑的危害。

LPengYang commented 1 year ago

The function of real image editing is available now. You can upload your images and then edit them as before. For a high-quality image inversion, it is suggested to make sure that the resolution and style (such as layout) of the uploaded images are consistent with the generated images of corresponding model.