mirror of
https://github.com/TencentARC/GFPGAN.git
synced 2026-02-16 22:34:34 +00:00
IndexError: list index out of range #83
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ullaf on GitHub (Oct 12, 2021).
When I try to run inference commands, I always get errors that prevent successful image elaboration.
When I try load extensions just-in-time (JIT), I get IndexError: list index out of range
When I try not to use JIT, I get as error message NameError: name 'fused_act_ext' is not defined, which was discussed earlier here: https://github.com/TencentARC/GFPGAN/issues/5
so I tried installing this as suggested, but I still get the same errors above
Here is the output of conda list, hope this helps. I don't know how to solve this problem. Thank you.
@ChystovaK commented on GitHub (Oct 15, 2021):
Had the same problem. How i fixed it: uninstall current version of torch(by default one of the packages pulls version without cuda support), then installed torch with cuda support. To check that everything works correctly type in python terminal:
import torch
torch.cuda.is_available()
It should return True.
Then it works just fine.
@ullaf commented on GitHub (Oct 17, 2021):
Tried that, torch.cuda.is_available() still returns False. Could it be due to the fact my GPU is not nVidia?
How should I edit things to make PaperModel (with colorization) run in CPU mode (plus RealESRGAN for backgrounds, which is also something I can't manage to apply despite having edited inference_gfpgan.py and downloaded RealESRGAN_x2plus.pth ?
I run the following cmd:
python inference_gfpgan.py --upscale 2 --bg_upsampler realesrgan --test_path inputs --save_root results
I did make the following edits in inference_gfpgan.py
model_path='Path/OnMyPC/RealESRGAN_x2plus.pth',
half=False) # need to set False in CPU mode
Yet the inference (especially if there are no faces in the picture) is very fast (maybe a bit too fast) and not surprisingly the generated image in the results folder is about the same as the one in the input folder.
Thank you
@alexliyang commented on GitHub (Nov 2, 2021):
when I use “BASICSR_EXT=True pip install basicsr“ to install basicsr, then I use the recommended train command, but always give error msg like :" NameError: name 'fused_act_ext' is not defined ".
the basicsr version is 1.3.4.6
@chancsy commented on GitHub (Jun 12, 2022):
When reinstalling, with BASICSR_EXT=True, using
pip install basicsr --no-cache-dirworks for me, as it force pip not to use previously built wheel and rebuild using the new environment variable