Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# MUSE-512-finetuned
|
2 |
+
|
3 |
+
## Example
|
4 |
+
|
5 |
+
First install the deps using
|
6 |
+
|
7 |
+
```bash
|
8 |
+
pip install transformers accelerate ftfy
|
9 |
+
pip install -U git+https://github.com/huggingface/open-muse.git
|
10 |
+
```
|
11 |
+
|
12 |
+
```python
|
13 |
+
import torch
|
14 |
+
from muse import PipelineMuse
|
15 |
+
|
16 |
+
pipe = PipelineMuse.from_pretrained("openMUSE/muse-512-finetuned).to("cuda", dtype=torch.float16)
|
17 |
+
pipe.transformer.enable_xformers_memory_efficient_attention()
|
18 |
+
|
19 |
+
prompt = "A monkey doing yoga on the beach"
|
20 |
+
images = pipe(
|
21 |
+
prompt, timesteps=16, guidance_scale=10, transformer_seq_len=1024, use_fp16=True
|
22 |
+
)
|
23 |
+
images[0]
|
24 |
+
```
|