Spaces:
Running
Running
Fixed indentation error
Browse files- Dockerfile +12 -12
- tortoise/models/utils.py +7 -7
Dockerfile
CHANGED
@@ -16,22 +16,22 @@ RUN pip install --trusted-host pypi.python.org -r requirements.txt && \
|
|
16 |
EXPOSE 80
|
17 |
|
18 |
# Set the TORTOISE_MODELS_DIR environment variable
|
19 |
-
ENV TORTOISE_MODELS_DIR tortoise/models/pretrained_models
|
20 |
|
21 |
# Create the directory for pretrained models
|
22 |
-
RUN mkdir -p $TORTOISE_MODELS_DIR
|
23 |
|
24 |
# Download all the models
|
25 |
-
RUN wget -O $TORTOISE_MODELS_DIR/autoregressive.pth https://huggingface.co/jbetker/tortoise-tts-v2/resolve/main/.models/autoregressive.pth && \
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
|
36 |
RUN ls -la /app
|
37 |
|
|
|
16 |
EXPOSE 80
|
17 |
|
18 |
# Set the TORTOISE_MODELS_DIR environment variable
|
19 |
+
# ENV TORTOISE_MODELS_DIR tortoise/models/pretrained_models
|
20 |
|
21 |
# Create the directory for pretrained models
|
22 |
+
# RUN mkdir -p $TORTOISE_MODELS_DIR
|
23 |
|
24 |
# Download all the models
|
25 |
+
# RUN wget -O $TORTOISE_MODELS_DIR/autoregressive.pth https://huggingface.co/jbetker/tortoise-tts-v2/resolve/main/.models/autoregressive.pth && \
|
26 |
+
# wget -O $TORTOISE_MODELS_DIR/classifier.pth https://huggingface.co/jbetker/tortoise-tts-v2/resolve/main/.models/classifier.pth && \
|
27 |
+
# wget -O $TORTOISE_MODELS_DIR/clvp2.pth https://huggingface.co/jbetker/tortoise-tts-v2/resolve/main/.models/clvp2.pth && \
|
28 |
+
# wget -O $TORTOISE_MODELS_DIR/cvvp.pth https://huggingface.co/jbetker/tortoise-tts-v2/resolve/main/.models/cvvp.pth && \
|
29 |
+
# wget -O $TORTOISE_MODELS_DIR/diffusion_decoder.pth https://huggingface.co/jbetker/tortoise-tts-v2/resolve/main/.models/diffusion_decoder.pth && \
|
30 |
+
# wget -O $TORTOISE_MODELS_DIR/vocoder.pth https://huggingface.co/jbetker/tortoise-tts-v2/resolve/main/.models/vocoder.pth && \
|
31 |
+
# wget -O $TORTOISE_MODELS_DIR/rlg_auto.pth https://huggingface.co/jbetker/tortoise-tts-v2/resolve/main/.models/rlg_auto.pth && \
|
32 |
+
# wget -O $TORTOISE_MODELS_DIR/rlg_diffuser.pth https://huggingface.co/jbetker/tortoise-tts-v2/resolve/main/.models/rlg_diffuser.pth && \
|
33 |
+
# wget -O $TORTOISE_MODELS_DIR/bigvgan_base_24khz_100band_g.pth https://drive.google.com/uc?id=1_cKskUDuvxQJUEBwdgjAxKuDTUW6kPdY && \
|
34 |
+
# wget -O $TORTOISE_MODELS_DIR/bigvgan_24khz_100band_g.pth https://drive.google.com/uc?id=1wmP_mAs7d00KHVfVEl8B5Gb72Kzpcavp
|
35 |
|
36 |
RUN ls -la /app
|
37 |
|
tortoise/models/utils.py
CHANGED
@@ -11,12 +11,12 @@ import progressbar
|
|
11 |
|
12 |
D_STEM = "https://drive.google.com/uc?id="
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
|
19 |
-
MODELS_DIR = os.environ.get("TORTOISE_MODELS_DIR")
|
20 |
MODELS = {
|
21 |
"autoregressive.pth": "https://huggingface.co/jbetker/tortoise-tts-v2/resolve/main/.models/autoregressive.pth",
|
22 |
"classifier.pth": "https://huggingface.co/jbetker/tortoise-tts-v2/resolve/main/.models/classifier.pth",
|
@@ -77,5 +77,5 @@ def get_model_path(model_name, models_dir=MODELS_DIR):
|
|
77 |
download_models([model_name])
|
78 |
return model_path
|
79 |
|
80 |
-
|
81 |
-
|
|
|
11 |
|
12 |
D_STEM = "https://drive.google.com/uc?id="
|
13 |
|
14 |
+
DEFAULT_MODELS_DIR = os.path.join(
|
15 |
+
os.path.expanduser("~"), ".cache", "tortoise", "models"
|
16 |
+
)
|
17 |
+
MODELS_DIR = os.environ.get("TORTOISE_MODELS_DIR", DEFAULT_MODELS_DIR)
|
18 |
|
19 |
+
# MODELS_DIR = os.environ.get("TORTOISE_MODELS_DIR")
|
20 |
MODELS = {
|
21 |
"autoregressive.pth": "https://huggingface.co/jbetker/tortoise-tts-v2/resolve/main/.models/autoregressive.pth",
|
22 |
"classifier.pth": "https://huggingface.co/jbetker/tortoise-tts-v2/resolve/main/.models/classifier.pth",
|
|
|
77 |
download_models([model_name])
|
78 |
return model_path
|
79 |
|
80 |
+
if __name__ == "__main__":
|
81 |
+
download_models() # to download all models
|