Total noob here - can't make the installation wor k #215

Open
opened 2026-01-29 21:45:46 +00:00 by claunia · 2 comments
Owner

Originally created by @LoisGNS on GitHub (Jul 30, 2022).

Hopefully this type of "issue" is permitted. I am just trying to set this up to use it to fix a mess of old photos I've scanned. I was able to follow the installation steps through cloning gfpgan and locating where git (newly downloaded & set up) had stored it. I was also able to locate and setup pip to follow the remaining instructions, and ran into a snag that threw error messages that as a total noob to all this mean zilch to me. Here's the error I get:

File "C:\users[username]\appdata\local\temp\pijpj-install-ugggaesu\basicsr_[lots of characters that console won't let me copy to paste]\setup.py}, line 8, in
import torch
ModuleNotFoundError: No module named 'torch'

I have Python37 running in Windows 7 Professional 64 bit.

If this is too basic an issue to get direct and specific help on, I'd appreciate any links to newbie guides that might help me figure this out myself. I'm not a Python or Github developer - just someone who'd like to use the tool you've created and after spending several hours trying, I can't set it up.

Originally created by @LoisGNS on GitHub (Jul 30, 2022). Hopefully this type of "issue" is permitted. I am just trying to set this up to use it to fix a mess of old photos I've scanned. I was able to follow the installation steps through cloning gfpgan and locating where git (newly downloaded & set up) had stored it. I was also able to locate and setup pip to follow the remaining instructions, and ran into a snag that threw error messages that as a total noob to all this mean zilch to me. Here's the error I get: File "C:\users\[username]\appdata\local\temp\pijpj-install-ugggaesu\basicsr_[lots of characters that console won't let me copy to paste]\setup.py}, line 8, in <module> import torch ModuleNotFoundError: No module named 'torch' I have Python37 running in Windows 7 Professional 64 bit. If this is too basic an issue to get direct and specific help on, I'd appreciate any links to newbie guides that might help me figure this out myself. I'm not a Python or Github developer - just someone who'd like to use the tool you've created and after spending several hours trying, I can't set it up.
Author
Owner

@khushil commented on GitHub (Jul 30, 2022):

Looks like you’re missing a Python module. Try

pip install torchvision

Should install torch as well for you

Basically you’re missing some modules which may mean the pip installs
didn’t work or they’re installed somewhere they can’t be found

On Sat, 30 Jul 2022 at 08:16, LoisGNS @.***> wrote:

Hopefully this type of "issue" is permitted. I am just trying to set this
up to use it to fix a mess of old photos I've scanned. I was able to follow
the installation steps through cloning gfpgan and locating where git (newly
downloaded & set up) had stored it. I was also able to locate and setup pip
to follow the remaining instructions, and ran into a snag that threw error
messages that as a total noob to all this mean zilch to me. Here's the
error I get:

File
"C:\users[username]\appdata\local\temp\pijpj-install-ugggaesu\basicsr_[lots
of characters that console won't let me copy to paste]\setup.py}, line 8,
in
import torch
ModuleNotFoundError: No module named 'torch'

I have Python37 running in Windows 7 Professional 64 bit.

If this is too basic an issue to get direct and specific help on, I'd
appreciate any links to newbie guides that might help me figure this out
myself. I'm not a Python or Github developer - just someone who'd like to
use the tool you've created and after spending several hours trying, I
can't set it up.


Reply to this email directly, view it on GitHub
https://github.com/TencentARC/GFPGAN/issues/223, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJSJTXGC7CTRM2CCWI53T5DVWTJFNANCNFSM55CYZFRQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

--
Sent from Gmail Mobile on my iPad2

@khushil commented on GitHub (Jul 30, 2022): Looks like you’re missing a Python module. Try pip install torchvision Should install torch as well for you Basically you’re missing some modules which may mean the pip installs didn’t work or they’re installed somewhere they can’t be found On Sat, 30 Jul 2022 at 08:16, LoisGNS ***@***.***> wrote: > Hopefully this type of "issue" is permitted. I am just trying to set this > up to use it to fix a mess of old photos I've scanned. I was able to follow > the installation steps through cloning gfpgan and locating where git (newly > downloaded & set up) had stored it. I was also able to locate and setup pip > to follow the remaining instructions, and ran into a snag that threw error > messages that as a total noob to all this mean zilch to me. Here's the > error I get: > > File > "C:\users[username]\appdata\local\temp\pijpj-install-ugggaesu\basicsr_[lots > of characters that console won't let me copy to paste]\setup.py}, line 8, > in > import torch > ModuleNotFoundError: No module named 'torch' > > I have Python37 running in Windows 7 Professional 64 bit. > > If this is too basic an issue to get direct and specific help on, I'd > appreciate any links to newbie guides that might help me figure this out > myself. I'm not a Python or Github developer - just someone who'd like to > use the tool you've created and after spending several hours trying, I > can't set it up. > > — > Reply to this email directly, view it on GitHub > <https://github.com/TencentARC/GFPGAN/issues/223>, or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AJSJTXGC7CTRM2CCWI53T5DVWTJFNANCNFSM55CYZFRQ> > . > You are receiving this because you are subscribed to this thread.Message > ID: ***@***.***> > -- Sent from Gmail Mobile on my iPad2
Author
Owner

@LoisGNS commented on GitHub (Jul 31, 2022):

Thanks for the reply. Before I got your message I got things moving by executing "pip install torch." Do I need Torchvision instead? If so, should I just install it or do I need to uninstall torch first (and if so, how is that done?). I did locate folders named torchvision, torchvision-0.13.0.dist-info under c:\lib\site-packages along with a bunch of other things that were apparently part of the installations, so maybe it's already there now. (Sorry this is so basic - I'm not a Python developer or regular Github user, just a person trying to restore some old photos).

It does run, but I get some Userwarnings that I don't understand:

inference_gfpgan.py:62: UserWarning: The unoptimized RealESRGAN is slow on CPU.
We do not use it. If you really want to use it, please modify the corresponding
codes.

warnings.warn('The unoptimized RealESRGAN is slow on CPU. We do not use it. '
C:\lib\site-packages\torchvision\models_utils.py:209: UserWarning: The paramete
r 'pretrained' is deprecated since 0.13 and will be removed in 0.15, please use
'weights' instead.
f"The parameter '{pretrained_param}' is deprecated since 0.13 and will be remo
ved in 0.15, "
C:\lib\site-packages\torchvision\models_utils.py:223: UserWarning: Arguments ot
her than a weight enum or None for 'weights' are deprecated since 0.13 and wil
l be removed in 0.15. The current behavior is equivalent to passing weights=Non e.
warnings.warn(msg)

The RealERSGAN message seems to be related to the instruction in readme.md:

 # If you want to enhance the background (non-face) regions with Real-ESRGAN,
 # you also need to install the realesrgan package
 pip install realesrgan

So I did that, and have a realesrgan folder in the same place as all the others. I would like to enhance non-face portions of my images - primarily the clothing the subjects are wearing in the photos, which in some cases looks odd in its original state nest to the hugely improved faces. The error message says "if you really want to use it, modify..." but I don't know what mods are appropriate or where to put them. Looking at the referenced code, maybe it's saying that because I don't have cuda (or apparently I don't have it - I don't know what it is), realesrgan shouldn't be run? In that case, would the mod be to comment out lines 60-65 so the check for cuda would be bypassed?

Thanks again for your patience, help, and this really cool project!

@LoisGNS commented on GitHub (Jul 31, 2022): Thanks for the reply. Before I got your message I got things moving by executing "pip install torch." Do I need Torchvision instead? If so, should I just install it or do I need to uninstall torch first (and if so, how is that done?). I did locate folders named torchvision, torchvision-0.13.0.dist-info under c:\lib\site-packages along with a bunch of other things that were apparently part of the installations, so maybe it's already there now. (Sorry this is so basic - I'm not a Python developer or regular Github user, just a person trying to restore some old photos). It does run, but I get some Userwarnings that I don't understand: inference_gfpgan.py:62: UserWarning: The unoptimized RealESRGAN is slow on CPU. We do not use it. _**If you really want to use it, please modify the corresponding codes.**_ warnings.warn('The unoptimized RealESRGAN is slow on CPU. We do not use it. ' C:\lib\site-packages\torchvision\models\_utils.py:209: UserWarning: The paramete r 'pretrained' is deprecated since 0.13 and will be removed in 0.15, please use 'weights' instead. f"The parameter '{pretrained_param}' is deprecated since 0.13 and will be remo ved in 0.15, " C:\lib\site-packages\torchvision\models\_utils.py:223: UserWarning: Arguments ot her than a weight enum or `None` for 'weights' are deprecated since 0.13 and wil l be removed in 0.15. The current behavior is equivalent to passing `weights=Non e`. warnings.warn(msg) The RealERSGAN message seems to be related to the instruction in readme.md: ``` # If you want to enhance the background (non-face) regions with Real-ESRGAN, # you also need to install the realesrgan package pip install realesrgan ``` So I did that, and have a realesrgan folder in the same place as all the others. I would like to enhance non-face portions of my images - primarily the clothing the subjects are wearing in the photos, which in some cases looks odd in its original state nest to the hugely improved faces. The error message says "if you really want to use it, modify..." but I don't know what mods are appropriate or where to put them. Looking at the referenced code, maybe it's saying that because I don't have cuda (or apparently I don't have it - I don't know what it is), realesrgan shouldn't be run? In that case, would the mod be to comment out lines 60-65 so the check for cuda would be bypassed? Thanks again for your patience, help, and this really cool project!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#215