Open steinhaug opened 1 year ago
Solved by: (1) edit /content/lama/saicinpainting/training/modules/fake_fakes.py, change from kornia import SamplePadding to from kornia.constants import SamplePadding (2) if your colab does not have gpu (torch.cuda.is_available() return false), edit /content/lama/bin/predict.py, change device = torch.device(predict_config.device) (line 43) to device = torch.device("cpu")
I have the same problem but this solution doesn't help
Solved by: (1) edit /content/lama/saicinpainting/training/modules/fake_fakes.py, change from kornia import SamplePadding to from kornia.constants import SamplePadding (2) if your colab does not have gpu (torch.cuda.is_available() return false), edit /content/lama/bin/predict.py, change device = torch.device(predict_config.device) (line 43) to device = torch.device("cpu")
Traceback (most recent call last):
File "/content/lama/bin/predict.py", line 14, in
FileNotFoundError Traceback (most recent call last)
2 frames /usr/local/lib/python3.10/dist-packages/PIL/ImageFile.py in init(self, fp, filename) 103 if is_path(fp): 104 # filename --> 105 self.fp = open(fp, "rb") 106 self.filename = fp 107 self._exclusive_fp = True
FileNotFoundError: [Errno 2] No such file or directory: '/content/output/img_mask.png'
Copy_of_LaMa_inpainting.ipynb.zip
Thank you very much! Finally, it works!
The solution above worked for me for some time but now I'm experiencing a new error:
Run inpainting
Traceback (most recent call last):
File "/content/lama/bin/predict.py", line 15, in
FileNotFoundError Traceback (most recent call last)
2 frames /usr/local/lib/python3.10/dist-packages/PIL/ImageFile.py in init(self, fp, filename) 103 if is_path(fp): 104 # filename --> 105 self.fp = open(fp, "rb") 106 self.filename = fp 107 self._exclusive_fp = True
FileNotFoundError: [Errno 2] No such file or directory: '/content/output/tourist_mask.png'
@MacM2Pro
Still work for me.
But !curl -L $(yadisk-direct https://disk.yandex.ru/d/ouP6l8VJ0HpMZg) -o big-lama.zip
The above link is broken, find this and replace it with:
!curl -LJO https://huggingface.co/smartywu/big-lama/resolve/main/big-lama.zip
@MacM2Pro
Still work for me.
But !curl -L $(yadisk-direct https://disk.yandex.ru/d/ouP6l8VJ0HpMZg) -o big-lama.zip
The above link is broken, find this and replace it with:
!curl -LJO https://huggingface.co/smartywu/big-lama/resolve/main/big-lama.zip
It worked for me.
Hi, I replaced the !curl -LJO https://huggingface.co/smartywu/big-lama/resolve/main/big-lama.zip and edited /content/lama/saicinpainting/training/modules/fake_fakes.py, you need to change from kornia import SamplePadding to from kornia.constants import SamplePadding.
However, it still not work for me. can you check is there any update?
There needs to be some fixes for this to work, it is not working as of now with Python 3.10.
Most of the installer problems are solved with theese:
But in the end I got stuck here. Loaded the image, masked it and finnish. Created mask, display mask image and image drawed on. Last part, do the inpainting crashes.