From fdc76535e62264c2abd8f81ad85cde2e6119e6b3 Mon Sep 17 00:00:00 2001
From: XXXXRT666 <157766680+XXXXRT666@users.noreply.github.com>
Date: Tue, 17 Jun 2025 03:15:44 +0800
Subject: [PATCH] Update README, Support Dark Mode in CSS/JS
---
README.md | 15 ++++++---
docs/cn/README.md | 15 +++++----
docs/ja/README.md | 17 ++++++----
docs/ko/README.md | 17 ++++++----
docs/tr/README.md | 15 +++++----
tools/assets.py | 84 ++++++++++++-----------------------------------
6 files changed, 71 insertions(+), 92 deletions(-)
diff --git a/README.md b/README.md
index 2afaf1ce..978bb3ca 100644
--- a/README.md
+++ b/README.md
@@ -9,10 +9,14 @@ A Powerful Few-shot Voice Conversion and Text-to-Speech WebUI.
-[](https://colab.research.google.com/github/RVC-Boss/GPT-SoVITS/blob/main/Colab-WebUI.ipynb)
-[](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/LICENSE)
-[](https://huggingface.co/spaces/lj1995/GPT-SoVITS-v2)
-[](https://discord.gg/dnrgs5GHfG)
+[](https://colab.research.google.com/github/RVC-Boss/GPT-SoVITS/blob/main/Colab-WebUI.ipynb)
+[](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/LICENSE)
+[](https://huggingface.co/spaces/lj1995/GPT-SoVITS-v2)
+[](https://hub.docker.com/r/xxxxrt666/gpt-sovits)
+
+[](https://www.yuque.com/baicaigongchang1145haoyuangong/ib3g1e)
+[](https://rentry.co/GPT-SoVITS-guide#/)
+[](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/docs/en/Changelog_EN.md)
**English** | [**中文简体**](./docs/cn/README.md) | [**日本語**](./docs/ja/README.md) | [**한국어**](./docs/ko/README.md) | [**Türkçe**](./docs/tr/README.md)
@@ -128,8 +132,9 @@ Due to rapid development in the codebase and a slower Docker image release cycle
- Check [Docker Hub](https://hub.docker.com/r/xxxxrt666/gpt-sovits) for the latest available image tags
- Choose an appropriate image tag for your environment
-- `Lite` means the Docker image does not include ASR models and UVR5 models. You can manually download the UVR5 models, while the program will automatically download the ASR models as needed
+- `Lite` means the Docker image **does not include** ASR models and UVR5 models. You can manually download the UVR5 models, while the program will automatically download the ASR models as needed
- The appropriate architecture image (amd64/arm64) will be automatically pulled during Docker Compose
+- Docker Compose will mount **all files** in the current directory. Please switch to the project root directory and **pull the latest code** before using the Docker image
- Optionally, build the image locally using the provided Dockerfile for the most up-to-date changes
#### Environment Variables
diff --git a/docs/cn/README.md b/docs/cn/README.md
index 2f4be4ae..70ce4285 100644
--- a/docs/cn/README.md
+++ b/docs/cn/README.md
@@ -7,12 +7,14 @@
-
+[](https://colab.research.google.com/github/RVC-Boss/GPT-SoVITS/blob/main/Colab-WebUI.ipynb)
+[](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/LICENSE)
+[](https://huggingface.co/spaces/lj1995/GPT-SoVITS-v2)
+[](https://hub.docker.com/r/xxxxrt666/gpt-sovits)
-[](https://colab.research.google.com/github/RVC-Boss/GPT-SoVITS/blob/main/Colab-WebUI.ipynb)
-[](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/LICENSE)
-[](https://huggingface.co/spaces/lj1995/GPT-SoVITS-v2)
-[](https://discord.gg/dnrgs5GHfG)
+[](https://www.yuque.com/baicaigongchang1145haoyuangong/ib3g1e)
+[](https://rentry.co/GPT-SoVITS-guide#/)
+[](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/docs/cn/Changelog_CN.md)
[**English**](../../README.md) | **中文简体** | [**日本語**](../ja/README.md) | [**한국어**](../ko/README.md) | [**Türkçe**](../tr/README.md)
@@ -128,8 +130,9 @@ brew install ffmpeg
- 前往 [Docker Hub](https://hub.docker.com/r/xxxxrt666/gpt-sovits) 查看最新可用的镜像标签(tags)
- 根据你的运行环境选择合适的镜像标签
-- `Lite` Docker 镜像不包含 ASR 模型和 UVR5 模型. 你可以自行下载 UVR5 模型, ASR 模型则会在需要时由程序自动下载
+- `Lite` Docker 镜像**不包含** ASR 模型和 UVR5 模型. 你可以自行下载 UVR5 模型, ASR 模型则会在需要时由程序自动下载
- 在使用 Docker Compose 时, 会自动拉取适配的架构镜像 (amd64 或 arm64)
+- Docker Compose 将会挂载当前目录的**所有文件**, 请在使用 Docker 镜像前先切换到项目根目录并**拉取代码更新**
- 可选:为了获得最新的更改, 你可以使用提供的 Dockerfile 在本地构建镜像
#### 环境变量
diff --git a/docs/ja/README.md b/docs/ja/README.md
index 4e965efb..c3c42cd8 100644
--- a/docs/ja/README.md
+++ b/docs/ja/README.md
@@ -5,12 +5,16 @@
[](https://github.com/RVC-Boss/GPT-SoVITS)
-
+
-[](https://colab.research.google.com/github/RVC-Boss/GPT-SoVITS/blob/main/Colab-WebUI.ipynb)
-[](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/LICENSE)
-[](https://huggingface.co/spaces/lj1995/GPT-SoVITS-v2)
-[](https://discord.gg/dnrgs5GHfG)
+[](https://colab.research.google.com/github/RVC-Boss/GPT-SoVITS/blob/main/Colab-WebUI.ipynb)
+[](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/LICENSE)
+[](https://huggingface.co/spaces/lj1995/GPT-SoVITS-v2)
+[](https://hub.docker.com/r/xxxxrt666/gpt-sovits)
+
+[](https://www.yuque.com/baicaigongchang1145haoyuangong/ib3g1e)
+[](https://rentry.co/GPT-SoVITS-guide#/)
+[](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/docs/ja/Changelog_JA.md)
[**English**](../../README.md) | [**中文简体**](../cn/README.md) | **日本語** | [**한국어**](../ko/README.md) | [**Türkçe**](../tr/README.md)
@@ -122,8 +126,9 @@ brew install ffmpeg
- [Docker Hub](https://hub.docker.com/r/xxxxrt666/gpt-sovits) で最新のイメージタグを確認してください
- 環境に合った適切なイメージタグを選択してください
-- `Lite` とは、Docker イメージに ASR モデルおよび UVR5 モデルが含まれていないことを意味します. UVR5 モデルは手動でダウンロードし、ASR モデルは必要に応じてプログラムが自動的にダウンロードします
+- `Lite` とは、Docker イメージに ASR モデルおよび UVR5 モデルが**含まれていない**ことを意味します. UVR5 モデルは手動でダウンロードし、ASR モデルは必要に応じてプログラムが自動的にダウンロードします
- Docker Compose 実行時に、対応するアーキテクチャ (amd64 または arm64) のイメージが自動的に取得されます
+- Docker Compose は現在のディレクトリ内の**すべてのファイル**をマウントします. Docker イメージを使用する前に、プロジェクトのルートディレクトリに移動し、**コードを最新の状態に更新**してください
- オプション:最新の変更を反映させるため、提供されている Dockerfile を使ってローカルでイメージをビルドすることも可能です
#### 環境変数
diff --git a/docs/ko/README.md b/docs/ko/README.md
index 88c36814..bfc70395 100644
--- a/docs/ko/README.md
+++ b/docs/ko/README.md
@@ -5,12 +5,16 @@
[](https://github.com/RVC-Boss/GPT-SoVITS)
-
+
-[](https://colab.research.google.com/github/RVC-Boss/GPT-SoVITS/blob/main/Colab-WebUI.ipynb)
-[](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/LICENSE)
-[](https://huggingface.co/spaces/lj1995/GPT-SoVITS-v2)
-[](https://discord.gg/dnrgs5GHfG)
+[](https://colab.research.google.com/github/RVC-Boss/GPT-SoVITS/blob/main/Colab-WebUI.ipynb)
+[](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/LICENSE)
+[](https://huggingface.co/spaces/lj1995/GPT-SoVITS-v2)
+[](https://hub.docker.com/r/xxxxrt666/gpt-sovits)
+
+[](https://www.yuque.com/baicaigongchang1145haoyuangong/ib3g1e)
+[](https://rentry.co/GPT-SoVITS-guide#/)
+[](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/docs/ko/Changelog_KO.md)
[**English**](../../README.md) | [**中文简体**](../cn/README.md) | [**日本語**](../ja/README.md) | **한국어** | [**Türkçe**](../tr/README.md)
@@ -122,8 +126,9 @@ brew install ffmpeg
- [Docker Hub](https://hub.docker.com/r/xxxxrt666/gpt-sovits)에서 최신 이미지 태그를 확인하세요
- 환경에 맞는 적절한 이미지 태그를 선택하세요
-- `Lite` 는 Docker 이미지에 ASR 모델과 UVR5 모델이 포함되어 있지 않음을 의미합니다. UVR5 모델은 사용자가 직접 다운로드해야 하며, ASR 모델은 필요 시 프로그램이 자동으로 다운로드합니다
+- `Lite` 는 Docker 이미지에 ASR 모델과 UVR5 모델이 **포함되어 있지 않음**을 의미합니다. UVR5 모델은 사용자가 직접 다운로드해야 하며, ASR 모델은 필요 시 프로그램이 자동으로 다운로드합니다
- Docker Compose 실행 시, 해당 아키텍처에 맞는 이미지(amd64 또는 arm64)가 자동으로 다운로드됩니다
+- Docker Compose는 현재 디렉터리의 **모든 파일**을 마운트합니다. Docker 이미지를 사용하기 전에 프로젝트 루트 디렉터리로 이동하여 코드를 **최신 상태로 업데이트**하세요
- 선택 사항: 최신 변경사항을 반영하려면 제공된 Dockerfile을 사용하여 로컬에서 직접 이미지를 빌드할 수 있습니다
#### 환경 변수
diff --git a/docs/tr/README.md b/docs/tr/README.md
index fb0b31a7..2ce02b60 100644
--- a/docs/tr/README.md
+++ b/docs/tr/README.md
@@ -7,12 +7,14 @@ Güçlü Birkaç Örnekli Ses Dönüştürme ve Metinden Konuşmaya Web Arayüz
-
+[](https://colab.research.google.com/github/RVC-Boss/GPT-SoVITS/blob/main/Colab-WebUI.ipynb)
+[](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/LICENSE)
+[](https://huggingface.co/spaces/lj1995/GPT-SoVITS-v2)
+[](https://hub.docker.com/r/xxxxrt666/gpt-sovits)
-[](https://colab.research.google.com/github/RVC-Boss/GPT-SoVITS/blob/main/Colab-WebUI.ipynb)
-[](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/LICENSE)
-[](https://huggingface.co/spaces/lj1995/GPT-SoVITS-v2)
-[](https://discord.gg/dnrgs5GHfG)
+[](https://www.yuque.com/baicaigongchang1145haoyuangong/ib3g1e)
+[](https://rentry.co/GPT-SoVITS-guide#/)
+[](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/docs/tr/Changelog_TR.md)
[**English**](../../README.md) | [**中文简体**](../cn/README.md) | [**日本語**](../ja/README.md) | [**한국어**](../ko/README.md) | **Türkçe**
@@ -124,8 +126,9 @@ Kod tabanı hızla geliştiği halde Docker imajları daha yavaş yayınlandığ
- En güncel kullanılabilir imaj etiketlerini görmek için [Docker Hub](https://hub.docker.com/r/xxxxrt666/gpt-sovits) adresini kontrol edin
- Ortamınıza uygun bir imaj etiketi seçin
-- `Lite`, Docker imajında ASR modelleri ve UVR5 modellerinin bulunmadığı anlamına gelir. UVR5 modellerini manuel olarak indirebilirsiniz; ASR modelleri ise gerektiğinde program tarafından otomatik olarak indirilir
+- `Lite`, Docker imajında ASR modelleri ve UVR5 modellerinin **bulunmadığı** anlamına gelir. UVR5 modellerini manuel olarak indirebilirsiniz; ASR modelleri ise gerektiğinde program tarafından otomatik olarak indirilir
- Docker Compose sırasında, uygun mimariye (amd64 veya arm64) ait imaj otomatik olarak indirilir
+- Docker Compose, mevcut dizindeki **tüm dosyaları** bağlayacaktır. Docker imajını kullanmadan önce lütfen proje kök dizinine geçin ve **en son kodu çekin**
- Opsiyonel: En güncel değişiklikleri almak için, sağlanan Dockerfile ile yerel olarak imajı kendiniz oluşturabilirsiniz
#### Ortam Değişkenleri
diff --git a/tools/assets.py b/tools/assets.py
index 6d727384..28d0f6b4 100644
--- a/tools/assets.py
+++ b/tools/assets.py
@@ -1,81 +1,38 @@
js = """
-function createGradioAnimation() {
+function deleteTheme() {
- const params = new URLSearchParams(window.location.search);
- if (params.get('__theme') !== 'light') {
- params.set('__theme', 'light'); // 仅当 __theme 不是 'light' 时设置为 'light'
- window.location.search = params.toString(); // 更新 URL,触发页面刷新
- }
-
- var container = document.createElement('div');
- container.id = 'gradio-animation';
- container.style.fontSize = '2em';
- container.style.fontWeight = '500';
- container.style.textAlign = 'center';
- container.style.marginBottom = '20px';
- container.style.fontFamily = '-apple-system, sans-serif, Arial, Calibri';
+const params = new URLSearchParams(window.location.search);
+if (params.has('__theme')) {
+ params.delete('__theme');
+ const newUrl = `${window.location.pathname}?${params.toString()}`;
+ window.location.replace(newUrl);
+}
- var text = 'Welcome to GPT-SoVITS !';
- for (var i = 0; i < text.length; i++) {
- (function(i){
- setTimeout(function(){
- var letter = document.createElement('span');
- letter.style.opacity = '0';
- letter.style.transition = 'opacity 0.5s';
- letter.innerText = text[i];
-
- container.appendChild(letter);
-
- setTimeout(function() {
- letter.style.opacity = '1';
- }, 50);
- }, i * 250);
- })(i);
- }
- return 'Animation created';
}
"""
-
css = """
/* CSSStyleRule */
-
.markdown {
- background-color: lightblue;
padding: 6px 10px;
}
-.checkbox_info {
- color: var(--block-title-text-color) !important;
- font-size: var(--block-title-text-size) !important;
- font-weight: var(--block-title-text-weight) !important;
- height: 22px;
- margin-bottom: 8px !important;
+@media (prefers-color-scheme: light) {
+ .markdown {
+ background-color: lightblue;
+ color: #000;
+ }
+}
+
+@media (prefers-color-scheme: dark) {
+ .markdown {
+ background-color: #4b4b4b;
+ color: rgb(244, 244, 245);
+ }
}
::selection {
- background: #ffc078; !important;
-}
-
-#checkbox_train_dpo input[type="checkbox"]{
- margin-top: 6px;
-}
-
-#checkbox_train_dpo span {
- margin-top: 6px;
-}
-
-#checkbox_align_train {
- padding-top: 18px;
- padding-bottom: 18px;
-}
-
-#checkbox_align_infer input[type="checkbox"] {
- margin-top: 10px;
-}
-
-#checkbox_align_infer span {
- margin-top: 10px;
+ background: #ffc078 !important;
}
footer {
@@ -91,6 +48,7 @@ footer * {
}
"""
+
top_html = """