1)Install Kohya_SS
Open Terminal:
git clone https://github.com/bmaltais/kohya_ss
cd kohya_ss
git checkout sd3-sd3.5-flux
setup.bat
Kohya_ss setup menu:
1. Install kohya_ss GUI
5. (Optional) Manually configure Accelerate:
>This machine
>No distributed training
Do you want to run your training on CPU only (even if a GPU / Apple Silicon / Ascend NPU device is available)?
>No
Do you wish to optimize your script with torch dynamo?
>No
Do you want to use DeepSpeed?
>No
What GPU(s) (by id) should be used for training on this machine as a comma-seperated list?
>All
Would you like to enable numa efficiency? (Currently only supported on NVIDIA hardware).
>Yes
Do you wish to use FP16 or BF16 (mixed precision)?
>bf16 (If you have a RTX 30/40 series video card choose >bf16. If don't have choose >fp16.)
2)Install PyTorch 2.6.0 for Kohya_SS (Optional) (Experimental)
1.Change text in gui.bat file inside kohya_ss folder and to add --noverify to skip check updates reequipments for kohya_gui.py
@echo off
set PYTHON_VER=3.10.9
:: Deactivate the virtual environment
call .\venv\Scripts\deactivate.bat
:: Activate the virtual environment
call .\venv\Scripts\activate.bat
set PATH=%PATH%;%~dp0venv\Lib\site-packages\torch\lib
:: If the exit code is 0, run the kohya_gui.py script with the command-line arguments
if %errorlevel% equ 0 (
REM Check if the batch was started via double-click
IF /i "%comspec% /c %~0 " equ "%cmdcmdline:"=%" (
REM echo This script was started by double clicking.
cmd /k python.exe kohya_gui.py %* --noverify
) ELSE (
REM echo This script was started from a command prompt.
python.exe kohya_gui.py %* --noverify
)
)
2.Run Terminal inside kohya_ss folder:
python -m venv venv
.\venv\Scripts\activate
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu124
pip install xformers==0.0.29.dev922
pip3 install torch==2.5.0 torchvision --index-url https://download.pytorch.org/whl/test/cu124
3.Install cuDNN 9.5.0 for Kohya_SS (Option)
Run terminal inside kohya_ss folder:
python -m venv venv
.\venv\Scripts\activate
pip install nvidia-cudnn-cu11==9.5.0.50
3.Install TransformerEngine or MS-AMP for Kohya_SS (In development, Option)
pip install transformer-engine