Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cupscale Dependencies missing #135

Open
ghost opened this issue Jun 15, 2022 · 24 comments
Open

Cupscale Dependencies missing #135

ghost opened this issue Jun 15, 2022 · 24 comments

Comments

@ghost
Copy link

ghost commented Jun 15, 2022

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'

@DrPleaseRespect
Copy link

How did you install OpenCV?

@Adrinus
Copy link

Adrinus commented Jun 16, 2022

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
Copy link
Author

ghost commented Jun 17, 2022

How did you install OpenCV?

With opening a terminal window in administrator mode and putting in

pip install opencv-python

@ghost
Copy link
Author

ghost commented Jun 24, 2022

Guessing the devs don't support this project anymore?

@Katzenwerfer
Copy link

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

@Katzenwerfer
Copy link

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
Copy link

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
Copy link

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
Copy link
Author

ghost commented Jul 1, 2022

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
Copy link

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
Copy link

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
Copy link

This is what's in that folder

image

@ghost
Copy link
Author

ghost commented Jul 2, 2022

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
Copy link

starshadowx2 commented Jul 3, 2022

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
Copy link
Author

ghost commented Jul 4, 2022

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
Copy link

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
Copy link
Author

ghost commented Jul 7, 2022

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
Copy link

I'm having the same issue.

@pierro42
Copy link

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

@rainlizard
Copy link

rainlizard commented Aug 31, 2022

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
Copy link

AugmentedRealityCat commented Oct 15, 2022

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
Copy link

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

@zer0int
Copy link

zer0int commented Sep 22, 2023

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.

@juelzsantana123
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests