advimman / lama

🦙 LaMa Image Inpainting, Resolution-robust Large Mask Inpainting with Fourier Convolutions, WACV 2022
https://advimman.github.io/lama-project/
Apache License 2.0
7.91k stars 838 forks source link

predict, ValueError:not enough values to unpack (expected 2, got 1) #274

Open leayz-888 opened 11 months ago

leayz-888 commented 11 months ago

First of all, thank you for your great work! I want to use a lama-fourier model trained on the places dataset to make predictions on my own dataset, the command I use is: python ./bin/predict.py model.path=/home/project/lama/lama-regular/ indir=/home/project/lama/my_dataset/eval/random_medium_512/ outdir=/home/project/lama/inference/my_dataset /random_medium_512, I set refine to True, but got an error: File "./bin/predict.py", line 75, in main cur_res = refine_predict(batch, model, **predict_config.refiner) File "/home/project/lama/saicinpainting/evaluation/refinement.py", line 308, in refine_predict image_inpainted = _infer(image, mask, forward_front, forward_rears, image_inpainted, orig_shape, devices, ids, n_iters, lr) File "/home/project/lama/saicinpainting/evaluation/refinement.py", line 128, in _infer z1,z2 = forward_front(masked_image) ValueError: not enough values to unpack (expected 2, got 1) But when I set refine to False, this problem disappears. How can I solve this problem? Greatful!

ankuPRK commented 9 months ago

Hey thanks for raising the issue. I'm looking into it, will release a fix soon!