invoke-ai / InvokeAI

Invoke is a leading creative engine for Stable Diffusion models, empowering professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry leading WebUI, and serves as the foundation for multiple commercial products.
https://invoke-ai.github.io/InvokeAI/
Apache License 2.0
23.38k stars 2.4k forks source link

[bug]: Performance issue - bounding box in Canvas defaults to full image size dimensions #6219

Closed mcbexx closed 2 weeks ago

mcbexx commented 6 months ago

Is there an existing issue for this problem?

Operating system

Windows

GPU vendor

Nvidia (CUDA)

GPU model

RTX 2070S

GPU VRAM

8

Version number

4.0.4

Browser

Firefox 124.0.2

Python dependencies

No response

What happened

I noticed that with version 4.x, the initial size of bounding box on the Unified Canvas defaults to the dimensions of the image that is brought into canvas mode.

While this can be adjusted manually, it appears that this has a negative impact on the performance and responsiveness of the GUI. If I forget to immediately adjust the bounding box size, I am experiencing constant stutters in cursor movement, jitters when using the brush tool (either in mask or paint mode).

This becomes more apparent depending on the size of the image loaded into the canvas, e.g. if you use the canvas to inpaint details into already upscaled images (which I assume is a fairly common use case).

Again, this can be fixed by manually reducing the bounding box size, but if you're not familiar with the problem, one might easily assume the GUI is laggy by default.

For reference, I am using a 3900x CPU (12/24) cores, RTX 2070 Super w/ 8GB VRAM and 32 GB RAM.

What you expected to happen

In earlier versions, the bounding box had a default initial size (512x512 I believe?) that did not match the size of the image loaded into the canvas and the stutters did not occur.

How to reproduce the problem

No response

Additional context

No response

Discord username

No response

psychedelicious commented 5 months ago

There's a checkbox for this in the canvas settings popover. It was changed in a recent update.

psychedelicious commented 2 weeks ago

Invoke v5 features a full rewrite of the canvas. Please create a new GH issue if the problem still exists in the new canvas UI.