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.36k stars 2.4k forks source link

[bug]: Canvas display constantly glitching so much its almost unusable #7012

Open Sourdface opened 1 week ago

Sourdface commented 1 week ago

Is there an existing issue for this problem?

Operating system

(K)ubuntu Linux 24.04

GPU vendor

Nvidia (CUDA)

GPU model

GeForce RTX 3090

GPU VRAM

24 GB

Version number

5.0.0

Browser

Firefox 131 (via Flatpak)

Python dependencies

No response

What happened

At random times for no apparent reason the canvas will start glitching out like crazy, with random previous states covering up the view, such as previous zoom levels, previous layer contents, other layers. Its like previous views of the canvas are cached in memory and start swapping out with the current contents. It appears to be visual only and doesn't affect the actual rendering, although it can be almost impossible to tell what's going on and it makes the UI completely unusable.

What you expected to happen

Canvas should remain stable and should always show the current state and not previous states

How to reproduce the problem

I don't know what causes it; it just randomly starts happening sometimes, and no consistent workarounds are known. I've tried restarting the browser, clearing state, clearing the canvas...sometimes it will randomly fix itself, but the causes is not clear.

Additional context

This has been going on for several versions prior to 5.0.0. Before 4.7 for sure, maybe earlier.

Discord username

No response

psychedelicious commented 1 week ago

Please upload a screen recording showing the problem, it's not clear what exactly is happening.

Sourdface commented 1 week ago

I have not been able to trigger the issue since your post. When it happens again I will try to record it with screen recording software.

psychedelicious commented 1 week ago

Ok, thanks. Based on your description, I have not ever seen this before and am not aware of any other bug reports about a problem like this. The canvas was completely rewritten for v5 with very little shared code, which suggests the cause might be something external to the app. Maybe related to browser settings or extensions.

Sourdface commented 1 week ago

invokeai-canvas-glitch.webm I tried to record it with OBS and edited the video with Kdenlive. I had to downscale it into a smaller resolution to make the file fit within github file size constraints.

Sourdface commented 1 week ago

I have been using Brave browser as a workaround for now. It doesn't seem to be affected.

Sourdface commented 1 week ago

I've noticed that sometimes opening the developer panel or switching into full-screen mode will sometimes temporarily fix the issue. However if I close dev tools/fullscreen then it comes back again.

psychedelicious commented 1 week ago

Thanks for the video. No clue what specifically could be causing it. Maybe a FF extension or settings.

Is there any pattern/trigger for the issue?

Could try a fresh FF profile or private window to see if that prevents the issue, though I understand with it being intermittent it's hard to confidently say it's not happening.

Sourdface commented 1 week ago

The only extensions I'm using are Proton Pass, uBlock Origin, and Dark reader. Of those the only one that may be affecting anything is Dark Reader since it can change CSS rules. However I have it disabled for localhost:9090 for this very reason. Nonetheless I will try continuing work in a new firefox profile with default settings to see what happens.

Sourdface commented 1 week ago

Ok, I created a new profile and it started happening after generating just one raster layer on the canvas. There are no extensions installed and I haven't done anything else with the profile but open InvokeAI.

Sourdface commented 1 week ago

Anything that causes the canvas view to change triggers it. Although I feel like I remember it happening on its own even without interacting with the canvas; maybe I'm just imagining it.

It seems to get worse as I perform more actions to the canvas. Ie. its like each change gets added to to the stack of view states its cycling between, as though previous states are all being buffered in some kind of queue and its rapidly cycling between them.

Sourdface commented 1 week ago

Ok I can confirm that just moving the cursor around is enough to cause it to cycle between states. As will changing zoom levels, panning, or performing any changes to any layers.

Sourdface commented 1 week ago

Drawing onto an inpaint mask layer with the brush tool seemed to make it stop...

psychedelicious commented 1 week ago

Really weird. Do you see any messages in the browsers JS console when the issue occurs? If all you are doing is moving the cursor, we should have no log outputs (even if you've set the log level to trace in the system settings @bottom left).

I primarily test on macOS Firefox but have a headless Linux machine that runs the server. I'll connect a monitor and see if I can reproduce the issue. We have a number of Linux FF users who don't have this issue though.

What desktop environment and/or window manager do you use?

Sourdface commented 1 week ago

Operating System: Kubuntu 24.04 KDE Plasma Version: 5.27.11 KDE Frameworks Version: 5.115.0 Qt Version: 5.15.13 Kernel Version: 6.8.0-45-generic (64-bit) Graphics Platform: X11 Processors: 12 × 11th Gen Intel® Core™ i5-11400F @ 2.60GHz Memory: 78.3 GiB of RAM Graphics Processor: NVIDIA GeForce RTX 3090/PCIe/SSE2 Manufacturer: ASUS

I have not caught any output from moving the cursor around. I get output for drawing or performing other operations that alter the canvas contents but nothing that looks like errors.

Sourdface commented 1 week ago

Maybe unrelated, but I do have another issue where after pressing the "Invoke" button, it will often just sit there and do nothing and provide no output (not even in browser console, CLI stdout, or network tab) for a long time, sometimes up to a minute, before it will even queue the request. Once it finally queues then processing time varies depending on the operation, but before queuing its like its just sitting there waiting for something in the background before it even starts. This too is completely random, although it affects at least 40% of generations. The browser isn't unresponsive or anything; I can still fully interact with the UI, go to different tabs within the interface, etc.