Was experimenting with stability ai audio, and while documentation is short, i cannot determine what this problem could be?
Z:\Aistudio_pipeline\stable-audio-tools>python ./train.py --dataset-config Z:/Aistudio_pipeline/stable-audio-tools/stable_audio_tools/configs/dataset_configs/path/to/audio/dataset/dataset_config.json --model-config Z:\Aistudio_pipeline\stable-audio-tools\ckpt\model_config.json --name harmonai_train
Traceback (most recent call last):
File “Z:\Aistudio_pipeline\stable-audio-tools\train.py”, line 128, in
main()
File “Z:\Aistudio_pipeline\stable-audio-tools\train.py”, line 45, in main
train_dl = create_dataloader_from_config(
File “Z:\Aistudio_pipeline\stable-audio-tools\stable_audio_tools\data\dataset.py”, line 560, in create_dataloader_from_config
assert dataset_type is not None, “Dataset type must be specified in dataset config”
AssertionError: Dataset type must be specified in dataset config
{
“dataset_type”: “audio_dir”,
“datasets”: [
{
“id”: “1”,
“path”: “Z:/Aistudio_pipeline/stable-audio-tools/stable_audio_tools/configs/dataset_configs/path/to/audio/dataset/dataset_config.json”,
“custom_metadata_module”: “Z:/Aistudio_pipeline/stable-audio-tools/stable_audio_tools/configs/dataset_configs/path/to/custom_metadata/custom_md_example.py”
}
],
“random_crop”: true
#Combine args and config dicts
args_dict = vars(args)
args_dict.update({“model_config”: model_config})
args_dict.update({“dataset_config”: dataset_config})
push_wandb_config(wandb_logger, args_dict)
here is states to label the trainning set^^^^^^^^^^^^^^^^^^^^
def create_dataloader_from_config(dataset_config, batch_size, sample_size, sample_rate, audio_channels=2, num_workers=4):
dataset_type = dataset_config.get("audio_dir", None)
assert dataset_type is not None, "Dataset type must be specified in dataset config"
if audio_channels == 1:
force_channels = "mono"
else:
force_channels = "stereo"
if dataset_type == "audio_dir":
audio_dir_configs = dataset_config.get("datasets", None)
assert audio_dir_configs is not None, "Directory configuration must be specified in datasets[\"dataset\"]"
==============================================
the location where the asert violation is requesting the dataset to be fixed, buut from my understanding the file structure from stability ai doesnt state where it goes: Z:\Aistudio_pipeline\stable-audio-tools\stable_audio_tools\configs\dataset_configs\path\to
sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type]
File “C:\Python310\lib\site-packages\torch\utils\data\sampler.py”, line 143, in init
raise ValueError(f"num_samples should be a positive integer value, but got num_samples={self.num_samples}")
ValueError: num_samples should be a positive integer value, but got num_samples=0