Spaces:
Runtime error
Runtime error
update to latest version of diffusers
Browse files- notebooks/test-model.ipynb +0 -0
- requirements-lock.txt +26 -106
- src/train_unconditional.py +16 -17
notebooks/test-model.ipynb
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
requirements-lock.txt
CHANGED
|
@@ -1,183 +1,110 @@
|
|
| 1 |
absl-py==1.2.0
|
| 2 |
accelerate==0.12.0
|
| 3 |
-
aiobotocore==2.3.4
|
| 4 |
aiohttp==3.8.1
|
| 5 |
-
aioitertools==0.10.0
|
| 6 |
aiosignal==1.2.0
|
| 7 |
-
analytics-python==1.4.0
|
| 8 |
-
anyio==3.6.1
|
| 9 |
appdirs==1.4.4
|
| 10 |
argon2-cffi==21.3.0
|
| 11 |
argon2-cffi-bindings==21.2.0
|
|
|
|
| 12 |
async-timeout==4.0.2
|
| 13 |
-
attrs==
|
| 14 |
audioread==3.0.0
|
| 15 |
backcall==0.2.0
|
| 16 |
-
backoff==1.10.0
|
| 17 |
-
bcrypt==3.2.2
|
| 18 |
beautifulsoup4==4.11.1
|
| 19 |
-
bertviz==1.4.0
|
| 20 |
-
black==22.6.0
|
| 21 |
bleach==5.0.1
|
| 22 |
-
boto3==1.21.21
|
| 23 |
-
botocore==1.24.21
|
| 24 |
cachetools==5.2.0
|
| 25 |
-
captum==0.5.0
|
| 26 |
certifi==2022.6.15
|
| 27 |
cffi==1.15.1
|
| 28 |
-
|
| 29 |
-
charset-normalizer==2.1.0
|
| 30 |
-
click==8.1.3
|
| 31 |
-
cloudpickle==2.1.0
|
| 32 |
-
colossalai==0.1.8
|
| 33 |
-
commonmark==0.9.1
|
| 34 |
-
cryptography==37.0.4
|
| 35 |
-
cycler==0.11.0
|
| 36 |
datasets==2.4.0
|
| 37 |
-
debugpy==1.6.
|
| 38 |
decorator==5.1.1
|
| 39 |
-
deepspeed==0.7.0
|
| 40 |
defusedxml==0.7.1
|
| 41 |
-
diffusers==0.2.
|
| 42 |
dill==0.3.5.1
|
| 43 |
-
distlib==0.3.5
|
| 44 |
entrypoints==0.4
|
| 45 |
-
|
| 46 |
-
fastapi==0.79.0
|
| 47 |
fastjsonschema==2.16.1
|
| 48 |
-
ffmpy==0.3.0
|
| 49 |
filelock==3.8.0
|
| 50 |
-
fonttools==4.34.4
|
| 51 |
frozenlist==1.3.1
|
| 52 |
fsspec==2022.7.1
|
| 53 |
-
|
|
|
|
| 54 |
google-auth-oauthlib==0.4.6
|
| 55 |
-
google-pasta==0.2.0
|
| 56 |
-
gradio==3.1.4
|
| 57 |
grpcio==1.47.0
|
| 58 |
-
|
| 59 |
-
hjson==3.1.0
|
| 60 |
-
httpcore==0.15.0
|
| 61 |
-
httpx==0.23.0
|
| 62 |
-
huggingface-hub==0.8.1
|
| 63 |
-
identify==2.5.3
|
| 64 |
idna==3.3
|
| 65 |
importlib-metadata==4.12.0
|
| 66 |
-
invoke==1.7.1
|
| 67 |
ipykernel==6.15.1
|
| 68 |
-
ipython==
|
| 69 |
ipython-genutils==0.2.0
|
| 70 |
ipywidgets==7.7.1
|
| 71 |
jedi==0.18.1
|
| 72 |
Jinja2==3.1.2
|
| 73 |
-
jmespath==1.0.1
|
| 74 |
joblib==1.1.0
|
| 75 |
-
jsonschema==4.
|
| 76 |
jupyter-client==7.3.4
|
|
|
|
| 77 |
jupyter-core==4.11.1
|
| 78 |
jupyterlab-pygments==0.2.2
|
| 79 |
-
jupyterlab-widgets==
|
| 80 |
-
kiwisolver==1.4.4
|
| 81 |
librosa==0.9.2
|
| 82 |
-
linkify-it-py==1.0.3
|
| 83 |
llvmlite==0.39.0
|
| 84 |
lxml==4.9.1
|
| 85 |
Markdown==3.4.1
|
| 86 |
-
markdown-it-py==2.1.0
|
| 87 |
MarkupSafe==2.1.1
|
| 88 |
-
matplotlib==
|
| 89 |
-
|
| 90 |
-
mdit-py-plugins==0.3.0
|
| 91 |
-
mdurl==0.1.2
|
| 92 |
-
mistune==0.8.4
|
| 93 |
-
monotonic==1.6
|
| 94 |
-
more-itertools==8.14.0
|
| 95 |
multidict==6.0.2
|
| 96 |
multiprocess==0.70.13
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
nbclient==0.6.6
|
| 100 |
-
nbconvert==6.5.3
|
| 101 |
nbformat==5.4.0
|
| 102 |
nest-asyncio==1.5.5
|
| 103 |
-
networkx==2.8.5
|
| 104 |
-
ninja==1.10.2.3
|
| 105 |
-
nlp==0.4.0
|
| 106 |
-
nltk==3.7
|
| 107 |
-
nodeenv==1.7.0
|
| 108 |
notebook==6.4.12
|
| 109 |
numba==0.56.0
|
| 110 |
numpy==1.22.4
|
| 111 |
oauthlib==3.2.0
|
| 112 |
-
orjson==3.7.12
|
| 113 |
packaging==21.3
|
| 114 |
pandas==1.4.3
|
| 115 |
pandocfilters==1.5.0
|
| 116 |
-
paramiko==2.11.0
|
| 117 |
parso==0.8.3
|
| 118 |
-
pathlib2==2.3.7.post1
|
| 119 |
-
pathos==0.2.9
|
| 120 |
-
pathspec==0.9.0
|
| 121 |
pexpect==4.8.0
|
| 122 |
pickleshare==0.7.5
|
| 123 |
Pillow==9.2.0
|
| 124 |
-
platformdirs==2.5.2
|
| 125 |
-
pluggy==0.13.1
|
| 126 |
pooch==1.6.0
|
| 127 |
-
pox==0.3.1
|
| 128 |
-
ppft==1.7.6.5
|
| 129 |
-
pre-commit==2.20.0
|
| 130 |
prometheus-client==0.14.1
|
| 131 |
prompt-toolkit==3.0.30
|
| 132 |
protobuf==3.19.4
|
| 133 |
-
protobuf3-to-dict==0.1.5
|
| 134 |
psutil==5.9.1
|
| 135 |
ptyprocess==0.7.0
|
| 136 |
-
|
| 137 |
-
py-cpuinfo==8.0.0
|
| 138 |
pyarrow==9.0.0
|
| 139 |
pyasn1==0.4.8
|
| 140 |
pyasn1-modules==0.2.8
|
| 141 |
pycparser==2.21
|
| 142 |
-
|
| 143 |
-
pydantic==1.9.2
|
| 144 |
-
pydub==0.25.1
|
| 145 |
-
Pygments==2.12.0
|
| 146 |
-
PyNaCl==1.5.0
|
| 147 |
pyparsing==3.0.9
|
| 148 |
pyrsistent==0.18.1
|
| 149 |
-
pytest==5.4.3
|
| 150 |
python-dateutil==2.8.2
|
| 151 |
-
python-dotenv==0.20.0
|
| 152 |
-
python-multipart==0.0.5
|
| 153 |
pytz==2022.2.1
|
| 154 |
PyYAML==6.0
|
| 155 |
pyzmq==23.2.1
|
| 156 |
-
|
|
|
|
|
|
|
| 157 |
requests==2.28.1
|
| 158 |
requests-oauthlib==1.3.1
|
| 159 |
resampy==0.4.0
|
| 160 |
responses==0.18.0
|
| 161 |
-
rfc3986==1.5.0
|
| 162 |
-
rich==12.5.1
|
| 163 |
rsa==4.9
|
| 164 |
-
s3fs==2022.7.1
|
| 165 |
-
s3transfer==0.5.2
|
| 166 |
-
sagemaker==2.103.0
|
| 167 |
scikit-learn==1.1.2
|
| 168 |
scipy==1.9.0
|
| 169 |
-
seaborn==0.11.2
|
| 170 |
Send2Trash==1.8.0
|
| 171 |
-
sentencepiece==0.1.97
|
| 172 |
-
shap==0.41.0
|
| 173 |
six==1.16.0
|
| 174 |
-
slicer==0.0.7
|
| 175 |
-
smdebug-rulesconfig==1.0.1
|
| 176 |
-
sniffio==1.2.0
|
| 177 |
-
snorkel==0.9.9
|
| 178 |
SoundFile==0.10.3.post1
|
| 179 |
soupsieve==2.3.2.post1
|
| 180 |
-
|
| 181 |
tensorboard==2.10.0
|
| 182 |
tensorboard-data-server==0.6.1
|
| 183 |
tensorboard-plugin-wit==1.8.1
|
|
@@ -186,25 +113,18 @@ threadpoolctl==3.1.0
|
|
| 186 |
tinycss2==1.1.1
|
| 187 |
tokenizers==0.12.1
|
| 188 |
toml==0.10.2
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
torchaudio==0.12.1+cu116
|
| 192 |
-
torchvision==0.13.1+cu116
|
| 193 |
tornado==6.2
|
| 194 |
tqdm==4.64.0
|
| 195 |
traitlets==5.3.0
|
| 196 |
transformers==4.21.1
|
| 197 |
-
transformers-interpret==0.7.5
|
| 198 |
typing_extensions==4.3.0
|
| 199 |
-
|
| 200 |
-
urllib3==1.26.11
|
| 201 |
-
uvicorn==0.18.2
|
| 202 |
-
virtualenv==20.16.3
|
| 203 |
wcwidth==0.2.5
|
| 204 |
webencodings==0.5.1
|
| 205 |
Werkzeug==2.2.2
|
| 206 |
widgetsnbextension==3.6.1
|
| 207 |
-
wrapt==1.14.1
|
| 208 |
xxhash==3.0.0
|
| 209 |
yapf==0.32.0
|
| 210 |
yarl==1.8.1
|
|
|
|
| 1 |
absl-py==1.2.0
|
| 2 |
accelerate==0.12.0
|
|
|
|
| 3 |
aiohttp==3.8.1
|
|
|
|
| 4 |
aiosignal==1.2.0
|
|
|
|
|
|
|
| 5 |
appdirs==1.4.4
|
| 6 |
argon2-cffi==21.3.0
|
| 7 |
argon2-cffi-bindings==21.2.0
|
| 8 |
+
asttokens==2.0.8
|
| 9 |
async-timeout==4.0.2
|
| 10 |
+
attrs==22.1.0
|
| 11 |
audioread==3.0.0
|
| 12 |
backcall==0.2.0
|
|
|
|
|
|
|
| 13 |
beautifulsoup4==4.11.1
|
|
|
|
|
|
|
| 14 |
bleach==5.0.1
|
|
|
|
|
|
|
| 15 |
cachetools==5.2.0
|
|
|
|
| 16 |
certifi==2022.6.15
|
| 17 |
cffi==1.15.1
|
| 18 |
+
charset-normalizer==2.1.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
datasets==2.4.0
|
| 20 |
+
debugpy==1.6.3
|
| 21 |
decorator==5.1.1
|
|
|
|
| 22 |
defusedxml==0.7.1
|
| 23 |
+
diffusers==0.2.4
|
| 24 |
dill==0.3.5.1
|
|
|
|
| 25 |
entrypoints==0.4
|
| 26 |
+
executing==0.10.0
|
|
|
|
| 27 |
fastjsonschema==2.16.1
|
|
|
|
| 28 |
filelock==3.8.0
|
|
|
|
| 29 |
frozenlist==1.3.1
|
| 30 |
fsspec==2022.7.1
|
| 31 |
+
ftfy==6.1.1
|
| 32 |
+
google-auth==2.11.0
|
| 33 |
google-auth-oauthlib==0.4.6
|
|
|
|
|
|
|
| 34 |
grpcio==1.47.0
|
| 35 |
+
huggingface-hub==0.9.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
idna==3.3
|
| 37 |
importlib-metadata==4.12.0
|
|
|
|
| 38 |
ipykernel==6.15.1
|
| 39 |
+
ipython==8.4.0
|
| 40 |
ipython-genutils==0.2.0
|
| 41 |
ipywidgets==7.7.1
|
| 42 |
jedi==0.18.1
|
| 43 |
Jinja2==3.1.2
|
|
|
|
| 44 |
joblib==1.1.0
|
| 45 |
+
jsonschema==4.14.0
|
| 46 |
jupyter-client==7.3.4
|
| 47 |
+
jupyter-console==6.4.4
|
| 48 |
jupyter-core==4.11.1
|
| 49 |
jupyterlab-pygments==0.2.2
|
| 50 |
+
jupyterlab-widgets==3.0.2
|
|
|
|
| 51 |
librosa==0.9.2
|
|
|
|
| 52 |
llvmlite==0.39.0
|
| 53 |
lxml==4.9.1
|
| 54 |
Markdown==3.4.1
|
|
|
|
| 55 |
MarkupSafe==2.1.1
|
| 56 |
+
matplotlib-inline==0.1.6
|
| 57 |
+
mistune==2.0.4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
multidict==6.0.2
|
| 59 |
multiprocess==0.70.13
|
| 60 |
+
nbclient==0.6.7
|
| 61 |
+
nbconvert==7.0.0
|
|
|
|
|
|
|
| 62 |
nbformat==5.4.0
|
| 63 |
nest-asyncio==1.5.5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
notebook==6.4.12
|
| 65 |
numba==0.56.0
|
| 66 |
numpy==1.22.4
|
| 67 |
oauthlib==3.2.0
|
|
|
|
| 68 |
packaging==21.3
|
| 69 |
pandas==1.4.3
|
| 70 |
pandocfilters==1.5.0
|
|
|
|
| 71 |
parso==0.8.3
|
|
|
|
|
|
|
|
|
|
| 72 |
pexpect==4.8.0
|
| 73 |
pickleshare==0.7.5
|
| 74 |
Pillow==9.2.0
|
|
|
|
|
|
|
| 75 |
pooch==1.6.0
|
|
|
|
|
|
|
|
|
|
| 76 |
prometheus-client==0.14.1
|
| 77 |
prompt-toolkit==3.0.30
|
| 78 |
protobuf==3.19.4
|
|
|
|
| 79 |
psutil==5.9.1
|
| 80 |
ptyprocess==0.7.0
|
| 81 |
+
pure-eval==0.2.2
|
|
|
|
| 82 |
pyarrow==9.0.0
|
| 83 |
pyasn1==0.4.8
|
| 84 |
pyasn1-modules==0.2.8
|
| 85 |
pycparser==2.21
|
| 86 |
+
Pygments==2.13.0
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
pyparsing==3.0.9
|
| 88 |
pyrsistent==0.18.1
|
|
|
|
| 89 |
python-dateutil==2.8.2
|
|
|
|
|
|
|
| 90 |
pytz==2022.2.1
|
| 91 |
PyYAML==6.0
|
| 92 |
pyzmq==23.2.1
|
| 93 |
+
qtconsole==5.3.1
|
| 94 |
+
QtPy==2.2.0
|
| 95 |
+
regex==2022.8.17
|
| 96 |
requests==2.28.1
|
| 97 |
requests-oauthlib==1.3.1
|
| 98 |
resampy==0.4.0
|
| 99 |
responses==0.18.0
|
|
|
|
|
|
|
| 100 |
rsa==4.9
|
|
|
|
|
|
|
|
|
|
| 101 |
scikit-learn==1.1.2
|
| 102 |
scipy==1.9.0
|
|
|
|
| 103 |
Send2Trash==1.8.0
|
|
|
|
|
|
|
| 104 |
six==1.16.0
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
SoundFile==0.10.3.post1
|
| 106 |
soupsieve==2.3.2.post1
|
| 107 |
+
stack-data==0.4.0
|
| 108 |
tensorboard==2.10.0
|
| 109 |
tensorboard-data-server==0.6.1
|
| 110 |
tensorboard-plugin-wit==1.8.1
|
|
|
|
| 113 |
tinycss2==1.1.1
|
| 114 |
tokenizers==0.12.1
|
| 115 |
toml==0.10.2
|
| 116 |
+
torch==1.12.1
|
| 117 |
+
torchvision==0.13.1
|
|
|
|
|
|
|
| 118 |
tornado==6.2
|
| 119 |
tqdm==4.64.0
|
| 120 |
traitlets==5.3.0
|
| 121 |
transformers==4.21.1
|
|
|
|
| 122 |
typing_extensions==4.3.0
|
| 123 |
+
urllib3==1.26.12
|
|
|
|
|
|
|
|
|
|
| 124 |
wcwidth==0.2.5
|
| 125 |
webencodings==0.5.1
|
| 126 |
Werkzeug==2.2.2
|
| 127 |
widgetsnbextension==3.6.1
|
|
|
|
| 128 |
xxhash==3.0.0
|
| 129 |
yapf==0.32.0
|
| 130 |
yarl==1.8.1
|
src/train_unconditional.py
CHANGED
|
@@ -206,7 +206,22 @@ def main(args):
|
|
| 206 |
|
| 207 |
# Generate sample images for visual inspection
|
| 208 |
if accelerator.is_main_process:
|
| 209 |
-
if epoch % args.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 210 |
pipeline = DDPMPipeline(
|
| 211 |
unet=accelerator.unwrap_model(
|
| 212 |
ema_model.averaged_model if args.use_ema else model
|
|
@@ -237,22 +252,6 @@ def main(args):
|
|
| 237 |
epoch,
|
| 238 |
sample_rate=mel.get_sample_rate(),
|
| 239 |
)
|
| 240 |
-
|
| 241 |
-
if epoch % args.save_model_epochs == 0 or epoch == args.num_epochs - 1:
|
| 242 |
-
# save the model
|
| 243 |
-
if args.push_to_hub:
|
| 244 |
-
try:
|
| 245 |
-
push_to_hub(
|
| 246 |
-
args,
|
| 247 |
-
pipeline,
|
| 248 |
-
repo,
|
| 249 |
-
commit_message=f"Epoch {epoch}",
|
| 250 |
-
blocking=False,
|
| 251 |
-
)
|
| 252 |
-
except NameError: # current version of diffusers has a little bug
|
| 253 |
-
pass
|
| 254 |
-
else:
|
| 255 |
-
pipeline.save_pretrained(output_dir)
|
| 256 |
accelerator.wait_for_everyone()
|
| 257 |
|
| 258 |
accelerator.end_training()
|
|
|
|
| 206 |
|
| 207 |
# Generate sample images for visual inspection
|
| 208 |
if accelerator.is_main_process:
|
| 209 |
+
if epoch % args.save_model_epochs == 0 or epoch == args.num_epochs - 1:
|
| 210 |
+
# save the model
|
| 211 |
+
if args.push_to_hub:
|
| 212 |
+
try:
|
| 213 |
+
push_to_hub(
|
| 214 |
+
args,
|
| 215 |
+
pipeline,
|
| 216 |
+
repo,
|
| 217 |
+
commit_message=f"Epoch {epoch}",
|
| 218 |
+
blocking=False,
|
| 219 |
+
)
|
| 220 |
+
except NameError: # current version of diffusers has a little bug
|
| 221 |
+
pass
|
| 222 |
+
else:
|
| 223 |
+
pipeline.save_pretrained(output_dir)
|
| 224 |
+
|
| 225 |
pipeline = DDPMPipeline(
|
| 226 |
unet=accelerator.unwrap_model(
|
| 227 |
ema_model.averaged_model if args.use_ema else model
|
|
|
|
| 252 |
epoch,
|
| 253 |
sample_rate=mel.get_sample_rate(),
|
| 254 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 255 |
accelerator.wait_for_everyone()
|
| 256 |
|
| 257 |
accelerator.end_training()
|