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

Proper Image Got into Faulty Mosaic Effect after Upscaled #63

Open
cherrynoize opened this issue Jan 22, 2024 · 14 comments
Open

Proper Image Got into Faulty Mosaic Effect after Upscaled #63

cherrynoize opened this issue Jan 22, 2024 · 14 comments
Assignees
Labels
Bug Case is about a glitch. Discussion Matter is still in discussion. No commitment yet. Help Wanted Blocked because all known proposals where tested and ran out of idea. Is stuck.

Comments

@cherrynoize
Copy link

Really appreciate someone putting some effort into a CLI version for this. I would love to work on some PRs myself but I just don't have the time right now.

So at least I would like to point out that there's some issues with saving the output image, as by default with param --input image.jpg I would get an error for it tries to save to image.jpg/image-upscaled.jpg (which is clearly not what's expected). Specifying --output per se does not solve the issue but I found that --input ./image.jpg --output ./image-upscaled.jpg (and probably omitting output too) works around the issue. Though it does seem to ignore the --output param completely.

More importantly though:

111044966_p0_master1200-wm_rm
111044966_p0_master1200-wm_rm-upscaled

I get this.

Input is:

upscaler \
                                                  --model upscayl-ultrasharp \
                                                  --scale 2 \
                                                  --input ./111044966_p0_master1200-wm_rm.jpg \
                                          --output ./111044966_p0_master1200-wm_rm-2x.jpg

I would love for this to work properly so I could implement it in my dotfiles to auto upscale wallpapers so I could keep them in a more reasonable format until needed. Maybe it's the model? I'll try different ones now.

Also sorry for making this all a single issue. Maybe I should have made two.

@cherrynoize
Copy link
Author

I get the same result using upscayl-realesrgan-x4plus-anime too.

@hollowaykeanho
Copy link
Owner

So at least I would like to point out that there's some issues with saving the output image, as by default with param --input image.jpg I would get an error for it tries to save to image.jpg/image-upscaled.jpg (which is clearly not what's expected). Specifying --output per se does not solve the issue but I found that --input ./image.jpg --output ./image-upscaled.jpg (and probably omitting output too) works around the issue. Though it does seem to ignore the --output param completely.

Hi @cherrynoize , sorry for the buggy powershell scripting. As a matter of fact, I am working on it but in a separate project repository (since it's rare to find a tested posixshell+powershell standard library). Appreciate your patience.

FYI, next release would be the last one using Shell script wrapping method as I will personally go into the C & C++ codes to make everything scratch.


111044966_p0_master1200-wm_rm-upscaled
I get this.

This can be caused by 2 issues:

  1. The input image has an AI poisoning data in it.
  2. Model faulty. You can choose other model. I personally use upscayl-nmkd-4x-superscale-sd-178000-g (next release or git clone the repo), upscayl-remacri, upscayl-ultramix_balanced, and lastly upscayl-ultrasharp-v2.

@Joly0
Copy link
Collaborator

Joly0 commented Feb 2, 2024

Really appreciate someone putting some effort into a CLI version for this. I would love to work on some PRs myself but I just don't have the time right now.

So at least I would like to point out that there's some issues with saving the output image, as by default with param --input image.jpg I would get an error for it tries to save to image.jpg/image-upscaled.jpg (which is clearly not what's expected). Specifying --output per se does not solve the issue but I found that --input ./image.jpg --output ./image-upscaled.jpg (and probably omitting output too) works around the issue. Though it does seem to ignore the --output param completely.

Hm, that is really odd behaviour. I´ll look into it and try to fix it :)

@cherrynoize
Copy link
Author

That would be great. BTW, I thought I had answered to @hollowaykeanho mentioning I wasn't on Windows so I didn't think any powershell scripting would be the issue here.

@Joly0
Copy link
Collaborator

Joly0 commented Feb 2, 2024

That would be great. BTW, I thought I had answered to @hollowaykeanho mentioning I wasn't on Windows so I didn't think any powershell scripting would be the issue here.

So you arent running this on windows but on linux? If yes, then this is not an issue for me, but for @hollowaykeanho

@uq1
Copy link

uq1 commented Feb 7, 2024

I am having the same issue with the squares being random in the image. It does not happen on every run, but it seems to happen a lot.

I have tried about 6 models and they all seem to do the same thing, so it does not seem to be a model issue.

Image poisoning is somewhat impossible as these are textures from a 20 year old game.

Could this simply be some issue in the image save function? The squares in the image look ok, just not in the right location in the over-all picture.

Here's another example:
aurora2_upscaled

@hollowaykeanho
Copy link
Owner

Could this simply be some issue in the image save function? The squares in the image look ok, just not in the right location in the over-all picture.

Here's another example:
aurora2_upscaled

Wow. This is definitely the first case I've seen. @cherrynoize, and @uq1, can both of you send me a the original image to be included in the test suite please? I will analyze it.

@Joly0, no worries. Please work on the parallel execution task ya. =) I will triage the case.

Apologize for this the late responsiveness. Am currently involved in a client's project. Will patch the software in and out.

@hollowaykeanho hollowaykeanho changed the title Upscale issues Proper Image Got into Faulty Mosaic Effect after Upscaled Feb 8, 2024
@hollowaykeanho hollowaykeanho self-assigned this Feb 8, 2024
@hollowaykeanho hollowaykeanho added Bug Case is about a glitch. Discussion Matter is still in discussion. No commitment yet. labels Feb 8, 2024
@uq1
Copy link

uq1 commented Feb 8, 2024

No problems, here's the original.

aurora2

@uq1
Copy link

uq1 commented Feb 8, 2024

FYI: I just upscaled the same image again and this time it worked fine. The original was being called through a game, while this time I tried it just from command prompt. Could other processes CPU/GPU usage be affecting it?

I hope this insight helps.

@hollowaykeanho
Copy link
Owner

@uq1 , not an issue here. It should lower level like drivers or hardware. I'm incline to former.

sample-03_upscaled

@hollowaykeanho
Copy link
Owner

Yeah... same case for the Ubuntu (I'm on Debian). It should be related to either model or low level driver before we arrive to hardware (@uq1 , your case is very unlikely a hardware problem). Ubuntu is known for heavy modifications for better user experience.

sample-04_upscaled

@hollowaykeanho hollowaykeanho added the Help Wanted Blocked because all known proposals where tested and ran out of idea. Is stuck. label Feb 8, 2024
@hollowaykeanho
Copy link
Owner

Help wanted to further root cause the problem. In the meantime, I do what I can to provide workaround for this weird bug.

@DrBrule
Copy link

DrBrule commented Apr 2, 2024

I'm seeing the same issue but only with certain partially AI-generated video. I've tried many of the models, and for certain input sources it always makes a mosaic. The generated AI images are fine looking - I had hoped to improve them 2x, but when I try to upscale them they come out mosaic'ed.

@PedCoelho
Copy link

PedCoelho commented May 6, 2024

@hollowaykeanho For me this happens with videos and only on -scale 2 but not on -scale 4.
@cherrynoize Try calling the script with -scale 4 as a parameter.
Upscaling model of choice didn't seem to matter.
I'm assuming it's a bug related to the scaling factor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Case is about a glitch. Discussion Matter is still in discussion. No commitment yet. Help Wanted Blocked because all known proposals where tested and ran out of idea. Is stuck.
Projects
Status: Buckets
Development

No branches or pull requests

6 participants