Skip to content

Derive compatible compute type in the case of CPU use #383

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

Merged
merged 3 commits into from
Mar 3, 2025
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" CLAP Model
"""CLAP Model

Adapted from CLIP: https://github.com/openai/CLIP. Originally MIT License, Copyright (c) 2021 OpenAI.
Adapted to the Audio Task.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" OpenAI pretrained model functions
"""OpenAI pretrained model functions

Adapted from https://github.com/openai/CLIP. Originally MIT License, Copyright (c) 2021 OpenAI.
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" timm model adapter
"""timm model adapter

Wraps timm (https://github.com/rwightman/pytorch-image-models) models for use as a vision tower in CLIP model.
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" CLIP tokenizer
"""CLIP tokenizer

Copied from https://github.com/openai/CLIP. Originally MIT License, Copyright (c) 2021 OpenAI.
"""
Expand Down
2 changes: 1 addition & 1 deletion models/tts/debatts/utils/g2p/english.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" from https://github.com/keithito/tacotron """
"""from https://github.com/keithito/tacotron"""

import re
from unidecode import unidecode
Expand Down
2 changes: 1 addition & 1 deletion models/tts/valle_v2/modeling_llama.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
""" PyTorch LLaMA model."""
"""PyTorch LLaMA model."""
import math
from typing import List, Optional, Tuple, Union

Expand Down
3 changes: 3 additions & 0 deletions preprocessors/Emilia/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,9 @@ def main_process(audio_path, save_path=None, audio_name=None):
logger.info("Using CPU")
device_name = "cpu"
device = torch.device(device_name)
# whisperX expects compute type: int8
logger.info("Overriding the compute type to int8")
args.compute_type = "int8"

check_env(logger)

Expand Down
2 changes: 1 addition & 1 deletion processors/audio_features_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
1. Acoustic features such as Mel Spectrogram, F0, Energy, etc.
2. Content features such as phonetic posteriorgrams (PPG) and bottleneck features (BNF) from pretrained models

Note:
Note:
All the features extraction are designed to utilize GPU to the maximum extent, which can ease the on-the-fly extraction for large-scale dataset.

"""
Expand Down
2 changes: 1 addition & 1 deletion processors/descriptive_text_features_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
The common descriptive text features include:
1. Global semantic guidance features that extracted some pretrained text models like T5. It can be adopted to TTA, TTM, etc.

Note:
Note:
All the features extraction are designed to utilize GPU to the maximum extent, which can ease the on-the-fly extraction for large-scale dataset.

"""
2 changes: 1 addition & 1 deletion processors/text_features_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
The common text features include:
1. phone features that are used for TTS, SVS, etc.

Note:
Note:
All the features extraction are designed to utilize GPU to the maximum extent, which can ease the on-the-fly extraction for large-scale dataset.

"""
2 changes: 1 addition & 1 deletion text/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

""" This code is modified from https://github.com/keithito/tacotron """
"""This code is modified from https://github.com/keithito/tacotron"""
import re
from text import cleaners
from text.symbols import symbols
Expand Down
2 changes: 1 addition & 1 deletion text/cleaners.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

""" This code is modified from https://github.com/keithito/tacotron """
"""This code is modified from https://github.com/keithito/tacotron"""

"""
Cleaners are transformations that run over the input text at both training and eval time.
Expand Down
2 changes: 1 addition & 1 deletion text/cmudict.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

""" This code is modified from https://github.com/keithito/tacotron """
"""This code is modified from https://github.com/keithito/tacotron"""

import re

Expand Down
2 changes: 1 addition & 1 deletion text/numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

""" This code is modified from https://github.com/keithito/tacotron """
"""This code is modified from https://github.com/keithito/tacotron"""

import inflect
import re
Expand Down
2 changes: 1 addition & 1 deletion text/symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

""" This code is modified from https://github.com/keithito/tacotron """
"""This code is modified from https://github.com/keithito/tacotron"""

"""
Defines the set of symbols used in text input to the model.
Expand Down
2 changes: 1 addition & 1 deletion utils/cut_by_vad.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

""" This code is modified from https://github.com/facebookresearch/libri-light/blob/main/data_preparation/cut_by_vad.py"""
"""This code is modified from https://github.com/facebookresearch/libri-light/blob/main/data_preparation/cut_by_vad.py"""
import pathlib
import soundfile as sf
import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion utils/mfa_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

""" This code is modified from https://montreal-forced-aligner.readthedocs.io/en/latest/user_guide/performance.html"""
"""This code is modified from https://montreal-forced-aligner.readthedocs.io/en/latest/user_guide/performance.html"""

import os
import subprocess
Expand Down