Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

realesrgan升级到0.3.0了 #8

Closed
ghost opened this issue Sep 20, 2022 · 11 comments
Closed

realesrgan升级到0.3.0了 #8

ghost opened this issue Sep 20, 2022 · 11 comments

Comments

@ghost
Copy link

ghost commented Sep 20, 2022

刚刚推送消息说realesrgan升级到0.3.0了,增加了两个新的模型,看log好像还不错,大佬能升级下app吗,谢谢哈~

@TransparentLC
Copy link
Owner

先等等,Real-ESRGAN-ncnn-vulkan 还没有跟着更新(Real-ESRGAN 在 release 里面上传的两个 pth 文件并不能直接拿到这里使用)。我也会盯着那边的和更新 0.3.0 相关的 issue,等到更新了就会加上。

@TransparentLC TransparentLC pinned this issue Sep 21, 2022
@TransparentLC
Copy link
Owner

TransparentLC commented Mar 15, 2023

我尝试自己动手转换了这两个模型(realesr-general-wdn-x4v3 和 realesr-general-x4v3),可以在扩展模型的那个 Release 里下载。

不过由于 Real-ESRGAN-ncnn-vulkan 主程序没有更新,新模型的降噪强度并不能控制……

@yrkgokfrrna4395
Copy link

@TransparentLC 能否帮忙转一下x2的模型,我这边需要在1050显卡上使用,x4的模型太慢了,谢谢!

@TransparentLC
Copy link
Owner

TransparentLC commented Aug 24, 2023

@yrkgokfrrna4395 https://github.com/xinntao/Real-ESRGAN/releases/tag/v0.3.0 只有两个 x4 的模型,并没有 x2 的模型。你指的是哪个 x2 的模型?

@TransparentLC
Copy link
Owner

@yrkgokfrrna4395 最近一个 x2 的官方模型是 https://github.com/xinntao/Real-ESRGAN/releases/tag/v0.2.3.0 这里的 RealESRGANv2-animevideo-xsx2,如果指的是这个的话那我已经转换过了,可以在那个扩展模型的 release 的链接里下载。

@yrkgokfrrna4395
Copy link

@TransparentLC https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth
您好,用的是v0.2.0的,请帮忙转一下这个,万分感谢,3次元图片的x2

@TransparentLC
Copy link
Owner

@yrkgokfrrna4395 我试了一下,遗憾的是转换出来的模型无法使用……


使用当时保存的 pytorch2onnx.py 转换,不过因为是 x2 模型所以把某一行改成 model = RRDBNet(..., scale=2),得到的 nccn 文件再使用 onnx2ncnn 转换,但是这样得到的 param 文件有一个 Reorg 层:

7767517
1371 2154
Input            x                        0 1 x
Reorg            /Reshape_1               1 1 x /Reshape_1_output_0 0=2
Convolution      /conv_first/Conv         1 1 /Reshape_1_output_0 /conv_first/Conv_output_0 0=64 1=3 11=3 2=1 12=1 3=1 13=1 4=1 14=1 15=1 16=1 5=1 6=6912
...

不知道为什么,Real-ESRGAN-ncnn-vulkan 在编译设定里把对 Reorg 的支持关掉了,所以即使转出来了也并不能在原版的程序上使用。

@yrkgokfrrna4395
Copy link

@TransparentLC 这样,就太遗憾了,放弃了,只能退而求其次用Waifu了,还是感谢您。转出来的模型可以发我一个吗?
[email protected]

@yrkgokfrrna4395
Copy link

@TransparentLC 我这里重新Build了一个支持Reorg的Real-ESRGAN-ncnn-vulkan,想试试看

@TransparentLC
Copy link
Owner

TransparentLC commented Aug 27, 2023

@yrkgokfrrna4395

RealESRGAN_x2plus.zip

onnx2ncnn 转换出 bin 和 param 之后我修改了 param,不过因为我这里没办法使用所以也不知道改得对不对,把 onnx 也附上了。

@yrkgokfrrna4395
Copy link

@TransparentLC 我这里使用了,可以了,谢谢大佬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants