Files
sbv2-api/scripts/convert
googlefan256 451f4497b6 fix: lot of
2025-05-09 17:01:02 +09:00
..
2025-05-09 17:01:02 +09:00
2025-02-22 08:26:59 +00:00
2025-02-22 08:26:59 +00:00
2025-02-22 08:00:17 +00:00
2025-05-09 17:01:02 +09:00

変換方法

初心者向け準備

わかる人は飛ばしてください。

  1. pythonを入れます。3.11.8で動作確認をしていますが、最近のバージョンなら大体動くはずです。

  2. cd convert

  3. python -m venv venv

  4. source venv/bin/activate

  5. pip install -r requirements.txt

モデル変換

  1. 変換したいモデルの.safetensorsで終わるファイルの位置を特定してください。

  2. 同様にconfig.jsonstyle_vectors.npyというファイルを探してください。

  3. 以下のコマンドを実行します。

python convert_model.py --style_file "ここにstyle_vectors.npyの場所" --config_file "同様にconfig.json場所" --model_file "同様に.safetensorsで終わるファイルの場所"
  1. models/名前.sbv2というファイルが出力されます。GUI版のモデルファイルに入れてあげたら使えます。

Deberta変換

意味が分からないならおそらく変換しなくてもいいってことです。

venvを用意し、requirementsを入れて、python convert_model.pyを実行するだけです。

models/deberta.onnxmodels/tokenizer.jsonが出力されたら成功です。