InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: Infill scaling does not scale the image to infill

Open Ghost---Shadow opened this issue 3 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

Windows

GPU

cuda

VRAM

8GB

What happened?

It seems to me that the infill scaling in the unified canvas does not upscale the bounding box before sending it to the model.

SD generations are pretty poor when asked to generate images smaller than 512x512 so if the bounding box for infilling in smaller than 512x512, it does not seem to upscale and downscale the image correctly.

Proposed solution would be to do a simple bilinear upscaling of the pixels in the bounding box, passing it through the diffuser and a bilinear downscaling to the original patch size.

Screenshots

Here is an example of the prompt "Dragon Flying in the sunset" with 256x256 resolution

Dragon Flying in the sunset 256x256

Same prompt with 512x512

merged_canvas de5e12e4

I did the bilinear upscaling trick mentioned above manually in MS paint, here are the results

Without rescaling

merged_canvas 851c0786

With rescaling

merged_canvas 1865cc2f

Additional context

No response

Contact Details

No response

Ghost---Shadow avatar Dec 31 '22 15:12 Ghost---Shadow

I seem to be having a similar issue.

jordanservice avatar Jan 01 '23 00:01 jordanservice

Also having this issue on Apple Silicon with v.2.2.4, WebUI. Appears to occur irrespective of whether scaling is set to "auto" or "manual" in the UI.

timdesrochers avatar Jan 01 '23 01:01 timdesrochers

Is this happening with inpainting, or with new image generation on the canvas? With inpainting, this should work (I just tested it and it works, though my branch is slightly out of date). I don't think there's code set up to do this for new generations though.

Kyle0654 avatar Jan 12 '23 18:01 Kyle0654

I am using the unified canvas

Ghost---Shadow avatar Jan 13 '23 09:01 Ghost---Shadow

Still an issue. Trying to isolate it, as it seems to be inconsistent -- sometimes it will behave as expected, but it seems at least below a certain threshold (<320px^2) it just fails. Will report back eventually.

timdesrochers avatar Jan 14 '23 07:01 timdesrochers

If you manage to catch it in the act, please copy and paste your terminal output for the failed generation, starting from >> Image generation requested.

Also please let us know what version of invokeai you are running.

psychedelicious avatar Jan 27 '23 11:01 psychedelicious

There has been no activity in this issue for 14 days. If this issue is still being experienced, please reply with an updated confirmation that the issue is still being experienced with the latest release.

github-actions[bot] avatar Mar 13 '23 06:03 github-actions[bot]

poo

Ghost---Shadow avatar Mar 19 '23 07:03 Ghost---Shadow

There has been no activity in this issue for 14 days. If this issue is still being experienced, please reply with an updated confirmation that the issue is still being experienced with the latest release.

github-actions[bot] avatar Apr 04 '23 06:04 github-actions[bot]

poo poo

Ghost---Shadow avatar Apr 04 '23 17:04 Ghost---Shadow

As requested previously, if this is a problem, please copy the output from the terminal window so we can see what exactly is happening. Also, please include a screenshot of the whole canvas, as this gives more useful info.

psychedelicious avatar Apr 07 '23 05:04 psychedelicious