File size: 533 Bytes
4feb129
 
 
d152298
 
 
 
 
 
 
 
 
 
 
 
84dbdde
 
 
d152298
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
---
license: openrail++
---

**Amazon EC2 Inf2 Instances**

- Instance Size: inf2.xlarge
- https://aws.amazon.com/ec2/instance-types/inf2/

**How to use Diffusers library for inference**

```
from optimum.neuron import NeuronStableDiffusionXLPipeline

prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
stable_diffusion_xl = NeuronStableDiffusionXLPipeline.from_pretrained(
    model_id="dminhk/stable-diffusion-xl-base-1.0-neuronx", device_ids=[0, 1]
)
image = stable_diffusion_xl(prompt).images[0]
```