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
281 stars 23 forks source link

-output option doesn't work #42

Open sonofevil opened 1 year ago

sonofevil commented 1 year ago

Reproduction steps:

.\start.cmd -model xintao-realesrgan-x4plus-anime -format png -scale 4 -input o3410.dds.png -output o3410.dds.xrxa.png

Expected Behavior

Upscaled image gets saved as "o3410.dds.xrxa.png".

Current Behavior

Upscaled image gets saved as "o3410.dds-upscaled.png".

Notes

Obviously this is bad if you want to batch upscale the same image using different models, and every time it writes to the same file.

sonofevil commented 1 year ago

Side note: The output of -help is very rudimentary and doesn't explain any of the options. It also does not mention the -input option, only a -path option. Unsure if that's the same.

>.\start.cmd -help

C:\Users\lutra\Desktop\upscaler>echo  #   1>nul  & GOTO WINDOWS   & rem#
windows.ps1 [[-model] <string>] [[-scale] <string>] [[-format] <string>] [[-path] <string>] [[-output] <string>] [[-action] <string>] [-video] [-help]

Available Models:
...
Joly0 commented 1 year ago

Hey, i am going to look into the output option. I think i just forgot to apply the final file name if it was set via that option.

Regarding help i could add more explanation to that, but afaik, the linux version (which is the main version here) has a rudimentary explanation only aswell, but i might be wrong. But i can look into it

The input option is not available for powershell, so i had to change that to path. Though it is available in the batch file, thats why its still usable through that. But the output of help is more or less automated by powershell and powershell doesnt know input exist, it only knows path which is equal to input, so it only outputs help for path, not for input (i hope that was understandable)

hollowaykeanho commented 1 year ago

Hi. I will add the rudimentary instructions into the README.md file for now while not getting into @Joly0 currently effort of upgrading the PS script. That should give some help.

sonofevil commented 1 year ago

Thanks. I'm in no hurry, my GPU actually died while I was batch upscaling and I'm in the process of having it replaced (still got warranty thank god). I don't necessarily blame the tool since I bought the card used and it's been having issues before, but I might open an issue about throttling resource usage to reduce hardware stress. 🙃

hollowaykeanho commented 1 year ago

Hahaa. Dont' do it in parallel. ;-) The way I did it https://github.com/hollowaykeanho/Upscaler/issues/1 was a worker scheduling method in Unix. I cooked my laptop once before filing that issue. XD

Ideally, the scheduler must constantly monitor the CPU temp, RAM, GPU vRAM, and GPU vRAM before starting a task. It's a weird requirement but definitely doable for the safety of the customers. It was challenging in pure posix shell support but it works. =)

@Joly0 had been doing great on the PowerShell. She He got tied up with her his day job to deal with so please give her him time. I'm confident with her him. Also FYI about this https://github.com/hollowaykeanho/Upscaler/issues/34 effort ya.

Joly0 commented 1 year ago

Hahaa. Dont' do it in parallel. ;-) The way I did it https://github.com/hollowaykeanho/Upscaler/issues/1 was a worker scheduling method in Unix. I cooked my laptop once before filing that issue. XD

Ideally, the scheduler must constantly monitor the CPU temp, RAM, GPU vRAM, and GPU vRAM before starting a task. It's a weird requirement but definitely doable for the safety of the customers. It was challenging in pure posix shell support but it works. =)

@Joly0 had been doing great on the PowerShell. She got tied up with her day job to deal with so please give her time. I'm confident with her. Also FYI about this https://github.com/hollowaykeanho/Upscaler/issues/34 effort ya.

Not she, i am he ;) But other than that, yeah, i am quite busy at the moment and dont have much time for any side projects :( But it'll probably (hopefully) get better soon so i have more time for things like this :)

hollowaykeanho commented 1 year ago

Oops. My bad. XD

hollowaykeanho commented 1 year ago

Okay, the documentation part is available here acting as a redundancy: https://github.com/hollowaykeanho/Upscaler#commands-help

Please ignore the parallel argument. It will only be available in the next iteration.

sonofevil commented 1 year ago

Hahaa. Dont' do it in parallel. ;-) The way I did it #1 was a worker scheduling method in Unix. I cooked my laptop once before filing that issue. XD

Ideally, the scheduler must constantly monitor the CPU temp, RAM, GPU vRAM, and GPU vRAM before starting a task. It's a weird requirement but definitely doable for the safety of the customers. It was challenging in pure posix shell support but it works. =)

@Joly0 had been doing great on the PowerShell. ~She~ He got tied up with ~her~ his day job to deal with so please give ~her~ him time. I'm confident with ~her~ him. Also FYI about this #34 effort ya.

If this is a recurring thing it might be prudent to add a warning to the README.md... I see there is a warning about the scaling factor. Is the scaling factor the main source of stress? Would it make any sense to run x2 twice instead of x4 once?

Sorry this is totally a tangent. I'll move this question to an appropriate issue or discussion topic if preferred.

hollowaykeanho commented 9 months ago

Implemented in 5d0be0f608a1635f0df3694bb325fb38dd2fe189.

The next release will have the output, both in help and in status processing as shown in this CI: https://github.com/JeanShuralyov/Upscaler/actions/runs/7853319850

@Joly0, please help perform the test run on actual system please. The test script is inside tests/01_test_upscale_image_single.sh.ps1.