Skip to content

Commit

Permalink
feat: add chattts download & del unnecessaries
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Jun 17, 2024
1 parent 2b6ca35 commit 3808e90
Show file tree
Hide file tree
Showing 34 changed files with 184 additions and 343 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ go.work

# MacOS system file
.DS_Store

# build result
/build
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ archives:

nfpms:
- license: AGPL 3.0
homepage: https://github.com/RVC-Project/RVC-Models-Downloader
homepage: https://github.com/fumiama/RVC-Models-Downloader
file_name_template: "rvcmd_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
formats:
- deb
Expand Down
33 changes: 33 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
PROJECT_NAME := rvcmd
BUILD_PATH := build
RUN_CMD := -h

GOOS := $(go env GOOS)
GOARCH := $(go env GOARCH)
GO_SRC_WIN := $(shell find . -maxdepth 1 -name '*.go' | grep -v '_test.go$$' | grep -v '_windows.go$$')
GO_SRC_NO_WIN := $(shell echo $(GO_SRC_WIN) | grep -v '_windows.go$$')

all:
@$(MAKE) -e bin
bin: gen dir tidy
@if [[ "$(GOARCH)" == "windows" ]]; then \
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags "-s -w" -trimpath -o $(BUILD_PATH)/$(PROJECT_NAME).exe; \
else \
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags "-s -w" -trimpath -o $(BUILD_PATH)/$(PROJECT_NAME); \
fi
run: bin
@if [[ "$(GOARCH)" == "windows" ]]; then \
$(BUILD_PATH)/$(PROJECT_NAME).exe $(RUN_CMD); \
else \
$(BUILD_PATH)/$(PROJECT_NAME) $(RUN_CMD); \
fi
gen:
@go generate
tidy:
@go mod tidy
dir:
@if [ ! -d "$(BUILD_PATH)" ]; then mkdir $(BUILD_PATH); fi
clean:
@if [ -d "$(BUILD_PATH)" ]; then \
rm -rf $(BUILD_PATH)/$(PROJECT_NAME)*; \
fi
105 changes: 39 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ English | [简体中文](README_sc.md) | [한국어](README_kr.md)

Easy tool to download a batch of files listed in yaml (ex. RVC models in Hugging Face 🤗).

![tui demo](https://github.com/RVC-Project/RVC-Models-Downloader/assets/41315874/db577dfb-8a6d-4909-b071-9d36cc77afc6)
![tui demo](https://github.com/fumiama/RVC-Models-Downloader/assets/41315874/db577dfb-8a6d-4909-b071-9d36cc77afc6)

## Quick Start

### Preparation

1. Download the program at [Release](https://github.com/RVC-Project/RVC-Models-Downloader/releases) page.
1. Download the program at [Release](https://github.com/fumiama/RVC-Models-Downloader/releases) page.
2. Put this program into the root directory of RVC (or whatever position you want to download some files into).
3. You can also add it to the `PATH` to use this tool everywhere. If you have installed this program by a package manager, it may be already in the `PATH`.

Expand All @@ -19,70 +19,64 @@ Easy tool to download a batch of files listed in yaml (ex. RVC models in Hugging
#### All Assets of RVC

```bash
rvcmd assets/all
rvcmd assets/rvc
```

#### Latest General Pack of RVC (Windows Only)
#### All Assets of ChatTTS

```bash
rvcmd packs/general/latest
```

#### ffmpeg Tools (Windows Only)

```bash
rvcmd tools/ffmpeg
rvcmd -w 1 assets/chtts
```

### Customized Download

#### Ex.1. Download ffmpeg Tools & Latest Intel Pack
#### Ex.1. Download hubert & rmvpe

1. Write and save the following `cust.yaml`.
```yaml
BaseURL: https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main
Targets:
- Refer: tools/ffmpeg
- Refer: packs/intel/latest
```
```yaml
BaseURL: https://huggingface.co/fumiama/RVC-Pretrained-Models/resolve/main
Targets:
- Refer: hubert
- Refer: rmvpe
```
2. Run `rvcmd` in the same folder.
```bash
rvcmd -c cust
```
```bash
rvcmd -c cust
```

#### Ex.2. Download other Repositories in 🤗

> Use [Stable Diffusion v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5) as the example.

1. Write and save the following `cust.yaml`.
```yaml
BaseURL: https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main
Targets:
- Folder: sd1.5 # the folder you want to download into
Copy: # files to download
- v1-5-pruned-emaonly.ckpt
- v1-5-pruned-emaonly.safetensors
- Folder: sd1.5/vae # the folder you want to download into
Copy: # files to download
- vae/diffusion_pytorch_model.bin
```
```yaml
BaseURL: https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main
Targets:
- Folder: sd1.5 # the folder you want to download into
Copy: # files to download
- v1-5-pruned-emaonly.ckpt
- v1-5-pruned-emaonly.safetensors
- Folder: sd1.5/vae # the folder you want to download into
Copy: # files to download
- vae/diffusion_pytorch_model.bin
```

#### Ex.3. Download Releases in GitHub

> Use [yousa-ling-diffsinger-v1.3](https://github.com/yousa-ling-official-production/yousa-ling-diffsinger-v1/releases/tag/v1.3) as the example.

1. Write and save the following `cust.yaml`.
```yaml
BaseURL: https://github.com/yousa-ling-official-production/yousa-ling-diffsinger-v1/releases/download/v1.3
Targets:
- Folder: . # the folder you want to download into
Copy: # files to download
- yousaV1.3.zip
```
```yaml
BaseURL: https://github.com/yousa-ling-official-production/yousa-ling-diffsinger-v1/releases/download/v1.3
Targets:
- Folder: . # the folder you want to download into
Copy: # files to download
- yousaV1.3.zip
```
2. Run `rvcmd` in the same folder.
```bash
rvcmd -c cust
```
```bash
rvcmd -c cust
```

## Full Usage

Expand All @@ -97,37 +91,16 @@ Usage: rvcmd [-notrs] [-dns dns.yaml] 'target/to/download'
-notui
use plain text instead of TUI
-ua string
customize user agent
customize user agent (default "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0")
-w uint
connection waiting seconds (default 4)
'target/to/download'
like packs/general/latest
All available targets:
assets:
all hubert rmvpe uvr5 v1 v2
packs:
amd:
latest
v2:
20230813 20231006
general:
latest
v1:
20230331 20230416 20230428 20230508 20230513 20230516 20230717
v2:
20230528 20230618
intel:
latest
v2:
20230813 20231006
nvidia:
latest
v2:
20230813 20231006
tools:
ffmpeg
chtts hubert rmvpe rvc uvr5 v1 v2
```

## Demo Video

https://github.com/RVC-Project/RVC-Models-Downloader/assets/41315874/da2b5827-8b1a-45f8-a9c0-03a5618ad5f8
https://github.com/fumiama/RVC-Models-Downloader/assets/41315874/da2b5827-8b1a-45f8-a9c0-03a5618ad5f8
111 changes: 41 additions & 70 deletions README_kr.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

yaml의 batch 파일을 쉽게 다운로드 할 수 있는 도구입니다. (Hugging Face 🤗의 RVC 모델 등).

![tui demo](https://github.com/RVC-Project/RVC-Models-Downloader/assets/41315874/db577dfb-8a6d-4909-b071-9d36cc77afc6)
![tui demo](https://github.com/fumiama/RVC-Models-Downloader/assets/41315874/db577dfb-8a6d-4909-b071-9d36cc77afc6)

## 빠른 시작

### 준비

1. [릴리스](https://github.com/RVC-Project/RVC-Models-Downloader/releases) 페이지에서 프로그램을 다운로드를 받아주세요.
1. [릴리스](https://github.com/fumiama/RVC-Models-Downloader/releases) 페이지에서 프로그램을 다운로드를 받아주세요.
2. 해당 프로그램을 RVC의 루트 디렉토리(또는 파일을 다운로드하고 싶은 위치)에 넣어주세요.
3. 이 도구를 어디에서나 사용할 수 있도록 `PATH`에 추가할 수도 있습니다. 패키지 매니저를 통해 이 프로그램을 설치했다면 이미 `PATH`에 등록되어 있을 수 있습니다.

Expand All @@ -19,72 +19,64 @@ yaml의 batch 파일을 쉽게 다운로드 할 수 있는 도구입니다. (Hug
#### RVC의 모든 자산

```bash
rvcmd assets/all
rvcmd assets/rvc
```

#### RVC의 최신 일반 팩 (Windows 전용)
#### ChatTTS의 모든 자산

```bash
rvcmd packs/general/latest
```

#### ffmpeg 도구 (Windows 전용)

```bash
rvcmd tools/ffmpeg
rvcmd -w 1 assets/chtts
```

### 사용자 정의 다운로드

#### 예시 1. ffmpeg 도구 & 최신 인텔 팩 다운로드
#### 예시 1. hubert & rmvpe 다운로드

1. 다음 내용을 포함한 `cust.yaml`을 작성하고 저장합니다.
```yaml
BaseURL: https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main
Targets:
- Refer: tools/ffmpeg
- Refer: packs/intel/latest
```
```yaml
BaseURL: https://huggingface.co/fumiama/RVC-Pretrained-Models/resolve/main
Targets:
- Refer: hubert
- Refer: rmvpe
```
2. 같은 폴더에서 `rvcmd`를 실행합니다.
```bash
rvcmd -c cust
```

```bash
rvcmd -c cust
```

#### 예시 2. 🤗의 다른 저장소 다운로드
#### 예시 2. 🤗의 다른 저장소 다운로드

> [Stable Diffusion v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5)를 예시로 사용합니다.
> [Stable Diffusion v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5)를 예시로 사용합니다.

1. 다음 내용을 포함한 `cust.yaml`을 작성하고 저장합니다.
```yaml
BaseURL: https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main
Targets:
- Folder: sd1.5 # 다운로드할 폴더
Copy: # 다운로드할 파일
- v1-5-pruned-emaonly.ckpt
- v1-5-pruned-emaonly.safetensors
- Folder: sd1.5/vae # 다운로드할 폴더
Copy: # 다운로드할 파일
- vae/diffusion_pytorch_model.bin
```
1. 다음 내용을 포함한 `cust.yaml`을 작성하고 저장합니다.
```yaml
BaseURL: https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main
Targets:
- Folder: sd1.5 # 다운로드할 폴더
Copy: # 다운로드할 파일
- v1-5-pruned-emaonly.ckpt
- v1-5-pruned-emaonly.safetensors
- Folder: sd1.5/vae # 다운로드할 폴더
Copy: # 다운로드할 파일
- vae/diffusion_pytorch_model.bin
```

#### 예시 3. GitHub에서 릴리스 다운로드

> [yousa-ling-diffsinger-v1.3](https://github.com/yousa-ling-official-production/yousa-ling-diffsinger-v1/releases/tag/v1.3)를 예시로 사용합니다.

1. 다음 내용을 포함한 `cust.yaml`을 작성하고 저장합니다.
```yaml
BaseURL: https://github.com/yousa-ling-official-production/yousa-ling-diffsinger-v1/releases/download/v1.3
Targets:
- Folder: . # 다운로드할 폴더
Copy: # 다운로드할 파일
- yousaV1.3.zip
```
```yaml
BaseURL: https://github.com/yousa-ling-official-production/yousa-ling-diffsinger-v1/releases/download/v1.3
Targets:
- Folder: . # 다운로드할 폴더
Copy: # 다운로드할 파일
- yousaV1.3.zip
```
2. 같은 폴더에서 `rvcmd`를 실행합니다.

```bash
```bash
rvcmd -c cust
```
```

## 전체 사용법

Expand All @@ -99,37 +91,16 @@ Usage: rvcmd [-notrs] [-dns dns.yaml] 'target/to/download'
-notui
use plain text instead of TUI
-ua string
customize user agent
customize user agent (default "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0")
-w uint
connection waiting seconds (default 4)
'target/to/download'
like packs/general/latest
All available targets:
assets:
all hubert rmvpe uvr5 v1 v2
packs:
amd:
latest
v2:
20230813 20231006
general:
latest
v1:
20230331 20230416 20230428 20230508 20230513 20230516 20230717
v2:
20230528 20230618
intel:
latest
v2:
20230813 20231006
nvidia:
latest
v2:
20230813 20231006
tools:
ffmpeg
chtts hubert rmvpe rvc uvr5 v1 v2
```

## 데모 비디오

https://github.com/RVC-Project/RVC-Models-Downloader/assets/41315874/da2b5827-8b1a-45f8-a9c0-03a5618ad5f8
https://github.com/fumiama/RVC-Models-Downloader/assets/41315874/da2b5827-8b1a-45f8-a9c0-03a5618ad5f8
Loading

0 comments on commit 3808e90

Please sign in to comment.