Skip to content

Commit

Permalink
fix(examples): wrong cmd import order
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Aug 24, 2024
1 parent 81e3488 commit 71c3491
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ChatTTS/model/velocity/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

from tqdm import tqdm
from transformers import PreTrainedTokenizer, PreTrainedTokenizerFast
from vllm.utils import Counter

from .configs import EngineArgs
from .llm_engine import LLMEngine
from .output import RequestOutput
from .sampling_params import SamplingParams
from vllm.utils import Counter


class LLM:
Expand Down
1 change: 1 addition & 0 deletions ChatTTS/model/velocity/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from vllm.model_executor.parallel_utils.parallel_state import initialize_model_parallel
from vllm.sequence import SamplerOutput, SequenceGroupMetadata
from vllm.worker.cache_engine import CacheEngine

from .model_runner import ModelRunner


Expand Down
17 changes: 9 additions & 8 deletions examples/cmd/run.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import os, sys

if sys.platform == "darwin":
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"

now_dir = os.getcwd()
sys.path.append(now_dir)

from typing import Optional, List
import argparse
import os
import sys

import numpy as np

import ChatTTS

from tools.logger import get_logger
from tools.audio import pcm_arr_to_mp3_view
from tools.normalizer.en import normalizer_en_nemo_text
from tools.normalizer.zh import normalizer_zh_tn

if sys.platform == "darwin":
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"

now_dir = os.getcwd()
sys.path.append(now_dir)

logger = get_logger("Command")


Expand Down
1 change: 0 additions & 1 deletion examples/web/funcs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
import random
from typing import Optional
from time import sleep
Expand Down

0 comments on commit 71c3491

Please sign in to comment.