Closed FlowDownTheRiver closed 2 years ago
my environment :
(lama) C:\lama-cleaner>conda list
#
ca-certificates 2022.3.29 haa95532_0 certifi 2021.10.8 py38haa95532_2 click 8.1.2 pypi_0 pypi colorama 0.4.4 pypi_0 pypi cudatoolkit 11.3.1 h59b6b97_2 flask 2.1.1 pypi_0 pypi flask-cors 3.0.10 pypi_0 pypi flaskwebgui 0.3.5 pypi_0 pypi importlib-metadata 4.11.3 pypi_0 pypi itsdangerous 2.1.2 pypi_0 pypi jinja2 3.1.1 pypi_0 pypi markupsafe 2.1.1 pypi_0 pypi numpy 1.22.3 pypi_0 pypi opencv-python 4.5.5.64 pypi_0 pypi openssl 1.1.1n h2bbff1b_0 pip 21.2.2 py38haa95532_0 python 3.8.13 h6244533_0 setuptools 58.0.4 py38haa95532_0 six 1.16.0 pypi_0 pypi sqlite 3.38.2 h2bbff1b_0 torch 1.11.0 pypi_0 pypi tqdm 4.64.0 pypi_0 pypi typing-extensions 4.1.1 pypi_0 pypi vc 14.2 h21ff451_1 vs2015_runtime 14.27.29016 h5e58377_2 werkzeug 2.1.1 pypi_0 pypi wheel 0.37.1 pyhd3eb1b0_0 whichcraft 0.6.1 pypi_0 pypi wincertstore 0.2 py38haa95532_2 zipp 3.8.0 pypi_0 pypi
Looks like your model is corrupted. Delete ~/.cache/torch/hub/checkpoints/big-lama.pt
(You should find the corresponding directory under windows) file and run main.py
again
@Sanster Thank you very much for pin-pointing the error.It seems that the model got corrupted.Everything works perfectly now. It works with cuda with pytorch-gpu as well.
I have another problem though.I don't know if this is possible or not. In the UI,to change brush size with a shortcut is assigned to"[" "]" keys. My keyboard layout is unfortunately making it very hard to use. I have to press Alt GR + 8 = [ , and Alt GR + 9 = ] ,to make those symbols. Is there anyway that we can re-assing those keys to like +,- keys on the numpad,or something like holding shift key and mouse scroll up and down to increase brush size ,or decrease it?
C:\lama-cleaner>call conda activate lama
(lama) C:\lama-cleaner>python main.py --device=cpu --gui --gui-size 800 640 --crop-margin 128 Traceback (most recent call last): File "main.py", line 176, in
main()
File "main.py", line 160, in main
model = LaMa(crop_trigger_size=args.crop_trigger_size,
File "C:\lama-cleaner\lama_cleaner\lama__init.py", line 38, in init__
model = torch.jit.load(model_path, map_location="cpu")
File "C:\Users\breakmycurse.conda\envs\lama\lib\site-packages\torch\jit_serialization.py", line 162, in load
cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files)
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
I tried to install pytorch as well with cuda support.It is giving errors.Couldn't find a way to use the lama-cleaner.
How can I solve this issue?