dminhk commited on
Commit
d152298
·
1 Parent(s): 6858a9d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +21 -0
README.md CHANGED
@@ -2,3 +2,24 @@
2
  license: openrail++
3
  library_name: diffusers
4
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: openrail++
3
  library_name: diffusers
4
  ---
5
+
6
+ **Amazon EC2 Inf2 Instances**
7
+
8
+ - Instance Size: inf2.xlarge
9
+ - https://aws.amazon.com/ec2/instance-types/inf2/
10
+
11
+ **How to use Diffusers library for inference**
12
+
13
+ ```
14
+ from optimum.neuron import NeuronStableDiffusionXLPipeline
15
+
16
+ model_id = "dminhk/stable-diffusion-xl-base-1.0-neuronx"
17
+ input_shapes = {"batch_size": 1, "height": 1024, "width": 1024}
18
+
19
+ stable_diffusion_xl = NeuronStableDiffusionXLPipeline.from_pretrained(model_id, export=False, **input_shapes, device_ids=[0,1])
20
+ ```
21
+
22
+ ```
23
+ prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
24
+ image = stable_diffusion_xl(prompt).images[0]
25
+ ```