Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

AttributeError: 'HParams' object has no attribute 'dataset_type' #63

Closed
EstelleSchwarzer opened this issue Mar 20, 2023 · 3 comments
Closed

Comments

@EstelleSchwarzer
Copy link

系统平台: windows

出现问题的环节: 推理

Python版本: 3.8

PyTorch版本: 1.13.1+cu116

所用分支: 4.0-v2

所用数据集:

授权证明截图:

问题描述: 推理报错,AttributeError: 'HParams' object has no attribute 'dataset_type',4.0分支可以正常推

日志截图:

use_cuda, True
INFO:44k:{'log_interval': 200, 'eval_interval': 800, 'seed': 1234, 'epochs': 10000, 'learning_rate': 0.0001, 'betas': [0.8, 0.99], 'eps': 1e-09, 'batch_size': 6, 'fp16_run': False, 'lr_decay': 0.999875, 'segment_size': 10240, 'init_lr_ratio': 1, 'warmup_epochs': 0, 'c_mel': 45, 'c_kl': 1.0, 'use_sr': True, 'max_speclen': 512, 'port': '8001', 'keep_ckpts': 10}
INFO:44k:{'training_files': 'filelists/train.txt', 'validation_files': 'filelists/val.txt', 'max_wav_value': 32768.0, 'sampling_rate': 44100, 'filter_length': 2048, 'hop_length': 512, 'win_length': 2048, 'n_mel_channels': 80, 'mel_fmin': 0.0, 'mel_fmax': 22050}
INFO:44k:{'inter_channels': 192, 'hidden_channels': 192, 'filter_channels': 768, 'n_heads': 2, 'n_layers': 6, 'kernel_size': 3, 'p_dropout': 0.1, 'resblock': '1', 'resblock_kernel_sizes': [3, 7, 11], 'resblock_dilation_sizes': [[1, 3, 5], [1, 3, 5], [1, 3, 5]], 'upsample_rates': [8, 8, 2, 2, 2], 'upsample_initial_channel': 512, 'upsample_kernel_sizes': [16, 16, 4, 4, 4], 'n_layers_q': 3, 'use_spectral_norm': False, 'gin_channels': 256, 'ssl_dim': 256, 'n_speakers': 200}
INFO:torch.distributed.distributed_c10d:Added key: store_based_barrier_key:1 to store for rank: 0
INFO:torch.distributed.distributed_c10d:Rank 0: Completed store-based barrier for key:store_based_barrier_key:1 with 1 nodes.
Traceback (most recent call last):
File "train.py", line 435, in
main()
File "train.py", line 57, in main
mp.spawn(run, nprocs=n_gpus, args=(n_gpus, hps,))
File "D:\so-vits\so-vits-svc1\python38\lib\site-packages\torch\multiprocessing\spawn.py", line 240, in spawn
return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
File "D:\so-vits\so-vits-svc1\python38\lib\site-packages\torch\multiprocessing\spawn.py", line 198, in start_processes while not context.join():
File "D:\so-vits\so-vits-svc1\python38\lib\site-packages\torch\multiprocessing\spawn.py", line 160, in join
raise ProcessRaisedException(msg, error_index, failed_process.pid)
torch.multiprocessing.spawn.ProcessRaisedException:
-- Process 0 terminated with the following error:
Traceback (most recent call last):
File "D:\so-vits\so-vits-svc1\python38\lib\site-packages\torch\multiprocessing\spawn.py", line 69, in _wrap
fn(i, *args)
File "D:\so-vits\so-vits-svc1\train.py", line 76, in run
dataset_constructor = DatasetConstructor(hps, num_replicas=n_gpus, rank=rank)
File "D:\so-vits\so-vits-svc1\data_utils.py", line 293, in init
self._get_components()
File "D:\so-vits\so-vits-svc1\data_utils.py", line 296, in _get_components
self._init_datasets()
File "D:\so-vits\so-vits-svc1\data_utils.py", line 301, in _init_datasets
self._train_dataset = self.dataset_function[self.hparams.data.dataset_type](self.hparams,
AttributeError: 'HParams' object has no attribute 'dataset_type'

@NaruseMioShirakana
Copy link
Contributor

配置文件错了,请检查你的配置文件

@EstelleSchwarzer
Copy link
Author

EstelleSchwarzer commented Mar 20, 2023

配置文件错了,请检查你的配置文件

好的,谢谢回复,我用模板重新配置一下

@Miuzarte
Copy link
Contributor

配置文件错了,请检查你的配置文件

好的,谢谢回复,我用模板重新配置一下

重新执行一遍划分数据集和生成配置文件的那条命令就好了

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants