-
Notifications
You must be signed in to change notification settings - Fork 96
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
Unet模型转ncnn异常 #12
Comments
Hi, I manage to converted it using the following code:
And convert it to ncnn using But got the following error when trying to run it
|
Same as you now, I'm wondering if some MHA op aren't on board? |
一般来说,你是无法导出一个跟我所提供的模型一致的模型的。第一,我使用的不是diffusers库,我是用的stable-diffusion-webui的代码的;第二,直接导出是一定会失败的,我前前后后调整了一周的代码。 考虑到导出是一件十分困难的事情,所以我并不打算放出导出的过程。但如果你们一定要自己导出模型的话,我的建议是基于diffusers进行导出,因为diffusers的代码比较简洁,遇到问题也好调整。 即便是你成功导出了模型,你的模型结构也是与我的不一样的,因为我所提供的模型里还合并了一些与denoisor相关的代码,你要么就改我提供的c++代码,要么就把模型结构改成跟我的一样。最后,你导出的模型可能会在multiheadattention上遇到问题,导致速度慢、无法支持动态shape等。 总结:导出很麻烦,不建议自行导出;自行导出成功后,我的c++代码不再适用;自行导出成功后,速度、动态shape等支持可能会遇到问题。 |
Please note that, for the current code of diffusers, you can not use it directly to export the ncnn model. You will have to modify the code of diffusers. |
@EdVince 那有空试下这个,目前来说非二次元里最好的模型 https://huggingface.co/dreamlike-art/dreamlike-photoreal-2.0 |
大佬,请教下Unet模型转换问题,pt文件转trace后,再使用pnnx转换异常
上述代码可正常输出
unet_traced.pt
文件,但是pnnx转换时中途异常退出,内容如下:The text was updated successfully, but these errors were encountered: