lama icon indicating copy to clipboard operation
lama copied to clipboard

Prediction with refinement error

Open MacM2Pro opened this issue 1 year ago • 3 comments

When trying refinement option with celeba small masks model:

[2023-09-03 09:44:32,915][main][CRITICAL] - Prediction failed due to not enough values to unpack (expected 2, got 1): Traceback (most recent call last): File "/home/lama/bin/predict.py", line 80, in main cur_res = refine_predict(batch, model, **predict_config.refiner) File "/home/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/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)

MacM2Pro avatar Sep 03 '23 09:09 MacM2Pro

When trying refinement option with celeba small masks model:

[2023-09-03 09:44:32,915][main][CRITICAL] - Prediction failed due to not enough values to unpack (expected 2, got 1): Traceback (most recent call last): File "/home/lama/bin/predict.py", line 80, in main cur_res = refine_predict(batch, model, **predict_config.refiner) File "/home/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/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)

Have you solved this porblem?

leayz-888 avatar Nov 08 '23 09:11 leayz-888

Thank you for your work, can you please provide the pre-trained model weights for the lama-refine

mldemox avatar Dec 10 '23 09:12 mldemox

@MacM2Pro @leayz-888 Hello, looking into the problem, should be an easy fix.

@mldemox the weights for the lama-refine models are same as the original models. The refinement step optimizes the image during runtime, it doesn't use any separate weights.

ankuPRK avatar Jan 04 '24 16:01 ankuPRK