mirror of
https://github.com/TencentARC/GFPGAN.git
synced 2026-04-23 14:20:57 +00:00
I want export "GFPGANCleanv1-NoCE-C2.pth" to ONNX #181
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jjxxmiin on GitHub (Mar 23, 2022).
I want to use dynamic weights in F.conv2d in pytorch.
However, only constant weights are supported in Barracuda.
How can I change F.conv2d?
@kelisiya commented on GitHub (Mar 24, 2022):
+1
@hhuiwang commented on GitHub (May 6, 2022):
+1
@wl2136 commented on GitHub (Aug 5, 2022):
+1
@Zwei-Rakete commented on GitHub (Aug 9, 2022):
same question
@baher3d commented on GitHub (Aug 15, 2022):
+1
@magicse commented on GitHub (Aug 15, 2022):
+1
@magicse commented on GitHub (Sep 20, 2022):
Hi @jjeamin , here some research to convert GFPGANv1.3-to-ncnn
@Zwei-Rakete commented on GitHub (Sep 20, 2022):
This should be work, I covert operations on weight to input(x), then GFPGAN model will be constant.
这种方法实测有效,我将对weight的操作等效修改为对x的操作,这样卷积的权重就是固定参数,模型就会从动态转换为静态。
@magicse commented on GitHub (Sep 20, 2022):
some test converting for stylegan2

@magicse commented on GitHub (Sep 21, 2022):
Here project with GFPGANv1.3.onnx gfpgan
Link to model GFPGANv1.3.onnx.prototxt
@jjxxmiin commented on GitHub (Sep 22, 2022):
WOW
Many Thanks!!!!
@zimenglan-sysu-512 commented on GitHub (Jul 26, 2023):
did it work for converting to onnx and the sesults are equal to the torcch model?
@shartoo commented on GitHub (Dec 20, 2024):
主要改动和原因:
卷积操作改变:
去调制(demodulation)处理:
这些修改可以让Generator变成静态的原因:
3 . ONNX兼容性:
这种修改保持了模型的功能,同时提高了模型的部署友好性,使其可以被导出为ONNX格式。
ONNX 的计算图特性:
F.conv2d 的特殊性:
分组卷积的复杂性: