n00mkrad / cupscale

Image Upscaling GUI based on ESRGAN
MIT License
2.16k stars 111 forks source link

Cupscale Dependencies missing #135

Open ghost opened 2 years ago

ghost commented 2 years ago

Cupscale is having quite a lot of issues finding the dependencies required to upscale files, let alone update and install them itself.

To start off, the embedded Python installer doesn't install anything even when

It's just going to be stuck indefinitely. Here's a screenshot showing it's stuck installing and a screenshot showing that nothing is being done with cupscale. image image

So i thought, let's install python manually either with Anaconda/miniconda. Or downloading the installer itself. Then, install all the dependencies (e.g opencv and pytorch) using pip.

But guess what, that doesn't work either because Cupscale doesn't recognize it then aswell.

Below are the logs

Running in portable mode. Data folder: C:\Apps\Cupscale\CupscaleData Arg: C:\Apps\Cupscale\Cupscale.exe Detected Card: NVIDIA GeForce RTX 2070 SUPER / GPU: TU104-A / Arch: Turing Initialized Nvidia API. GPU: NVIDIA GeForce RTX 2070 SUPER [DepCheck] CMD: /C python -V [Servers] Ping to nmkd-hz.de: 25 ms [DepCheck] System Python Check Output: Python 3.9.10 [DepCheck] Sys Python Ver: Python 3.9.10 [Servers] Ping to nmkd-cb.de: 128 ms [Servers] Closest Server: Germany (Nürnberg) (25 ms) Parsing Patrons from CSV... Found 15 Gold Patrons, 577 Silver Patrons [MainUI] Dropped 1 file(s), first = C:\Users\example user\Downloads\FVRVuvAUcAAfMf3.jpg [ImgProc] Converting C:\Users\example user\Downloads\FVRVuvAUcAAfMf3.jpg to PngRaw, DelSrc: False, Fill: True, Ext: UseNew [ImgProc] Color depth of FVRVuvAUcAAfMf3.jpg is 24. [ImgProc] Written image to C:\Apps\Cupscale\CupscaleData\loaded-img\temp.png IsDirNcnnModel Exception: Value cannot be null. Parameter name: path. Defaulting to false. [ImgProc] Preprocessing C:\Apps\Cupscale\CupscaleData\img-in\FVRVuvAUcAAfMf3.jpg - Fill Alpha: True [ImgProc] Color depth of FVRVuvAUcAAfMf3.jpg is 24. [CMD] /C cd /D "C:\Apps\Cupscale\CupscaleData\bin\esrgan-pytorch" & python upscale.py --input "C:\Apps\Cupscale\CupscaleData\img-in" --output "C:\Apps\Cupscale\CupscaleData\img-out" --device_id 0 --alpha_mode 0 "C:\Apps\Cupscale\CupscaleData\models\PSNR\16xPSNR.pth" [Python] Traceback (most recent call last): [Python] File "C:\Apps\Cupscale\CupscaleData\bin\esrgan-pytorch\upscale.py", line 9, in [Python] import cv2 [Python] ModuleNotFoundError: No module named 'cv2'

DrPleaseRespect commented 2 years ago

How did you install OpenCV?

Adrinus commented 2 years ago

Similar Issue here, It seems to successfully check the python version, but then claims it cannot find the path specified.

[DepCheck] CMD: /C python -V
[DepCheck] System Python Check Output: Python 3.8.4rc1

The system cannot find the path specified.
[DepCheck] Sys Python Ver: Python 3.8.4rc1

The system cannot find the path specified.
[DepCheck] CMD: /C "S:\Cupscale\CupscaleData\bin\py\python.exe" -V
[DepCheck] Embed Python Check Output: Python 3.8.5

The system cannot find the path specified.
[DepCheck] Embed Python Ver: Python 3.8.5

The system cannot find the path specified.
ghost commented 2 years ago

How did you install OpenCV?

With opening a terminal window in administrator mode and putting in

pip install opencv-python

ghost commented 2 years ago

Guessing the devs don't support this project anymore?

Katzenwerfer commented 2 years ago

He has been working on other stuff lately, so I guess it could be considered out of support for now.

Katzenwerfer commented 2 years ago

Although I have been completely able to use either a system or embedded python runtime correctly, so I, personally, can't see what could be causing your issue.

starshadowx2 commented 2 years ago

Mine was working with embedded Python previously but when I was trying to get someone else setup using this it was having this same issue. I tried running through the embedded Python install again on mine and now I also have the issue and can't use it anymore. It just gets stuck at "Installed 0 MB of 2500."

starshadowx2 commented 2 years ago

So I did more testing with this, the issue is that it downloads embedded Python to CupscaleData\bin\FlowframesData\pkgs\py-tu and it should then move it over to CupscaleData\bin\py but it just doesn't. If you move the files over manually it then works fine.

ghost commented 2 years ago

So I did more testing with this, the issue is that it downloads embedded Python to CupscaleData\bin\FlowframesData\pkgs\py-tu and it should then move it over to CupscaleData\bin\py but it just doesn't. If you move the files over manually it then works fine.

Just to make sure, you've moved the files inside CupscaleData\bin\FlowframesData\pkgs\py-tu to CupscaleData\bin\py? 46cb37be-419d-4189-b0f2-37bee483bdc8 If so, for me, it doesn't work. 5baa83a0-dba7-453f-82c3-e40562e6683b ca8148b7-090b-4224-ba11-06058459ab91

starshadowx2 commented 2 years ago

Maybe it's because mine was working beforehand, and then was broken when I re-ran the dependency checker/installer. I also don't have a system Python installed.

image

starshadowx2 commented 2 years ago

I checked my folder and I also have one called utils which you don't. I tested removing that folder and running the checker and when it's not there it acts the same as yours. Putting it back in fixes it. Maybe try re-downloading embedded Python again and see if that folder shows up?

image

starshadowx2 commented 2 years ago

This is what's in that folder

image

ghost commented 2 years ago

Redownloaded the python dependencies, and didn't get the utils folder.

Even waited for a bit to see if Cupscale would add anything, but it didn't.

starshadowx2 commented 2 years ago

I just had another person test a new install and they got the utils folder and all, just still had to move the files over manually. It's all setup and working fine for them now.

EDIT: We actually just found out that it looks like running the dependency checker is what brings down that utils folder. Try doing that after moving all the Python files over manually.

ghost commented 2 years ago

I just had another person test a new install and they got the utils folder and all, just still had to move the files over manually. It's all setup and working fine for them now.

EDIT: We actually just found out that it looks like running the dependency checker is what brings down that utils folder. Try doing that after moving all the Python files over manually.

Could you explain that a bit more? I got no idea of what to do now.

What do I need to do with the dependency checker? I ran it twice and still didn't get the utils folder.

starshadowx2 commented 2 years ago

So I did another test and it seems like it only downloads the util folder if you have Python Runtime set to "Use Embedded Python if Available" in the settings.

image

ghost commented 2 years ago

So I did another test and it seems like it only downloads the util folder if you have Python Runtime set to "Use Embedded Python if Available" in the settings.

image

Doesn't work for me, even if i set it to "use embedded python" it doesn't download the utils folder.

Blue42hand commented 2 years ago

I'm having the same issue.

pierro42 commented 2 years ago

This could happen if you don't have Python installed at all. It happened to me on a new computer.

rainlizard commented 2 years ago

Installed 0 MB of 2500

Same problem. Here's the steps I took to fix it:

  1. Delete Cupscale folder (important, since things are busted as they are)
  2. Unzip to C drive (dunno if D drive was the issue or not)
  3. Run Cupscale.exe
  4. Be careful not to click anything unnecessary, don't open Dependency Status since that could be what breaks things
  5. Click Settings -> AI settings -> Python Runtime -> Use Embedded Python
  6. Close settings window, a message will pop up and then it'll take you to the Install Embedded Python window
  7. Click the install button, minimize while waiting if you want

Who knows which steps are actually necessary, but follow them all to be sure.

AugmentedRealityCat commented 2 years ago

Thank you so much ! I followed all the steps and it worked for me. There was one more step that I'll add here:

  1. After a long time a small window will pop up but it might be hidden behind other windows and you might think everything is frozen while it's only waiting for you to press the "OK" button to go on with the next step. It's basically waiting for your approval to compress all those dependencies you just downloaded.
  2. A new window will open and you will see text and code scroll up very fast. This will take some more minutes, but after that setup will really be complete. Press OK again.
  3. IT WORKS !

Know you made the day of someone much brighter by sharing this very precious information. This should be on this project's main readme page !

GrahfLacan commented 1 year ago

It worked! Now I can use the program again, thanks!

zer0int commented 1 year ago

I just switched to Win 11 (may or may not be related) and had the same issue. I have a system python.

But: Run, import error "no module utils.whatever", albeit zip file form releases HAS a utils folder.

Works! 👍

Edit: Oops, double-underscore got interpreted.

juelzsantana123 commented 1 year ago

Got it running by installing depencies then move python files as was mensioned before. close - open with admin rights. open settings and select in dropdown use embeded. then click check depencies. close open. and it works now.