Skip to content

Fixes to make training work with new dependencies#226

Open
izderadicka wants to merge 1 commit into
OHF-Voice:mainfrom
izderadicka:iz-fix-training-new-tortch
Open

Fixes to make training work with new dependencies#226
izderadicka wants to merge 1 commit into
OHF-Voice:mainfrom
izderadicka:iz-fix-training-new-tortch

Conversation

@izderadicka

Copy link
Copy Markdown

I have installed freshly from repo, and hit issues (exceptions), when I wanted to train model with new data (Czech language - from https://huggingface.co/datasets/Thomcles/Czech-Speech-Monospeaker-Honza, actually data are not good, had to do some cleanup, but anyhow it was learning exercise) . Problems I encountered:

  • Was not able to use existing checkpoints (jirka or cori) - first problem was with globals in model, second with extra model parameters, which pytorch is now checking.
  • Second problem was with export - again parsing some extra arguments and also with dynamo as default now.

Below are fixes, which I've done with help of Claude Code, as I'm not an expert in pytorch. These helped me to train model to first checkpoint and export checkpoint to onnx and test onnx (quality was poor, but that I expect having only one epoch of training). I was testing on my notebook without NVidia card - just to test the process. So I cannot guarantee that my fixes works flawlessly - when exporting module got some warnings like:

/home/ivan/workspace/piper/piper1-gpl/src/piper/train/vits/transforms.py:174: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  assert (discriminant >= 0).all(), discriminant
/home/ivan/workspace/piper/.venv/lib/python3.12/site-packages/torch/onnx/_internal/torchscript_exporter/jit_utils.py:308: UserWarning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied. (Triggered internally at /pytorch/torch/csrc/jit/passes/onnx/constant_fold.cpp:178.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant