Spaces:
Runtime error
Runtime error
Commit
·
3f6ad3f
0
Parent(s):
Init commit
Browse files- .gitignore +6 -0
- Experiments.ipynb +0 -0
- README.md +0 -0
- main.py +19 -0
- setup.py +49 -0
.gitignore
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.ipynb_checkpoints/
|
| 2 |
+
env/
|
| 3 |
+
wandb/
|
| 4 |
+
*.egg-info/
|
| 5 |
+
data/
|
| 6 |
+
.DS_Store
|
Experiments.ipynb
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
README.md
ADDED
|
File without changes
|
main.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from audio_diffusion_pytorch import AudioDiffusionModel
|
| 2 |
+
import torch
|
| 3 |
+
from tqdm import tqdm
|
| 4 |
+
import wandb
|
| 5 |
+
|
| 6 |
+
model = AudioDiffusionModel(in_channels=1)
|
| 7 |
+
wandb.init(project="RemFX", entity="mattricesound")
|
| 8 |
+
|
| 9 |
+
x = torch.randn(2, 1, 2**18)
|
| 10 |
+
for i in tqdm(range(100)):
|
| 11 |
+
loss = model(x)
|
| 12 |
+
loss.backward()
|
| 13 |
+
if i % 10 == 0:
|
| 14 |
+
print(loss)
|
| 15 |
+
wandb.log({"loss": loss})
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
noise = torch.randn(2, 1, 2**18)
|
| 19 |
+
sampled = model.sample(noise=noise, num_steps=5)
|
setup.py
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from pathlib import Path
|
| 2 |
+
from setuptools import setup, find_packages
|
| 3 |
+
|
| 4 |
+
NAME = "REMFX"
|
| 5 |
+
DESCRIPTION = ""
|
| 6 |
+
URL = ""
|
| 7 |
+
EMAIL = "[email protected]"
|
| 8 |
+
AUTHOR = "Matthew Rice"
|
| 9 |
+
REQUIRES_PYTHON = ">=3.8.0"
|
| 10 |
+
VERSION = "0.0.1"
|
| 11 |
+
|
| 12 |
+
HERE = Path(__file__).parent
|
| 13 |
+
|
| 14 |
+
try:
|
| 15 |
+
with open(HERE / "README.md", encoding="utf-8") as f:
|
| 16 |
+
long_description = "\n" + f.read()
|
| 17 |
+
except FileNotFoundError:
|
| 18 |
+
long_description = DESCRIPTION
|
| 19 |
+
|
| 20 |
+
setup(
|
| 21 |
+
name=NAME,
|
| 22 |
+
version=VERSION,
|
| 23 |
+
description=DESCRIPTION,
|
| 24 |
+
long_description=long_description,
|
| 25 |
+
long_description_content_type="text/markdown",
|
| 26 |
+
author=AUTHOR,
|
| 27 |
+
author_email=EMAIL,
|
| 28 |
+
python_requires=REQUIRES_PYTHON,
|
| 29 |
+
url=URL,
|
| 30 |
+
packages=find_packages(),
|
| 31 |
+
install_requires=[
|
| 32 |
+
"torch>=1.11.0",
|
| 33 |
+
"torchaudio",
|
| 34 |
+
"functorch",
|
| 35 |
+
"scipy",
|
| 36 |
+
"numpy",
|
| 37 |
+
"torchvision",
|
| 38 |
+
"pytorch-lightning",
|
| 39 |
+
"numba",
|
| 40 |
+
"wandb",
|
| 41 |
+
],
|
| 42 |
+
include_package_data=True,
|
| 43 |
+
license="Apache License 2.0",
|
| 44 |
+
classifiers=[
|
| 45 |
+
"License :: OSI Approved :: Apache Software License",
|
| 46 |
+
"Topic :: Multimedia :: Sound/Audio",
|
| 47 |
+
"Topic :: Scientific/Engineering",
|
| 48 |
+
],
|
| 49 |
+
)
|