Spaces:
Runtime error
Runtime error
add missing pathlib import
Browse files
scripts/train_unconditional.py
CHANGED
@@ -2,11 +2,9 @@
|
|
2 |
|
3 |
import argparse
|
4 |
import os
|
|
|
5 |
from typing import Optional
|
6 |
|
7 |
-
import torch
|
8 |
-
import torch.nn.functional as F
|
9 |
-
|
10 |
from accelerate import Accelerator
|
11 |
from accelerate.logging import get_logger
|
12 |
from datasets import load_from_disk, load_dataset
|
@@ -18,17 +16,19 @@ from diffusers import (
|
|
18 |
AutoencoderKL,
|
19 |
)
|
20 |
from diffusers.pipelines.audio_diffusion import Mel
|
21 |
-
from huggingface_hub import HfFolder, Repository, whoami
|
22 |
from diffusers.optimization import get_scheduler
|
23 |
from diffusers.training_utils import EMAModel
|
|
|
|
|
|
|
|
|
|
|
24 |
from torchvision.transforms import (
|
25 |
Compose,
|
26 |
Normalize,
|
27 |
ToTensor,
|
28 |
)
|
29 |
-
import numpy as np
|
30 |
from tqdm.auto import tqdm
|
31 |
-
from librosa.util import normalize
|
32 |
|
33 |
logger = get_logger(__name__)
|
34 |
|
|
|
2 |
|
3 |
import argparse
|
4 |
import os
|
5 |
+
from pathlib import Path
|
6 |
from typing import Optional
|
7 |
|
|
|
|
|
|
|
8 |
from accelerate import Accelerator
|
9 |
from accelerate.logging import get_logger
|
10 |
from datasets import load_from_disk, load_dataset
|
|
|
16 |
AutoencoderKL,
|
17 |
)
|
18 |
from diffusers.pipelines.audio_diffusion import Mel
|
|
|
19 |
from diffusers.optimization import get_scheduler
|
20 |
from diffusers.training_utils import EMAModel
|
21 |
+
from huggingface_hub import HfFolder, Repository, whoami
|
22 |
+
from librosa.util import normalize
|
23 |
+
import numpy as np
|
24 |
+
import torch
|
25 |
+
import torch.nn.functional as F
|
26 |
from torchvision.transforms import (
|
27 |
Compose,
|
28 |
Normalize,
|
29 |
ToTensor,
|
30 |
)
|
|
|
31 |
from tqdm.auto import tqdm
|
|
|
32 |
|
33 |
logger = get_logger(__name__)
|
34 |
|