Skip to content

Commit 31e2c27

Browse files
feat: add todo to readme, fix readme
1 parent 2a8e0b8 commit 31e2c27

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repos:
2929
- id: flake8
3030
args: [
3131
'--per-file-ignores=__init__.py:F401',
32-
'--max-line-length=88'
32+
'--max-line-length=88',
3333
]
3434

3535
# Checks types

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,38 +90,32 @@ sampler = DiffusionSampler(
9090
diffusion,
9191
num_steps=5, # Suggested range 1-100, higher better quality but takes longer
9292
sampler=ADPM2Sampler(rho=1),
93-
sigma_schedule=KarrasSchedule(
94-
sigma_min=0.002,
95-
sigma_max=1
96-
)
93+
sigma_schedule=KarrasSchedule(sigma_min=0.0001, sigma_max=3.0, rho=9.0)
9794
)
9895
# Generate a sample starting from the provided noise
9996
y = sampler(noise = torch.randn(1,1,2 ** 18))
10097
```
10198

10299
#### Inpainting
103100

104-
Note: this uses an old version, needs to be updated.
101+
Note: this is fixed to the `KarrasSampler`, needs to be updated to custom sampler.
105102

106103
```py
107-
from audio_diffusion_pytorch import DiffusionInpainter, KerrasSchedule
104+
from audio_diffusion_pytorch import DiffusionInpainter, KarrasSchedule
108105

109106
inpainter = DiffusionInpainter(
110107
diffusion,
111108
num_steps=50, # Suggested range 32-1000, higher for better quality
112109
num_resamples=5, # Suggested range 1-10, higher for better quality
113-
sigma_schedule=KerrasSchedule(
114-
sigma_min=0.002,
115-
sigma_max=1
116-
),
110+
sigma_schedule=KarrasSchedule(sigma_min=0.0001, sigma_max=3.0, rho=9.0),
117111
s_tmin=0,
118112
s_tmax=10,
119113
s_churn=40,
120114
s_noise=1.003
121115
)
122116

123-
inpaint = torch.randn(1,1,2 ** 15) # Start track, e.g. one sampled with DiffusionSampler
124-
inpaint_mask = torch.randint(0,2, (1,1,2 ** 15), dtype=torch.bool) # Set to `True` the parts you want to keep
117+
inpaint = torch.randn(1,1,2 ** 18) # Start track, e.g. one sampled with DiffusionSampler
118+
inpaint_mask = torch.randint(0,2, (1,1,2 ** 18), dtype=torch.bool) # Set to `True` the parts you want to keep
125119
y = inpainter(inpaint = inpaint, inpaint_mask = inpaint_mask)
126120
```
127121

@@ -147,6 +141,13 @@ y_long = composer(y, keep_start=True) # [1, 1, 98304]
147141
| [Charlie](https://wandb.ai/schneider/audio/reports/Audio-Diffusion-Charlie---VmlldzoyMzYyNDA1?accessToken=71gmurcwndv5e2abqrjnlh3n74j5555j3tycpd7h40tnv8fvb17k5pjkb57j9xxa) | [50ecc30d70](https://github.com/archinetai/audio-diffusion-pytorch/tree/50ecc30d70a211b92cb9c38d4b0250d7cc30533f) | Train on music with [YoutubeDataset](https://github.com/archinetai/audio-data-pytorch), larger patch tests for longer tracks, inpainting tests, initial test with infinite generation using SpanBySpanComposer. |
148142
| Delta (soon) | (current) | Test model with the faster `ADPM2` sampler and dynamic thresholding. |
149143

144+
## TODO
145+
146+
- [x] Add elucidated diffusion.
147+
- [x] Add ancestral DPM2 sampler.
148+
- [x] Add dynamic thresholding.
149+
- [ ] Add support with (variational) autoencoder to compress audio before diffusion.
150+
- [ ] Fix inpainting and make it work with ADPM2 sampler.
150151

151152
## Appreciation
152153

0 commit comments

Comments
 (0)