Giter Club home page Giter Club logo

qualityscaler's People

Contributors

djdefrag avatar zackees avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qualityscaler's Issues

AssertionError: Torch not compiled with CUDA enabled

import torch #(torch directory replaced by your bundled version)

print(f'available devices: {torch.cuda.device_count()}')
print(f'current device: { torch.cuda.current_device()}')

Result:

print(f'current device: { torch.cuda.current_device()}')
File "C:\Users\rmast\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\cuda_init_.py", line 388, in current_device
lazy_init()
File "C:\Users\rmast\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\cuda_init
.py", line 164, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

No logs generating, Error while upscaling

I am trying to upscale a video and it keeps saying "Error while upscaling"

No logs are being generated but a folder was made.

Specs:
CPU: Core i7-9750H
Mem: 32gb
GPU: 3080 via Thunderbolt

Image batch?

Hi this is a very nice work. Really appreciate your work. But can you add a feature that allow using image batch insteaf of single image for inferencing? Thanks!

Not full loaded GPU Only 50%

Videocard Rtx 2060 12gb vram. Driver 545.84 driver game ready windows 11, python 3.10.6
Program or model idk not full use vram
image

Artifacts in the exported image

When using QualityScaler 2.9 I've get artifacts. I tried to switch Interpolation and AI model options, but in most cases result is bad. I've used in most times image upscailing.

Exported image look like this:

photo_2023-11-19_16-54-39

My specs:

CPU: i5-7400
RAM: 16 GB
GPU: GTX 750 Ti 4 GB VRAM
OS: Windows 10
GPU Driver: Nvidia 546.17

Error upscaling check log file

Build version 6.0 Free
After generating images and resizing images. fails to start upscaling.

Error in QualityScaler.log is :
Error while upscaling

CHECK failed: ((((HRESULT)((backend_->dml_device->CreateOperator(&op_desc_, __uuidof(**(&op)), IID_PPV_ARGS_Helper(&op))))) >= 0)) == (true):

[BUG] Unable to load state_dict for RealSRx4_Anime

Describe the bug
Unable to load state_dict for RealSRx4_Anime for upscaling a video in QualityScaler 2.9.

To Reproduce

  1. choose a video
  2. choose AI model: 'RealSRx4_Anime'

Expected behavior
The Upscaler will load the trained model and start upscaling the video. The other models do work, the issue is only for this specific model.

Error
`> Uploaded files: 1 => Supported files: 1

Starting upscale:
Files to upscale: 1
Selected AI model: RealSRx4_Anime
AI half precision: True
Interpolation: True
Selected GPU: NVIDIA GeForce RTX 3060
Selected image output extension: .png
Selected video output extension: .mp4 (x264)
Tiles resolution for selected GPU VRAM: 1440x1440px
Resize factor: 50%
Cpu number: 10
==================================================
Loading AI model
Error during upscale process Error(s) in loading state_dict for SRVGGNetCompact:
Missing key(s) in state_dict: "body.35.weight", "body.36.weight", "body.36.bias", "body.37.weight", "body.38.weight", "body.38.bias", "body.39.weight", "body.40.weight", "body.40.bias", "body.41.weight", "body.42.weight", "body.42.bias", "body.43.weight", "body.44.weight", "body.44.bias", "body.45.weight", "body.46.weight", "body.46.bias", "body.47.weight", "body.48.weight", "body.48.bias", "body.49.weight", "body.50.weight", "body.50.bias", "body.51.weight", "body.52.weight", "body.52.bias", "body.53.weight", "body.54.weight", "body.54.bias", "body.55.weight", "body.56.weight", "body.56.bias", "body.57.weight", "body.58.weight", "body.58.bias", "body.59.weight", "body.60.weight", "body.60.bias", "body.61.weight", "body.62.weight", "body.62.bias", "body.63.weight", "body.64.weight", "body.64.bias", "body.65.weight", "body.66.weight", "body.66.bias".
size mismatch for body.34.weight: copying a param with shape torch.Size([48, 64, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
size mismatch for body.34.bias: copying a param with shape torch.Size([48]) from checkpoint, the shape in current model is torch.Size([64]).
`

Desktop (please complete the following information):

  • OS Windows 10
  • QualityScaler 2.9

Update README.md

The readme file should really include additional instructions for compiling the project from the source code, not just instructions on downloading the .exe and the photo examples. May users will be able to do so from their own knowledge, but others may be new or may be unfamiliar and those additional instructions can be a big help.

Necessary steps to reintegrate BSRGANx2

Hi,

I've been investigating the problems you were facing with BSRGANx2 and I believe the flaw is actually with your code, not the model or torchml version. I managed to get it working again with the old BSRGANx2.pth file.

Step 1: Removing upconv2
The BSRGANx2 model does not contain the upconv2 dimension, but your code currently always looks for it. Commenting these lines out while using the BSRGANx2 model allowed it to work properly.

        if sf == 4:
            self.upconv2 = nn.Conv2d(nf, nf, 3, 1, 1, bias=True)
...
        if self.sf == 4:
            fea = self.lrelu(self.upconv2(F.interpolate(fea, scale_factor=2, mode='nearest')))

Solution: Alter these if statements to also check if the model is != BSRGANx2.

Step 2: Reducing scaling multipliers
The latest version hardcodes the multipliers for * 4 for example inside fix_tile_shape and get_final_image_shape. We must instead change this to * 2 when using BSRGANx2.

That's all, it's working fine for me now. Please let me know if you need assistance, and I am very much looking forward to BSRGANx2 being added again! 🎉

Transparency / DDS / Problems with one file

Hello.
A) Is there any way to keep the transparency of the initial png or whatever file?
B) Could it be possible to import dds files?
C) We have problems converting this file. It always turns fully white.
githubsnow
xb_decals1_snow

A cast to integer causes the extracted and upscaled frame count to be incorrect, on NTSC frame rate videos

frame_rate = int(cap.get(cv2.CAP_PROP_FPS))

https://github.com/Djdefrag/QualityScaler/blob/b92bb701e703430b13d7341a41aa8699972ae809/QualityScaler.py#LL455C5-L455C50

Example, input video FPS 23.976, original frame count 1212: (23 / (24000/1001)) * 1212 = 1162.6615 (i.e., 1163).

The same applies to every other video that uses frame rates that are non-even.

Everything works correctly when the cast to int is removed: frame_rate = cap.get(cv2.CAP_PROP_FPS)

QualityScaler.exe is marked as Trojan:Win32/Wacatac.B!ml by Windows Defender

I don't know if this is a false positive by Wİndows Defender or not. VirusTotal also doesn't like the distributed executable in the releases page

The file hash is

CRC32: CF09368D
MD5: 2486FB18B943A60793F704968DD262AE
SHA-1: 3775464FDA4D52AB6DF60C83198EF4B16E470F6C
SHA-256:	312379592aeff70993bd2a38f3d0407793fc6abaeba1fad22a3d3dfbd4eca5fb

I tried building it myself (cpython 3.10) but my build failed due to Could not find a version that satisfies the requirement pytorch-directml, not really a python guy so I left it there.

Can you share a reproducible build instructions with us so that we can compare executable hashes?

Trial Version?

Hey, i would love to test this upscaler but i was only able to find the paid version with the models. I read in some instances that there is a trial version but could not find it.

BSRGAN 2X not available?

2.2 had no option for the 2x BSRGAN model, and if memory serves, it’s been available up until now. Haven’t checked 2.3 yet but I didn’t see the model in the Folder zip when I downloaded it from the purchase page.

Not a huge issue, but I’ve found that most videos come out much better when upscaling double as opposed to quadruple res. Thanks, and keep up the amazing work 🙏🏻

[Python 3.11.4] Package install works neither on Windows 11 nor on Ubuntu 22.04

The packages form the source cannot be install neither on W11 nor on U22.04, at least with Python 3.11.x

The overall error is:

 ERROR: Could not find a version that satisfies the requirement torch-directml

On Ubuntu 22.04:

$ pip install torch-directml
ERROR: Could not find a version that satisfies the requirement torch-directml (from versions: none)
ERROR: No matching distribution found for torch-directml
python --version
Python 3.11.4

On Windows 11

PS C:\...\QualityScaler> pip install -r requirements.txt
DEPRECATION: Loading egg at c:\python311\lib\site-packages\mask_rcnn-2.1-py3.11.egg is deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use pip for package installation..
ERROR: Could not find a version that satisfies the requirement torch-directml==0.1.13.1.dev230301 (from versions: none)
ERROR: No matching distribution found for torch-directml==0.1.13.1.dev230301
 python --version
Python 3.11.3

Specs probably too small

I have an old AMD X4 646 and 16GB. Running with CPU did not hog the CPU, so something went wrong.

My father has a new Windows 11 PC with 8GB. Running with CPU did not hog the CPU, so something went wrong.

Finally I decided to rent a Azure NC6_Promo with K80 cuda. That does the job after a reboot for installing the K80.

Request: command line interface

First, this is a really nice tool that I appreciate greatly. Thanks for putting this out, and I'll be buying on itch.

This is such a useful tool, that I would like to automate it, much like you would use imagemagick, to interoperate with other tools.
Something like:
QualityScalerCLI.exe --model BRSRGANx2 --backend cpu --ram ultra --resize 100 input.jpg
Ability to specify final output file name and discard all intermediaries (including scaled jpg->png conversion) would also be nice.

Old Job not cancelling

first, I tried a video, stopped in middle, and next I put an image, yet it resumes old video job.

Processing images is way to slow needs to be speed up

The time it takes to process images with Qualityscaler is way to long it should not take 10 to 15 min to process any image. I have tested Quality vs Upscayl with Upscayl most images I can process it 3 or 4 times in the amount of time it takes Quality to process a image once this is the main negative thing about this program please take a look into this thx.

My video card is a RX 6600 I have 24gb DDR3 settings I use GPU and 6gb to 8gb Vram. My setup is pretty good for upscaling images.

"error while upscaling"

QualityScaler 4.1.f
NVIDIA GeForce GTX 1660 Ti 6 GB Win 10
Tried all models, CPU&GPU, limited RAM, several files including logo.png from your install package.
Makes a pile of PNGs and then comes back error while upscaling.
Is there an informative log somewhere?

Can not drag-and-drop Images to QualityScaler 1.5.0

After latest update to version 1.5.0 can not drag-and-drop images to QualityScaler. For version 1.4.0 everything worked correctly.
Tried to drop .jpg and .png files - not working.
For videos (tested .mkv) everything works correctly.

I am using Windows 11 64 bit Pro, 22000.652, with clean installation of QualityScaler (from archive from Google Drive)

Adjust encoding quality settings

Are there any plans to implement the ability to adjust video encoding parameters? The quality settings for mp4 output are quite low and don't really work well if a user plans to edit footage upscaled. Or...is there a way to edit any of the core files to make these adjustments?

Setup

It would help if this could be installed via pip.
I'm still trying to install the dependencies and I eventually get

Traceback (most recent call last):
  File "QualityScaler.py", line 617, in <module>
    ) -> list[numpy_ndarray]:
TypeError: 'type' object is not subscriptable

Nothing happening...

Unfortunately the app just sits there consuming a little CPU but otherwise not touching the GPU or the input image for all variations of options on a 300x300 jpg.

Please add logging, and more detailled in-app status/progress signage so I can submit something more useful.
Running on Win10, all CUDA libraries installed, it's my deep learning research box.

Error while upscaling 'utf-8' codec can't decode byte 0xf3 in position 1670: invalid continuation byte

Hi,
in windows 11,
Error otuput when click in upscale button.

Error while upscaling

'utf-8' codec can't decode byte 0xf3 in position 1670: invalid continuation byte

image

file path: C:\Users\Usuario\OneDrive\Documentos\github\RealScaler\Bleach.avi

My windows system uses spanish language but the path doesn't contain special chars. i can't trace this because otuput error is not showing the complete error.

No load on duplicate extension

Hi, i was upscaling some assets of a game im converting for a unity project.
Now when i decompiled the assets the names where: {name}.bmp.png <- this is where the problem is
When you drag the files into qualityscaler it just gives a gray screen but when changing file names to {name}.png they load normaly?

Dont know how you extension checking, but assuming from source you use python, could split name on . and do a -1 index to get extension instead. havent checked out the source do, will do when i have a bit more time.

Stuck on Preparing

I am processing a 1024x1024 video which is 20mins long, it pre-processed the upscale and then for the last hour+ has been stuck on the message of Preparing for upscaling. When i check Task Manager, the CPU or the GPU is not being used at all, CPU i9 12900f at 15% and GPU RTX 3080 10gb at 1%

am i missing something or do i just have to wait due to the length of the video i am processing?

everything has been left on default settings, BSRGANx4, and 75% with GPU backend

QualityScaler.exe is listed as trojan

Hi there, after last release of QS 2.6, when I unzip the folder Windows Defender lists the Quality Scaler executable file as a trojan and deletes it instantly, preventing me from using it.
Screenshot 2023-10-02 120610

Videos cropped to 3/4

Hey,

I was trying out the scaler with our Trial data and no matter what input aspect ratio i input, the output is always 3/4.
Can i change that and is there an option to set a resolution manually instead of percentage?

The AI Lib is not being downloaded using pip?!

PS D:\Projects\QualityScaler> pip install -r .\requirements.txt
ERROR: Could not find a version that satisfies the requirement torch-directml (from versions: none)
ERROR: No matching distribution found for torch-directml
PS D:\Projects\QualityScaler> pip install torch-directml
ERROR: Could not find a version that satisfies the requirement torch-directml (from versions: none)
ERROR: No matching distribution found for torch-directml

Please help

Upscaling separately with tile upscaling causes cuts on upscaled image

Hi, I just wanted to leave an issue with the upscaling method. I'm not sure if this is RealSR or BSRGAN's issue, but I don't think it is as it happens on both of these. I've basically noticed some cuts on the final image that it creates in the end as it combines the tiles together back into one image.

I suspect this is because for each tile both of these don't give out the upscaled image in the same way as every other tile it upscales. I also don't notice it easily if I view it from about the original scale, but it starts becoming noticeable when I zoom into the image.

The original image:
modern-house-1-1538579609

Upscaled using BSRGAN in 4x:
modern-house-1-1538579609_BSRGAN_x4

Upscaled using RealSR_JPEG in 4x:
modern-house-1-1538579609_RealSR_JPEG_x4

I also tested this with 2x, and it does the same.
Still, many thanks for making this program!

Linux Support

Hey, this project looks interesting and works good on windows, though it would be great, if this could be used on linux aswell. A great usecase for this would be inside a docker container which one can access through vnc or similar. This could aswell be run on a small Linux server ( with a nvidia gpu for cuda), rather than the main machine, without consuming storage and cpu/gpu resources, leaving the main system free for different work (as the process can take quite long for larger files)

[BUG] Error while upscaling

I'm using Windows 11 and Python 3.10.7 with QualityScaler 1.14. I'm encountering an issue while trying to upscale an FLV video file. The error message I'm receiving is: [Errno 2] No such file or directory: C:\\Users\\rosha\\Downloads\\Compressed\\QualityScaler-1.14\\AI\\BSRGANx4.pth

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.