patrickvonplaten
commited on
Commit
·
adba853
1
Parent(s):
f3a146b
Update README.md
Browse files
README.md
CHANGED
@@ -1,7 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
## FP32
|
2 |
|
3 |
```python
|
4 |
-
# !pip install
|
5 |
from diffusers import DiffusionPipeline
|
6 |
import scipy
|
7 |
|
@@ -13,7 +23,7 @@ audios = pipeline(audio_length_in_s=4.0).audios
|
|
13 |
|
14 |
# To save locally
|
15 |
for audio in audios:
|
16 |
-
scipy.io.wavfile.write("
|
17 |
|
18 |
# To dislay in google colab
|
19 |
import IPython.display as ipd
|
@@ -26,7 +36,7 @@ for audio in audios:
|
|
26 |
Faster at a small loss of quality
|
27 |
|
28 |
```python
|
29 |
-
# !pip install
|
30 |
from diffusers import DiffusionPipeline
|
31 |
import scipy
|
32 |
import torch
|
@@ -38,8 +48,8 @@ pipeline = pipeline.to("cuda")
|
|
38 |
audios = pipeline(audio_length_in_s=4.0).audios
|
39 |
|
40 |
# To save locally
|
41 |
-
for audio in audios:
|
42 |
-
scipy.io.wavfile.write("
|
43 |
|
44 |
# To dislay in google colab
|
45 |
import IPython.display as ipd
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
tags:
|
4 |
+
- stable-diffusion
|
5 |
+
- stable-diffusion-diffusers
|
6 |
+
- text-to-image
|
7 |
+
---
|
8 |
+
|
9 |
+
[Dance Diffusion](https://github.com/Harmonai-org/sample-generator) is now available in 🧨 Diffusers.
|
10 |
+
|
11 |
## FP32
|
12 |
|
13 |
```python
|
14 |
+
# !pip install diffusers[torch] accelerate scipy
|
15 |
from diffusers import DiffusionPipeline
|
16 |
import scipy
|
17 |
|
|
|
23 |
|
24 |
# To save locally
|
25 |
for audio in audios:
|
26 |
+
scipy.io.wavfile.write(f"maestro_test_{i}.wav", pipe.unet.sample_rate, audio.transpose())
|
27 |
|
28 |
# To dislay in google colab
|
29 |
import IPython.display as ipd
|
|
|
36 |
Faster at a small loss of quality
|
37 |
|
38 |
```python
|
39 |
+
# !pip install diffusers[torch] accelerate scipy
|
40 |
from diffusers import DiffusionPipeline
|
41 |
import scipy
|
42 |
import torch
|
|
|
48 |
audios = pipeline(audio_length_in_s=4.0).audios
|
49 |
|
50 |
# To save locally
|
51 |
+
for i, audio in enumerate(audios):
|
52 |
+
scipy.io.wavfile.write(f"maestro_test_{i}.wav", pipe.unet.sample_rate, audio.transpose())
|
53 |
|
54 |
# To dislay in google colab
|
55 |
import IPython.display as ipd
|