kohya_SS安裝說(shuō)明
安裝kohya_SS gui
1.安裝python:https://www.python.org/ftp/python/3.10.9/python-3.10.9-amd64.exe
安裝git:https://git-scm.com/download/win
安裝:Visual Studio 2015, 2017, 2019, and 2022?redistributable
網(wǎng)址:https://aka.ms/vs/17/release/vc_redist.x64.exe
2.管理員打開(kāi)powershell,輸入Set-ExecutionPolicy Unrestricted,然后回車(chē)輸入Y
3.再次打開(kāi)安裝盤(pán)符,輸入例如cd D:(可以是任何盤(pán)符,存儲(chǔ)空間要大),切換到安裝盤(pán)符
4.創(chuàng)建文件夾例如D:\kohya_SS,
5.輸入D:\cd \kohya_SS切換到該文件夾,
6.然后復(fù)制git clone https://github.com/bmaltais/kohya_ss.git
cd kohya_ss
.\setup.bat
安裝
如果國(guó)內(nèi)網(wǎng)速限制請(qǐng)?jiān)贑:user/xx/創(chuàng)建pip環(huán)境
新建pip.txt把后綴改為.in然后用記事本打開(kāi)
粘貼代碼:
?
[global]
?
timeout = 6000
?
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
?
trusted-host = pypi.tuna.tsinghua.edu.cn
就可以了
下面就是運(yùn)行第5步的setup.bat
會(huì)出現(xiàn)
1. This machine
? ? AWS (Amazon SageMaker)
點(diǎn)擊回車(chē)
2. No distributed training
? ? multi-CPU
? ? multi-GPU
? ? TPU
多張顯卡就根據(jù)情況選擇,沒(méi)有就按下回車(chē)
3.Do you want to run your training on CPU only(你只使用GPU訓(xùn)練嗎) (even if a GPU / Apple Silicon device is available)? [yes/NO]:no? ?
4.Do you wish to optimize your script with torch dynamo?[yes/NO]:no? ??
5.Do you want to use DeepSpeed? [yes/NO]: no
6.What GPU(s) (by id) should be used for training on this machine as a comma-seperated list? [all]: all
7.Please select a choice using the arrow or number keys, and selecting with enter,no
?* no
? ? fp16
? ? bf16
? ? fp8
cudnn安裝30/40系顯卡配置,https://b1.thefileditch.ch/mwxKTEtelILoIbMbruuM.zip下載放到kohya_SS文件夾下
8.然后C:\Users\Administrator\kohya_ss>
.\venv\Scripts\activate
python .\tools\cudann_1.8_install.py
粘貼代碼安裝這樣就安裝完成啦,torch2.0自帶cudnn無(wú)需安裝。
9.然后運(yùn)行g(shù)ui-user.bat就打開(kāi)UI界面啦。