Skip to content

Commit

Permalink
Revert "Merge pull request neonbjb#3 from osanseviero/main"
Browse files Browse the repository at this point in the history
This reverts commit 1a41f7f, reversing
changes made to cf7a4bc.
  • Loading branch information
neonbjb committed Apr 27, 2022
1 parent cfbeb2d commit 05e06de
Show file tree
Hide file tree
Showing 33 changed files with 22 additions and 53 deletions.
20 changes: 10 additions & 10 deletions tortoise_tts/api.py → api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
import progressbar
import torchaudio

from tortoise_tts.models.classifier import AudioMiniEncoderWithClassifierHead
from tortoise_tts.models.cvvp import CVVP
from tortoise_tts.models.diffusion_decoder import DiffusionTts
from tortoise_tts.models.autoregressive import UnifiedVoice
from models.classifier import AudioMiniEncoderWithClassifierHead
from models.cvvp import CVVP
from models.diffusion_decoder import DiffusionTts
from models.autoregressive import UnifiedVoice
from tqdm import tqdm

from tortoise_tts.models.arch_util import TorchMelSpectrogram
from tortoise_tts.models.clvp import CLVP
from tortoise_tts.models.vocoder import UnivNetGenerator
from tortoise_tts.utils.audio import load_audio, wav_to_univnet_mel, denormalize_tacotron_mel
from tortoise_tts.utils.diffusion import SpacedDiffusion, space_timesteps, get_named_beta_schedule
from tortoise_tts.utils.tokenizer import VoiceBpeTokenizer, lev_distance
from models.arch_util import TorchMelSpectrogram
from models.clvp import CLVP
from models.vocoder import UnivNetGenerator
from utils.audio import load_audio, wav_to_univnet_mel, denormalize_tacotron_mel
from utils.diffusion import SpacedDiffusion, space_timesteps, get_named_beta_schedule
from utils.tokenizer import VoiceBpeTokenizer, lev_distance


pbar = None
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tortoise_tts/models/arch_util.py → models/arch_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import torch.nn as nn
import torch.nn.functional as F
import torchaudio
from tortoise_tts.models.xtransformers import ContinuousTransformerWrapper, RelativePositionBias
from models.xtransformers import ContinuousTransformerWrapper, RelativePositionBias


def zero_module(module):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from transformers import GPT2Config, GPT2PreTrainedModel, LogitsProcessorList
from transformers.modeling_outputs import CausalLMOutputWithCrossAttentions
from transformers.utils.model_parallel_utils import get_device_map, assert_device_map
from tortoise_tts.models.arch_util import AttentionBlock
from tortoise_tts.utils.typical_sampling import TypicalLogitsWarper
from models.arch_util import AttentionBlock
from utils.typical_sampling import TypicalLogitsWarper


def null_position_embeddings(range, dim):
Expand Down
2 changes: 1 addition & 1 deletion tortoise_tts/models/classifier.py → models/classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch.nn.functional as F
from torch.utils.checkpoint import checkpoint

from tortoise_tts.models.arch_util import Upsample, Downsample, normalization, zero_module, AttentionBlock
from models.arch_util import Upsample, Downsample, normalization, zero_module, AttentionBlock


class ResBlock(nn.Module):
Expand Down
6 changes: 3 additions & 3 deletions tortoise_tts/models/clvp.py → models/clvp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import torch.nn.functional as F
from torch import einsum

from tortoise_tts.models.arch_util import CheckpointedXTransformerEncoder
from tortoise_tts.models.transformer import Transformer
from tortoise_tts.models.xtransformers import Encoder
from models.arch_util import CheckpointedXTransformerEncoder
from models.transformer import Transformer
from models.xtransformers import Encoder


def exists(val):
Expand Down
4 changes: 2 additions & 2 deletions tortoise_tts/models/cvvp.py → models/cvvp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from torch import einsum
from torch.utils.checkpoint import checkpoint

from tortoise_tts.models.arch_util import AttentionBlock
from tortoise_tts.models.xtransformers import ContinuousTransformerWrapper, Encoder
from models.arch_util import AttentionBlock
from models.xtransformers import ContinuousTransformerWrapper, Encoder


def exists(val):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import torch.nn.functional as F
from torch import autocast

from tortoise_tts.models.arch_util import normalization, AttentionBlock
from models.arch_util import normalization, AttentionBlock


def is_latent(t):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 1 addition & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ inflect
progressbar
einops
unidecode
entmax
scipy
librosa
entmax
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 0 additions & 21 deletions setup.py

This file was deleted.

File renamed without changes.
1 change: 0 additions & 1 deletion tortoise_tts/__init__.py

This file was deleted.

Empty file removed tortoise_tts/models/__init__.py
Empty file.
Empty file removed tortoise_tts/results/__init__.py
Empty file.
4 changes: 0 additions & 4 deletions tortoise_tts/utils/__init__.py

This file was deleted.

Empty file removed tortoise_tts/voices/__init__.py
Empty file.
File renamed without changes.
2 changes: 1 addition & 1 deletion tortoise_tts/utils/audio.py → utils/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np
from scipy.io.wavfile import read

from tortoise_tts.utils.stft import STFT
from utils.stft import STFT


def load_wav_to_torch(full_path):
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions tortoise_tts/utils/tokenizer.py → utils/tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import inflect
import torch
from tokenizers import Tokenizer
from pathlib import Path


# Regular expression matching whitespace:
Expand Down Expand Up @@ -166,8 +165,6 @@ def lev_distance(s1, s2):

class VoiceBpeTokenizer:
def __init__(self, vocab_file='data/tokenizer.json'):
vocab_file = str(Path(__file__).parent.parent / Path(vocab_file))
print(vocab_file)
if vocab_file is not None:
self.tokenizer = Tokenizer.from_file(vocab_file)

Expand Down
File renamed without changes.

0 comments on commit 05e06de

Please sign in to comment.