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

Server execution error: Numpy is not available #1135

Closed
Picus303 opened this issue Sep 1, 2024 · 7 comments
Closed

Server execution error: Numpy is not available #1135

Picus303 opened this issue Sep 1, 2024 · 7 comments

Comments

@Picus303
Copy link

Picus303 commented Sep 1, 2024

I followed the exact steps of this tutorial for local installation: https://www.interstice.cloud/plugin
But the error Server execution error: Numpy is not available appears at the end of a generation.

At the same time, running: \AppData\Roaming\krita\ai_diffusion\server\python\python.exe and trying to import Numpy works. Any ideas on how to fix that?

@Acly
Copy link
Owner

Acly commented Sep 1, 2024

See #1130

It's strange I can't reproduce this with a fresh install on Windows

@Picus303
Copy link
Author

Picus303 commented Sep 1, 2024

What is your GPU? Maybe the problem only happens with AMD. Are you sure pytorch with directml have the exact same dependencies than "normal" pytorch with cuda?

edit: downgrading to numpy 1.26.4 worked.

@makkflai
Copy link

makkflai commented Sep 1, 2024

hello, although I know absolutely nothing about programming and even less about python language, I also get the same error: “Server execution error: Numpy is not available”, I have an amd graphic card (6700xt) and when I try from the cpu it does let me generate images. what a pity I can't use it, I saw many videos about the AI and it is really very good. D:

@Picus303
Copy link
Author

Picus303 commented Sep 1, 2024

@makkflai To make it simple, this program uses dependencies, pieces of code writen by other people. One of these dependencies needed to generate images on the GPU "Numpy" seems to be installed with an incompatible version for AMD GPUs.

You need to downgrade it manually.

If you followed the tutorial like me (didn't install anything else yourself), you can open a command prompt and type: C:\Users\<your username>\AppData\Roaming\krita\ai_diffusion\server\python\python.exe -m pip install numpy==1.26.4. Replace with the right name and it should be ok.

@Acly
Copy link
Owner

Acly commented Sep 1, 2024

Maybe the problem only happens with AMD

Looks like that's the reason, the DirectML option does install numpy 2.1.0

Acly added a commit that referenced this issue Sep 1, 2024
Torch 2.3 is not compatible with numpy 2.x
@Picus303
Copy link
Author

Picus303 commented Sep 1, 2024

Problem solved by the commit.

@Picus303 Picus303 closed this as completed Sep 1, 2024
@makkflai
Copy link

makkflai commented Sep 1, 2024

thanks brother, with a friend who knows who helped me + your line of code I was able to make it work, have a good week :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants