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

add FLAGS_allocator_strategy=naive_best_fit when synthesize #197

Merged
merged 1 commit into from
Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/GANVocoder/parallelwave_gan/baker/synthesize.sh
Original file line number Diff line number Diff line change
@@ -1,5 1,6 @@
#!/bin/bash

FLAGS_allocator_strategy=naive_best_fit \
FLAGS_fraction_of_gpu_memory_to_use=0.01 \
python3 ../synthesize.py \
--config=conf/default.yaml \
--checkpoint=exp/default/checkpoints/snapshot_iter_400000.pdz\
Expand Down
3 changes: 2 additions & 1 deletion examples/GANVocoder/parallelwave_gan/ljspeech/synthesize.sh
Original file line number Diff line number Diff line change
@@ -1,5 1,6 @@
#!/bin/bash

FLAGS_allocator_strategy=naive_best_fit \
FLAGS_fraction_of_gpu_memory_to_use=0.01 \
python3 ../synthesize.py \
--config=conf/default.yaml \
--checkpoint=exp/default/checkpoints/snapshot_iter_400000.pdz\
Expand Down
3 changes: 2 additions & 1 deletion examples/fastspeech2/aishell3/synthesize.sh
Original file line number Diff line number Diff line change
@@ -1,5 1,6 @@
#!/bin/bash

FLAGS_allocator_strategy=naive_best_fit \
FLAGS_fraction_of_gpu_memory_to_use=0.01 \
python3 ../synthesize.py \
--fastspeech2-config=conf/default.yaml \
--fastspeech2-checkpoint=exp/default/checkpoints/snapshot_iter_96400.pdz \
Expand Down
3 changes: 2 additions & 1 deletion examples/fastspeech2/aishell3/synthesize_e2e.sh
Original file line number Diff line number Diff line change
@@ -1,5 1,6 @@
#!/bin/bash

FLAGS_allocator_strategy=naive_best_fit \
FLAGS_fraction_of_gpu_memory_to_use=0.01 \
python3 synthesize_e2e.py \
--fastspeech2-config=conf/default.yaml \
--fastspeech2-checkpoint=exp/default/checkpoints/snapshot_iter_96400.pdz \
Expand Down
4 changes: 2 additions & 2 deletions examples/fastspeech2/baker/synthesize.sh
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@

#!/bin/bash

FLAGS_allocator_strategy=naive_best_fit \
FLAGS_fraction_of_gpu_memory_to_use=0.01 \
python3 ../synthesize.py \
--fastspeech2-config=conf/default.yaml \
--fastspeech2-checkpoint=exp/default/checkpoints/snapshot_iter_76000.pdz \
Expand Down
3 changes: 2 additions & 1 deletion examples/fastspeech2/baker/synthesize_e2e.sh
Original file line number Diff line number Diff line change
@@ -1,5 1,6 @@
#!/bin/bash

FLAGS_allocator_strategy=naive_best_fit \
FLAGS_fraction_of_gpu_memory_to_use=0.01 \
python3 synthesize_e2e.py \
--fastspeech2-config=conf/default.yaml \
--fastspeech2-checkpoint=exp/default/checkpoints/snapshot_iter_153.pdz \
Expand Down
3 changes: 2 additions & 1 deletion examples/fastspeech2/ljspeech/synthesize.sh
Original file line number Diff line number Diff line change
@@ -1,6 1,7 @@

#!/bin/bash

FLAGS_allocator_strategy=naive_best_fit \
FLAGS_fraction_of_gpu_memory_to_use=0.01 \
python3 ../synthesize.py \
--fastspeech2-config=conf/default.yaml \
--fastspeech2-checkpoint=exp/default/checkpoints/snapshot_iter_100000.pdz \
Expand Down
3 changes: 2 additions & 1 deletion examples/fastspeech2/ljspeech/synthesize_e2e.sh
Original file line number Diff line number Diff line change
@@ -1,6 1,7 @@

#!/bin/bash

FLAGS_allocator_strategy=naive_best_fit \
FLAGS_fraction_of_gpu_memory_to_use=0.01 \
python3 synthesize_e2e.py \
--fastspeech2-config=conf/default.yaml \
--fastspeech2-checkpoint=exp/default/checkpoints/snapshot_iter_100000.pdz \
Expand Down
2 changes: 2 additions & 0 deletions examples/speedyspeech/baker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 208,8 @@ optional arguments:

You can use the following scripts to synthesize for `../sentences.txt` using pretrained speedyspeech and parallel wavegan models.
```bash
FLAGS_allocator_strategy=naive_best_fit \
FLAGS_fraction_of_gpu_memory_to_use=0.01 \
python3 synthesize_e2e.py \
--speedyspeech-config=speedyspeech_nosil_baker_ckpt_0.5/default.yaml \
--speedyspeech-checkpoint=speedyspeech_nosil_baker_ckpt_0.5/snapshot_iter_11400.pdz \
Expand Down
3 changes: 2 additions & 1 deletion examples/speedyspeech/baker/synthesize.sh
Original file line number Diff line number Diff line change
@@ -1,5 1,6 @@
#!/bin/bash

FLAGS_allocator_strategy=naive_best_fit \
FLAGS_fraction_of_gpu_memory_to_use=0.01 \
python3 ../synthesize.py \
--speedyspeech-config=conf/default.yaml \
--speedyspeech-checkpoint=exp/default/checkpoints/snapshot_iter_11400.pdz \
Expand Down
3 changes: 2 additions & 1 deletion examples/speedyspeech/baker/synthesize_e2e.sh
Original file line number Diff line number Diff line change
@@ -1,5 1,6 @@
#!/bin/bash

FLAGS_allocator_strategy=naive_best_fit \
FLAGS_fraction_of_gpu_memory_to_use=0.01 \
python synthesize_e2e.py \
--speedyspeech-config=conf/default.yaml \
--speedyspeech-checkpoint=exp/default/checkpoints/snapshot_iter_11400.pdz \
Expand Down
3 changes: 2 additions & 1 deletion examples/transformer_tts/ljspeech/synthesize_e2e.sh
Original file line number Diff line number Diff line change
@@ -1,5 1,6 @@
#!/bin/bash

FLAGS_allocator_strategy=naive_best_fit \
FLAGS_fraction_of_gpu_memory_to_use=0.01 \
python3 synthesize_e2e.py \
--transformer-tts-config=conf/default.yaml \
--transformer-tts-checkpoint=exp/default/checkpoints/snapshot_iter_201500.pdz \
Expand Down
3 changes: 0 additions & 3 deletions parakeet/models/parallel_wavegan/parallel_wavegan.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 465,6 @@ def forward(self, x, c):
skips = 0
for f in self.conv_layers:
x, s = f(x, c)
# Add depency with x to avoid lanching op too fast that leads
# to GPU memory reach too high value (ugly trick here)
c = paddle.mean(x - x)
skips = s
skips *= math.sqrt(1.0 / len(self.conv_layers))

Expand Down