Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tonquer committed Oct 26, 2021
1 parent daac607 commit ae64723
Showing 1 changed file with 5 additions and 67 deletions.
72 changes: 5 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pip install waifu2x-vulkan -v

# Use
```shell
import waifu2x_vulkan
from waifu2x_vulkan import waifu2x_vulkan

# init
waifu2x_vulkan.setDebug(True)
Expand All @@ -32,70 +32,8 @@ assert sts==0
- Please see [waifu2x-ncnn-vulkan-GUI](https://github.com/tonquer/waifu2x-ncnn-vulkan-GUI)
- Please see [test](https://github.com/tonquer/waifu2x-vulkan/blob/main/test/test.py) Example

## Build (Windows)
1. install CMake, Python, 7z
2. git clone
````shell
git clone https://github.com/tonquer/waifu2x-vulkan && cd waifu2x-vulkan
git submodule update --init --recursive
````
3. Install Python,Please check select
````
Download debugging symbols
Download debug binaries
````
4. run (Use PowerShell) , set python path
````shell
$Env:PYTHON_BIN='C:\Python37\python.exe'
.\build.ps1
````

```
* 部分用户可能需要安装 Vulkan 运行环境, 这取决于你的显卡驱动中是否包含 vulkan.1.dll;\
如果编译后 waifu2x 无法使用, 请尝试安装: [最新的 Vulkan Runtime (来自官方)](https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-runtime.exe)
```

## Build (macOS)
1. 安装 [Xcode](https://apps.apple.com/us/app/xcode/id497799835?mt=12), [Homebrew](https://brew.sh/), CMake 和 Python
````shell
brew install cmake python@3.9
````
2. 克隆本仓库
````shell
git clone https://github.com/tonquer/waifu2x-vulkan && cd waifu2x-vulkan
git submodule update --init --recursive
````
3. 执行编译脚本
## Build
```shell
bash build_mac.sh
```
<!-- **Commented, bcs we now using the Homebrew Python3 instead**
* 若在 import waifu2x 时出现 Segfault, 需在编译之前 unlink 掉 Homebrew 安装的 Python 3.x:
````shell
brew unlink python@3.{8,9}
export PATH=$DEVELOPER_DIR/Library/Frameworks/Python3.framework/Versions/3.8/bin:$PATH
hash -r
````
* 在使用了 waifu2x 的项目中, 如果出现 pyinstaller 打包之后突然找不到依赖库的情况, 尝试进行:
````shell Library not loaded: @rpath/Python3.framework/Versions/3.7/Python3
install_name_tool -change @rpath/Python3.framework/Versions/3.7/Python3 @loader_path/Python3 waifu2x.so
````
-->
## Build (Linux)
1. 安装所需的软件包 (Ubuntu)
* P.S. 对于其他的发行版, 请自行寻找这些软件包所对应的名称, 然后使用软件包管理器手动安装它们
````shell
sudo apt-get update
sudo apt-get install --no-install-recommends --no-install-suggests \
python3.9 python3.9-dev build-essential cmake
````
2. 克隆本仓库
````shell
git clone https://github.com/tonquer/waifu2x-vulkan && cd waifu2x-vulkan
git submodule update --init --recursive
````
3. 执行编译脚本
```shell
bash build.sh
```
* 如果编译后 waifu2x 无法使用, 请尝试安装: `libvulkan1` 软件包
pip install wheel
python setup.py bdist_wheel
```

0 comments on commit ae64723

Please sign in to comment.