Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-resample not running? #41

Closed
ThrowawayAccount01 opened this issue Mar 20, 2023 · 12 comments · Fixed by #42 or #43
Closed

Pre-resample not running? #41

ThrowawayAccount01 opened this issue Mar 20, 2023 · 12 comments · Fixed by #42 or #43
Labels
bug Something isn't working

Comments

@ThrowawayAccount01
Copy link

Trying to run svc pre-resample but it doesn't start:

(venv) C:\Users\LXC PC\Desktop\sovits\venv\Scripts>svc pre-resample
Preprocessing: 0it [00:00, ?it/s]

@34j
Copy link
Collaborator

34j commented Mar 20, 2023

@ThrowawayAccount01
Copy link
Author

I managed to get it working by manually specifying the path: svc pre-resample -i "C:\Users\LXC PC\Desktop\sovits\venv\Scripts\dataset_raw\44k\21Raw"

Ran through svc pre-config and svc pre-hubert with no problems.

However, when running svc train, I get an error. Here is the stack trace:

(venv) C:\Users\LXC PC\Desktop\sovits\venv\Scripts>svc train
'emb_g.weight'
Traceback (most recent call last):
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\so_vits_svc_fork\utils.py", line 385, in load_checkpoint
    new_state_dict[k] = saved_state_dict[k]
KeyError: 'emb_g.weight'
emb_g.weight is not in the checkpoint
  0%|                                                                                        | 0/10000 [00:00<?, ?it/s]C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\torch\functional.py:641: UserWarning: stft with return_complex=False is deprecated. In a future pytorch release, stft will return complex tensors for all inputs, and return_complex=False will raise an error.
Note: you can still call torch.view_as_real on the complex output to recover the old return format. (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\SpectralOps.cpp:867.)
  return _VF.stft(input, n_fft, hop_length, win_length, window,  # type: ignore[attr-defined]
C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\torch\autograd\__init__.py:200: UserWarning: Grad strides do not match bucket view strides. This may indicate grad was not created according to the gradient layout contract, or that the param's strides changed since DDP was constructed.  This is not an error, but may impair performance.
grad.sizes() = [32, 1, 4], strides() = [4, 1, 1]
bucket_view.sizes() = [32, 1, 4], strides() = [4, 4, 1] (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\distributed\c10d\reducer.cpp:337.)
  Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
  0%|                                                                                        | 0/10000 [00:13<?, ?it/s]
Traceback (most recent call last):
  File "C:\Program Files\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\LXC PC\Desktop\sovits\venv\Scripts\svc.exe\__main__.py", line 7, in <module>
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\so_vits_svc_fork\__main__.py", line 119, in train
    train(config_path=config_path, model_path=model_path)
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\so_vits_svc_fork\train.py", line 49, in train
    mp.spawn(
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\torch\multiprocessing\spawn.py", line 239, in spawn
    return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\torch\multiprocessing\spawn.py", line 197, in start_processes
    while not context.join():
  File "C:\Users\LXC PC\Desktop\sovits\venv\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 "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\torch\multiprocessing\spawn.py", line 69, in _wrap
    fn(i, *args)
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\so_vits_svc_fork\train.py", line 158, in run
    train_and_evaluate(
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\so_vits_svc_fork\train.py", line 338, in train_and_evaluate
    evaluate(hps, net_g, eval_loader, writer_eval)
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\so_vits_svc_fork\train.py", line 376, in evaluate
    for batch_idx, items in enumerate(eval_loader):
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\torch\utils\data\dataloader.py", line 634, in __next__
    data = self._next_data()
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\torch\utils\data\dataloader.py", line 1346, in _next_data
    return self._process_data(data)
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\torch\utils\data\dataloader.py", line 1372, in _process_data
    data.reraise()
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\torch\_utils.py", line 644, in reraise
    raise exception
AssertionError: Caught AssertionError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\torch\utils\data\_utils\worker.py", line 308, in _worker_loop
    data = fetcher.fetch(index)
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\torch\utils\data\_utils\fetch.py", line 51, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\torch\utils\data\_utils\fetch.py", line 51, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\so_vits_svc_fork\data_utils.py", line 104, in __getitem__
    return self.get_audio(self.audiopaths[index][0])
  File "C:\Users\LXC PC\Desktop\sovits\venv\lib\site-packages\so_vits_svc_fork\data_utils.py", line 78, in get_audio
    assert abs(c.size(-1) - spec.size(-1)) < 3, (
AssertionError: (1398, 1392, torch.Size([1398]), 'dataset/44k/21Raw/101.wav')

@34j
Copy link
Collaborator

34j commented Mar 20, 2023

Was the logs/44k empty from the beginning?

@ThrowawayAccount01
Copy link
Author

logs/44k contains these files:

01

@34j
Copy link
Collaborator

34j commented Mar 20, 2023

Was it empty at first?

@ThrowawayAccount01
Copy link
Author

ThrowawayAccount01 commented Mar 20, 2023

You mean before doing svc train? I think so, yea. It only created the logs folder after running the command. The folder didnt exist before then.

@34j
Copy link
Collaborator

34j commented Mar 20, 2023

This is due to the fact that I migrated the library for f0 inference from dio to crepe without adequate testing. Please use version <0.8.0. Sorry for your inconvenience.

@34j
Copy link
Collaborator

34j commented Mar 20, 2023

@allcontributors add ThrowawayAccount01 bug

@allcontributors
Copy link
Contributor

@34j

Could not find the user [ThrowawayAccount01](https://github.com/ThrowawayAccount01) on github.

@34j
Copy link
Collaborator

34j commented Mar 20, 2023

@allcontributors add ThrowawayAccount01 bug

@allcontributors
Copy link
Contributor

@34j

I've put up a pull request to add @ThrowawayAccount01! 🎉

@34j 34j added the bug Something isn't working label Mar 22, 2023
@forerunrun
Copy link

i'm having the same issue, this was working fine yesterday, is there a known cause for running svc-pre-resample resulting in the following?
Preprocessing: 0it [00:00, ?it/s]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants