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

Critical Performance Drop in InvokeAI 4.2.x: Image Generation Slows to a Crawl #6364

Open
1 task done
zero2999 opened this issue May 14, 2024 · 6 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@zero2999
Copy link

Is there an existing issue for this problem?

  • I have searched the existing issues

Operating system

Linux

GPU vendor

Nvidia (CUDA)

GPU model

NVIDIA GeForce RTX 3060 Mobile / Max-Q

GPU VRAM

6GB

Version number

4.2.1

Browser

microsoft edga

Python dependencies

No response

What happened

Hello, I have been a user of InvokeAI since version 3.x, and up until version 4.1.x, it generated images efficiently in both S.D 1.5 and S.D XL. However, after upgrading to version 4.2.x, the performance has deteriorated significantly, with image generation times ranging from 15 to 30 minutes. I reviewed the documentation for potential solutions, but the current recommendation is to perform a clean uninstall and reinstall. I have executed this procedure four times, but the issue persists.

Assuming the problem might be related to a system update, I performed a complete OS reinstallation. Unfortunately, the performance issues remain unchanged, with the application still running sluggishly. I would appreciate any technical assistance or solutions to optimize and expedite the image generation process.

image

What you expected to happen

I expected image generation in InvokeAI to be fast and efficient, similar to previous versions (up to version 4.1.x), in both S.D 1.5 and S.D XL.

How to reproduce the problem

No response

Additional context

No response

Discord username

No response

@zero2999 zero2999 added the bug Something isn't working label May 14, 2024
@psychedelicious
Copy link
Collaborator

Let's check a couple things:

  • When the app starts up, in the terminal, we should see the GPU torch is using. The line looks like this:
    [2024-05-14 13:38:26,759]::[InvokeAI]::INFO --> Using torch device: NVIDIA GeForce RTX 4090
    What does it say for you?
  • Please copy and paste your invokeai.yaml file so we can review the settings

@zero2999
Copy link
Author

zero2999 commented May 15, 2024

patchmatch.patch_match: INFO - Compiling and loading c extensions from "/home/ppbg/invokeai/.venv/lib/python3.10/site-packages/patchmatch".
patchmatch.patch_match: ERROR - patchmatch failed to load or compile (Command 'make clean && make' returned non-zero exit status 2.).
patchmatch.patch_match: INFO - Refer to https://invoke-ai.github.io/InvokeAI/installation/060_INSTALL_PATCHMATCH/ for installation instructions.
[2024-05-14 23:56:58,900]::[InvokeAI]::INFO --> Patchmatch not loaded (nonfatal)
[2024-05-14 23:57:01,258]::[InvokeAI]::INFO --> Using torch device: CPU
[2024-05-14 23:57:01,431]::[InvokeAI]::INFO --> cuDNN version: 8902
[2024-05-14 23:57:01,451]::[uvicorn.error]::INFO --> Started server process [51400]
[2024-05-14 23:57:01,451]::[uvicorn.error]::INFO --> Waiting for application startup.
[2024-05-14 23:57:01,451]::[InvokeAI]::INFO --> InvokeAI version 4.2.1
[2024-05-14 23:57:01,452]::[InvokeAI]::INFO --> Root directory = /home/ppbg/invokeai
[2024-05-14 23:57:01,452]::[InvokeAI]::INFO --> Initializing database at /home/ppbg/invokeai/databases/invokeai.db
[2024-05-14 23:57:01,462]::[InvokeAI]::INFO --> Pruned 3 finished queue items
[2024-05-14 23:57:01,477]::[InvokeAI]::INFO --> Cleaned database (freed 0.02MB)
[2024-05-14 23:57:01,478]::[uvicorn.error]::INFO --> Application startup complete.
[2024-05-14 23:57:01,478]::[uvicorn.error]::INFO --> Uvicorn running on http://127.0.0.1:9090 (Press CTRL+C to quit)

And that's even though I chose option 1 for Nvidia during installation. As I mentioned earlier, it used to generate images very quickly, but now it's incredibly slow when generating an image

@zero2999
Copy link
Author

invokeai.yaml

Internal metadata - do not edit:

schema_version: 4.0.1

Put user settings here - see https://invoke-ai.github.io/InvokeAI/features/CONFIGURATION/:

@psychedelicious
Copy link
Collaborator

It seems torch didn't install the correct version of itself or is falling back to CPU. What do you get when you run nvidia-smi in a terminal?

@zero2999
Copy link
Author

ppbg@ppbg-IdeaPad-Gaming-3-15ACH6:/.cache$ nvidia-smi
Command 'nvidia-smi' not found, but can be installed with:
sudo apt install nvidia-utils-390 # version 390.157-0ubuntu0.22.04.2, or
sudo apt install nvidia-utils-418-server # version 418.226.00-0ubuntu5
0.22.04.1
sudo apt install nvidia-utils-450-server # version 450.248.02-0ubuntu0.22.04.1
sudo apt install nvidia-utils-470 # version 470.223.02-0ubuntu0.22.04.1
sudo apt install nvidia-utils-470-server # version 470.223.02-0ubuntu0.22.04.1
sudo apt install nvidia-utils-525 # version 525.147.05-0ubuntu0.22.04.1
sudo apt install nvidia-utils-525-server # version 525.147.05-0ubuntu0.22.04.1
sudo apt install nvidia-utils-535 # version 535.129.03-0ubuntu0.22.04.1
sudo apt install nvidia-utils-535-server # version 535.129.03-0ubuntu0.22.04.1
sudo apt install nvidia-utils-510 # version 510.60.02-0ubuntu1
sudo apt install nvidia-utils-510-server # version 510.47.03-0ubuntu3

@psychedelicious
Copy link
Collaborator

I'm pretty sure you get nvidia-smi when you install your GPU drivers. Missing or nonfunctional drives could result in the app falling back to CPU, causing generation to be very slow.

Please ensure your GPU drivers are installed - reinstall if they are not - then run nvidia-smi so we can confirm that your drivers are installed and functioning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants