cupscale icon indicating copy to clipboard operation
cupscale copied to clipboard

Cupscale Dependencies missing

Open ghost opened this issue 2 years ago • 24 comments

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

  • Python and miniconda are uninstalled
  • the app is reinstalled

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'

ghost avatar Jun 15 '22 14:06 ghost

How did you install OpenCV?

DrPleaseRespect avatar Jun 15 '22 16:06 DrPleaseRespect

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.

Adrinus avatar Jun 16 '22 23:06 Adrinus

How did you install OpenCV?

With opening a terminal window in administrator mode and putting in

pip install opencv-python

ghost avatar Jun 17 '22 21:06 ghost

Guessing the devs don't support this project anymore?

ghost avatar Jun 24 '22 15:06 ghost

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

Katzenwerfer avatar Jun 24 '22 16:06 Katzenwerfer

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.

Katzenwerfer avatar Jun 24 '22 16:06 Katzenwerfer

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 avatar Jun 28 '22 22:06 starshadowx2

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.

starshadowx2 avatar Jul 01 '22 03:07 starshadowx2

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

ghost avatar Jul 01 '22 09:07 ghost

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 avatar Jul 02 '22 01:07 starshadowx2

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 avatar Jul 02 '22 03:07 starshadowx2

This is what's in that folder

image

starshadowx2 avatar Jul 02 '22 03:07 starshadowx2

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.

ghost avatar Jul 02 '22 12:07 ghost

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.

starshadowx2 avatar Jul 03 '22 19:07 starshadowx2

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.

ghost avatar Jul 04 '22 00:07 ghost

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

starshadowx2 avatar Jul 06 '22 07:07 starshadowx2

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.

ghost avatar Jul 07 '22 15:07 ghost

I'm having the same issue.

Blue42hand avatar Aug 25 '22 07:08 Blue42hand

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

pierro42 avatar Aug 28 '22 13:08 pierro42

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.

rainlizard avatar Aug 31 '22 03:08 rainlizard

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 !

AugmentedRealityCat avatar Oct 15 '22 21:10 AugmentedRealityCat

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

GrahfLacan avatar Jun 04 '23 00:06 GrahfLacan

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

  • Download zip file from latest release, extract to C:/users/your_name/cupscale (Windows does not approve of programs messing around on Desktop and other "protected" user folders)
  • Right click cupscale.exe -> run as admin -> drag'n'drop disabled warning [ok] -> check dependencies. Suddenly, all green / system python detected.
  • Close cupscale, open (without admin) -> now all dependencies ok in normal launch, too.

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

  • Solution: Need to tell Python it may "look in that folder" -> put "__init__.py" there [in esrgan-pytorch/utils] (two underscores on each side of "init"). Just make an empty text file and rename it to that, it merely tells Python it can "look" for imports there.

Works! 👍

Edit: Oops, double-underscore got interpreted.

zer0int avatar Sep 22 '23 13:09 zer0int

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.

juelzsantana123 avatar Oct 19 '23 22:10 juelzsantana123