File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change
1
+ import os , sys
2
+
3
+ if sys .platform == "darwin" :
4
+ os .environ ["PYTORCH_ENABLE_MPS_FALLBACK" ] = "1"
5
+
6
+ now_dir = os .getcwd ()
7
+ sys .path .append (now_dir )
8
+
1
9
from dataclasses import asdict
2
10
import argparse
3
- import os
4
11
import torch
5
12
from tqdm import tqdm
6
13
from ChatTTS .model .dvae import DVAE
7
14
from ChatTTS .config import Config
8
15
from vocos import Vocos
9
16
from vocos .pretrained import instantiate_class
10
17
import torch .jit as jit
11
- from examples .onnx .gpt import GPT
18
+
19
+ from gpt import GPT
12
20
13
21
# disable cuda
14
22
torch .cuda .is_available = lambda : False
Original file line number Diff line number Diff line change 4
4
import torch
5
5
import torch .nn as nn
6
6
from torch .nn .utils .parametrizations import weight_norm
7
- from .modeling_llama import LlamaModel , LlamaConfig
7
+
8
+ from modeling_llama import LlamaModel , LlamaConfig
8
9
9
10
10
11
class GPT (nn .Module ):
Original file line number Diff line number Diff line change 10
10
11
11
import gradio as gr
12
12
13
- from examples . web . funcs import *
14
- from examples . web . ex import ex
13
+ from funcs import *
14
+ from ex import ex
15
15
16
16
17
17
def main ():
You can’t perform that action at this time.
0 commit comments