Comments (9)
@vitaly-zdanevich Yes you can. I would recommend opening up the repo in a decent IDE and using the search and replace functionality across all files:
".cuda()" replaced with an empty string ""
You should be able to run everything on CPU after that small change.
from wavernn.
Removed ".cuda()" with find . -type f -exec sed -i 's/.cuda()//g' {} +
(you can check before and after with grep -r ".cuda()" .
), but looks like this is not enough:
$ python3 quick_start.py
Initialising WaveRNN Model...
Trainable Parameters: 4.481M
Loading Weights: "quick_start/voc_weights/latest_weights.pyt"
Traceback (most recent call last):
File "quick_start.py", line 62, in <module>
voc_model.restore('quick_start/voc_weights/latest_weights.pyt')
File "/home/vitaly_zdanevich/WaveRNN/models/fatchord_wavernn.py", line 375, in restore
self.load(path)
File "/home/vitaly_zdanevich/WaveRNN/models/fatchord_wavernn.py", line 378, in load
self.load_state_dict(torch.load(path), strict=False)
File "/home/vitaly_zdanevich/.local/lib/python3.6/site-packages/torch/serialization.py", line 368, in load
return _load(f, map_location, pickle_module)
File "/home/vitaly_zdanevich/.local/lib/python3.6/site-packages/torch/serialization.py", line 542, in _load
result = unpickler.load()
File "/home/vitaly_zdanevich/.local/lib/python3.6/site-packages/torch/serialization.py", line 505, in persistent_load
data_type(size), location)
File "/home/vitaly_zdanevich/.local/lib/python3.6/site-packages/torch/serialization.py", line 114, in default_restore_location
result = fn(storage, location)
File "/home/vitaly_zdanevich/.local/lib/python3.6/site-packages/torch/serialization.py", line 95, in _cuda_deserialize
device = validate_cuda_device(location)
File "/home/vitaly_zdanevich/.local/lib/python3.6/site-packages/torch/serialization.py", line 79, in validate_cuda_device
raise RuntimeError('Attempting to deserialize object on a CUDA '
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location='cpu' to map your storages to the CPU.
from wavernn.
Ok I edited models/fatchord_wavernn.py
at line 378 and models/tacotron.py
at 411 (was: torch.load(path)
, now: torch.load(path, map_location='cpu')
).
from wavernn.
Without CUDA speech synthesis is slow, I will try to use a machine with CUDA. Just asking - no way to increase rendering speed? Maybe it is possible to decrease a quality somehow?
from wavernn.
I want some TTS on AWS Lambda, but this technology does not support CUDA.
from wavernn.
Tried on CUDA, yes it much faster, but I see that from 8 CPU cores only one is busy, just saying.
from wavernn.
Tried instance on Google Cloud with 4 GPUs with CUDA - looks like the same performance. @fatchord is it correct that only one GPU is used anyway?
time python3 quick_start.py -u --input_text "What will happen if I run this command?"
/home/vitaly_zdanevich/.local/lib/python3.6/site-packages/numba/errors.py:105: UserWarning: Insufficiently recent colorama version found. Numba requires colorama >= 0.3.9
warnings.warn(msg)
Initialising WaveRNN Model...
Trainable Parameters: 4.481M
Loading Weights: "quick_start/voc_weights/latest_weights.pyt"
Initialising Tacotron Model...
Trainable Parameters: 11.078M
Loading Weights: "quick_start/tts_weights/latest_weights.pyt"
+---------+---------------+-----------------+----------------+-----------------+
| WaveRNN | Tacotron(r=1) | Generation Mode | Target Samples | Overlap Samples |
+---------+---------------+-----------------+----------------+-----------------+
| 804k | 196k | Unbatched | N/A | N/A |
+---------+---------------+-----------------+----------------+-----------------+
| Generating 1/1
| ████████████████ 54400/54450 | Batch Size: 1 | Gen Rate: 1kHz |
Done.
real 0m53.960s
user 0m43.638s
sys 0m10.492s
from wavernn.
@fatchord maybe it is possible to use GPUs and multiple CPU cores?
from wavernn.
Switching between single GPU and cpu training has been added as of #107
from wavernn.
Related Issues (20)
- Slow tacotron training 1step/sec on AWS p3.2xlarge (Tesla V100) HOT 1
- Using wavernn pretrained model, loss stuck at 5.6
- Can I use pretrained models with different hparams settings?
- sentence long problem
- Train WaveRnn AttributeError HOT 5
- ValueError - gen_tacotron.py HOT 1
- Error During Computing Consensus Step HOT 1
- adding support for windows sapi5
- why do you minus 2 in preprocessing ?
- AttributeError: module 'librosa' has no attribute 'output' HOT 4
- data\\dataset.pkl isssue HOT 1
- [feature request] dynamic batch size during WaveRNN training depending on free/total GPU memory
- Tacotron to Onnx HOT 1
- Where is the audio file for which itis generating the text? HOT 2
- (Solved, but can be useful to someone) Problems getting the project working for the first time
- spectrogram (image_-to-wav HOT 1
- Help
- Is it possible to generate music using WaveRNN?
- ModuleNotFoundError: No module named 'numba.decorators' When Running quick_start.py HOT 2
- Failed to build wheel for llvmlite
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wavernn.