lama
lama copied to clipboard
Prediction with refinement error
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)
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?
Thank you for your work, can you please provide the pre-trained model weights for the lama-refine
@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.