mirror of
https://github.com/neodyland/sbv2-api.git
synced 2025-12-22 23:49:58 +00:00
変換方法
初心者向け準備
わかる人は飛ばしてください。
-
pythonを入れます。3.11.8で動作確認をしていますが、最近のバージョンなら大体動くはずです。
-
cd convert -
python -m venv venv -
source venv/bin/activate -
pip install -r requirements.txt
モデル変換
-
変換したいモデルの
.safetensorsで終わるファイルの位置を特定してください。 -
同様に
config.json、style_vectors.npyというファイルを探してください。 -
以下のコマンドを実行します。
python convert_model.py --style_file "ここにstyle_vectors.npyの場所" --config_file "同様にconfig.json場所" --model_file "同様に.safetensorsで終わるファイルの場所"
models/名前.sbv2というファイルが出力されます。GUI版のモデルファイルに入れてあげたら使えます。
Deberta変換
意味が分からないならおそらく変換しなくてもいいってことです。
venvを用意し、requirementsを入れて、python convert_model.pyを実行するだけです。
models/deberta.onnxとmodels/tokenizer.jsonが出力されたら成功です。