Skip to content

Run OneDiff on Windows by WSL2

Li Junliang edited this page Apr 30, 2024 · 4 revisions

1. Install WSL2

If you have NVIDIA GPU driver installed locally, then you can use it directly in WSL. If not, please install the graphics card driver first.

1、Install WSL with the following command:

wsl --install

After successful execution, the result will look like this: image

2、Enable the Linux subsystem with administrator privileges using the following command:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

After successful execution, the result will look like this: image-6

3、Enable the Virtual Machine feature with administrator privileges using the following command:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

After successful execution, the result will look like this: image-2

4、Set the default version of WSL to 2 with administrator privileges using the following command:

wsl --set-default-version 2

After successful execution, the result will look like this:
image-3

5、After restarting the computer, you can download the Ubuntu system from the Microsoft Store as shown below: image-4

6、Next, you can open the Ubuntu system as shown in the following image: image-5 image-7

**NOTE:**If you run into such a problem Prompt when WSL2 starts: The referenced object type does not support the attempted operationHere are some things you can try
https://github.com/microsoft/WSL/issues/4177#issuecomment-1429113508

After you have set up the Ubuntu system, the subsequent steps are exactly the same as installing and using OneDiff on Linux. For detailed steps, please refer to URL below. image-1

References

https://learn.microsoft.com/zh-cn/windows/wsl/install
https://github.com/siliconflow/onediff/blob/main/README.md

Clone this wiki locally