Bringing-Old-Photos-Back-to-Life icon indicating copy to clipboard operation
Bringing-Old-Photos-Back-to-Life copied to clipboard

List Index Out of Range

Open yeasir2148 opened this issue 3 years ago • 6 comments

I tried two images. Both very old, one with lots of scratches, the other with some. I got List Index Out of Range both times.

yeasir2148 avatar Jan 13 '22 02:01 yeasir2148

Hi @yeasir2148 Can you please provide more details about what you tried? It'll be great if you could mention the steps to reproduce, the environment, and the setup in which you ran the model. Thanks.

noobyogi0010 avatar Jan 20 '22 17:01 noobyogi0010

Hi @yeasir2148 Can you please provide more details about what you tried? It'll be great if you could mention the steps to reproduce, the environment, and the setup in which you ran the model. Thanks.

Hi @noobyogi0010 ,

Thanks for replying. Here are the steps:

  • Visit https://replicate.com/microsoft/bringing-old-photos-back-to-life
  • Select the Overview tab
  • Select the Run Model tab (If you are not alraedy there)
  • Upload an image on the Input section
  • Check the with_scratch checkbox
  • Click Submit

Upon submitting, on the right hand side of the page, you get the Output section, where on step/stage 4, I get the error List index out of range Screenshot from 2022-01-22 14-37-32

Iniput image: Untitled-4

yeasir2148 avatar Jan 22 '22 03:01 yeasir2148

Happened to me as well in replicate.com. Also tried in collab but no error output, only that the output file is not generated. Any workaround?

agriardyan avatar Feb 26 '22 15:02 agriardyan

hello ,How much memory do you use, i use 3080ti to restore 640*480 pic, it suggests out of memory

tongchangD avatar Mar 03 '22 08:03 tongchangD

Try checking the HR box, worked for me.

rodrigobdz avatar Apr 10 '22 08:04 rodrigobdz

Does not work "GPU -1"

python run.py --input_folder /home/alex/Bringing-Old-Photos-Back-to-Life/test_images/old_w_scratch/ --output_folder /home/alex/Bringing-Old-Photos-Back-to-Life --GPU -1 Running Stage 1: Overall restoration test.py:19: DeprecationWarning: BILINEAR is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BILINEAR instead. def data_transforms(img, method=Image.BILINEAR, scale=False): Traceback (most recent call last): File "test.py", line 98, in model.initialize(opt) File "/home/alex/Bringing-Old-Photos-Back-to-Life/Global/models/mapping_model.py", line 136, in initialize self.netG_A.cuda(opt.gpu_ids[0]) IndexError: list index out of range Finish Stage 1 ...

Running Stage 2: Face Detection Finish Stage 2 ...

Running Stage 3: Face Enhancement The main GPU is Traceback (most recent call last): File "test_face.py", line 13, in opt = TestOptions().parse() File "/home/alex/Bringing-Old-Photos-Back-to-Life/Face_Enhancement/options/base_options.py", line 285, in parse print(opt.gpu_ids[0]) IndexError: list index out of range Finish Stage 3 ...

Running Stage 4: Blending Finish Stage 4 ...

All the processing is done. Please check the results.

Rumlinv avatar Dec 04 '22 10:12 Rumlinv