Open joliss opened 1 year ago
Did you try the suggested --skip-torch-cuda-test
to have it skip the test?
With --skip-torch-cuda-test
, it seems to simply run on the CPU. (It doesn't explicitly say so in the output, but I'm getting the same slow performance as when I pass --use-cpu all
.)
@joliss you're mixing things. It's possible to run any code on Inferentia2 if you adjust it first. A1111 will not work without changes.
I'm not familiar with the internals of A1111 yet, but if anyone more familiar ends up looking into this more deeply, here's a notebook AWS published on getting stable diffusion to use the inf2 architecture. https://github.com/aws-neuron/aws-neuron-samples/blob/master/torch-neuronx/inference/hf_pretrained_sd2_768_inference.ipynb
waiting for someone who familiar with A1111 and compatible aws-neuron, it's too hard for me.
waiting for someone who familiar with A1111 and compatible aws-neuron, it's too hard for me.
You need to compile components of SD model on Inf2 instance and run them on Inf2, please refer this blog: Maximize Stable Diffusion performance and lower inference costs with AWS Inferentia2
And you can find several notebooks to compile different version of SD models on GitHub
Is there an existing issue for this?
What happened?
I was interested in seeing how Stable Diffusion would perform on Amazon's inf2 instances, which seem to run Amazon's AWS Inferentia chip.
Unfortunately, it doesn't seem to work at the moment.
Steps to reproduce the problem
Launch an EC2 instance with AMI Deep Learning AMI GPU PyTorch 2.0.0 (Amazon Linux 2) 20230406, instance type inf2.xlarge. Log into it via SSH (user ec2-user).
Install Python3.10:
Run stable-diffusion-webui:
What should have happened?
It should run, but instead I'm getting
See full log below.
Commit where the problem happens
5ab7f213bec2f816f9c5644becb32eb72c8ffb89
What platforms do you use to access the UI ?
Linux
What browsers do you use to access the UI ?
No response
Command Line Arguments
List of extensions
No
Console logs
Additional information
Running Stable Diffusion on inf2 is reportedly supported as of May 5, 2023.
I'm not sure how difficult it is to actually get it running, so this issue might be more of a feature request than a bug. Please feel free to edit the title accordingly.