How to install Kohya_SS to Ubuntu WSL under Windows 11
1)Prepare:
1.Check CPU virtualization on Windows > Task Manager > Perfomance > CPU > Virtualization: Enabled or Disabled.
If Disabled - Access the UEFI (or BIOS). The way the UEFI (or BIOS) appears depends on your PC manufacturer. https://support.microsoft.com/en-us/windows/enable-virtualization-on-windows-c5578302-6e43-4b4b-a449-8ced115f58e1
2.Make sure you are using a recent version of Windows 10/11. If needed update to the latest version. (No earlier than Windows 10, Version 1903, Build 18362)
2)Install WSL and Ubuntu
1.Open Terminal > Use the command -
wsl --install2.Open the Microsoft Store > Find - Ubuntu. (Ubuntu which doesn't show the version in a name is the latest)
3.Install Ubuntu
4.Open Ubuntu
5.Create profile > For example:
Username - User
Password - User
3)Install Kohya_SS on WSL Ubuntu
:: Prepare
sudo apt updatesudo apt install software-properties-common -ysudo add-apt-repository ppa:deadsnakes/ppasudo apt updatesudo apt install python3.10 python3.10-venv python3.10-dev -ysudo apt update -y && sudo apt install -y python3-tksudo apt install python3.10-tksudo apt install git -y:: NVIDIA CUDA Toolkit
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-keyring_1.0-1_all.debsudo dpkg -i cuda-keyring_1.0-1_all.debsudo apt-get updatesudo apt-get -y install cudaexport PATH=/usr/local/cuda-12.6/bin${PATH:+:${PATH}}export LD_LIBRARY_PATH=/usr/local/cuda-12.6/lib64\${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}:: Reboot
sudo reboot:: Kohya_ss install
cd ~git clone --recursive https://github.com/bmaltais/kohya_ss.gitcd kohya_ssgit checkout sd3-sd3.5-flux./setup.sh:: Configuration settings
source venv/bin/activateaccelerate config>This machine
>No distributed training
>No
>No
>No
>All
>Yes
If you have a RTX 30/40 series video card choose >bf16. If don't have choose >fp16.
4)Run Kohya_SS on WSL Ubuntu
cd kohya_ss./gui.shNotes:
To find Kohya_ss folder use \\wsl.localhost\Ubuntu\home\user in Explorer. You can move there a model to train and dataset.
Additional commands for Windows Terminal:
Shutdown -
wsl --shutdownUninstall or reset Ubuntu -
wsl --unregister Ubuntu
