hollowaykeanho / Upscaler

A consolidation of various compiled open-source AI image/video upscaling product for a working CLI friendly image and video upscaling program.
BSD 3-Clause "New" or "Revised" License
290 stars 24 forks source link

Doesn't work on Windows #99

Open geoff-m opened 1 month ago

geoff-m commented 1 month ago

Description

Neither main (305efd3) nor the 0.7.0 zip release run on my Windows machine. They both immediately output an error and exit.

Expected Behavior

Upscaler should run without error.

Current Behavior

Upscaler fails immediately.

Steps to Reproduce [COMPULSORY]

PS S:\Upscaling\upscaler-v0.7.0\upscaler> .\start.cmd --model upscayl-realesrgan-x4plus-v3 --scale 2 --input "S:/upscaling/input/cat.mp4" --output "S:/upscaling/output/" --video

S:\Upscaling\upscaler-v0.7.0\upscaler>echo  #   1>nul  & GOTO WINDOWS   & rem#
Input does not exist: S:/upscaling/path/cat.mp4
PS S:\Upscaling\upscaler-v0.7.0\upscaler>

Associated Data Files

No response

geoff-m commented 1 month ago

It is true that S:/upscaling/path/cat.mp4 does not exist, but that is expected to be irrelevant. The program was never told to use that path.

geoff-m commented 1 month ago

Also, I don't expect echo # 1>nul & GOTO WINDOWS & rem# to be printed.

Joly0 commented 1 month ago

It is true that S:/upscaling/path/cat.mp4 does not exist, but that is expected to be irrelevant. The program was never told to use that path.

According to your command, you gave S:/upscaling/input/cat.mp4 as the input, so you told it to use that path

geoff-m commented 1 month ago

According to your command, you gave S:/upscaling/input/cat.mp4 as the input, so you told it to use that path

The path I told it to use is not the path it complains does not exist.

Joly0 commented 1 month ago

Ohh, i see the problem. I missed that it replaced "input" with "path". So, the problem here is, that this project uses combined scripts for linux and windows (the start.cmd file). On windows this script starts the powershell script that is used to run the program itself. Similar behaviour for linux where the start.cmd script starts the bash script. The issue here now is, that "input" is an invalid parameter for powershell, but is for bash and we didnt want to change the parameter name, so i adjusted the code for starting the powershell script, so it would replace "input" with "path", because path is a valid parameter for powershell. It looks like, i wasnt specific enough when writing the code for that replacement and it replaced every "input" in the command with "path"

Joly0 commented 1 month ago

Also, I don't expect echo # 1>nul & GOTO WINDOWS & rem# to be printed.

Btw, this is (atleast as far as i know) nothing that can be changed

Joly0 commented 1 month ago

@hollowaykeanho I made some small changes to the start.cmd script, rearranged the order to make this less prone to such issues, tested it and pushed it to my fork

hollowaykeanho commented 1 month ago

Morning. @Joly0, thanks.. will pull in by today.

hollowaykeanho commented 1 month ago

Hi all, I have merged the changes into the main repository: https://github.com/hollowaykeanho/Upscaler/commit/def344cc38b9eb7ad35086b4257b67000a07935c

@geoff-m, please download the updated version start.cmd and overrides the existing one at https://github.com/hollowaykeanho/Upscaler/blob/main/start.cmd. I won't be releasing soon as I'm currently upgrading the rest of the enhancement for v0.8.0.

Currently mark this as "Done & Pending Release" assuming the bug is fixed.