Jingya HF Staff commited on
Commit
6aaba9d
·
verified ·
1 Parent(s): 20cf992

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -3
README.md CHANGED
@@ -1,3 +1,24 @@
1
- ---
2
- license: openrail++
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: openrail++
3
+ ---
4
+
5
+ **INFERENTIA 2 ONLY**
6
+
7
+ ```python
8
+ import torch
9
+ from optimum.neuron import NeuronPixArtSigmaPipeline
10
+
11
+ # Compile
12
+ compiler_args = {"auto_cast": "none"}
13
+ input_shapes = {"batch_size": 1, "height": 512, "width": 512, "sequence_length": 120}
14
+
15
+ neuron_model = NeuronPixArtSigmaPipeline.from_pretrained("Jingya/pixart_sigma_pipe_xl_2_512_ms", torch_dtype=torch.bfloat16, export=True, disable_neuron_cache=True, **compiler_args, **input_shapes)
16
+
17
+ # Save locally
18
+ neuron_model.save_pretrained("pixart_sigma_neuron_512/")
19
+
20
+ # Upload to the HuggingFace Hub
21
+ neuron_model.push_to_hub(
22
+ "pixart_sigma_neuron_512/", repository_id="optimum/pixart_sigma_pipe_xl_2_512_ms_neuronx" # Replace with your HF Hub repo id
23
+ )
24
+ ```