Tencent / ncnn

ncnn is a high-performance neural network inference framework optimized for the mobile platform
Other
20.14k stars 4.14k forks source link

NCNN engine crashes when running Stable Diffusion. #4806

Open AlexanderGorobets opened 1 year ago

AlexanderGorobets commented 1 year ago

error log | 日志或报错信息 | ログ

Sometimes you can see SIGILL in Android log. Sometimes device became unresponsive and need to get rebooted.

context | 编译/运行环境 | バックグラウンド

Android arm64-v8a, SDK NDK 21.4.7075529 CMAKE script for NCNN: cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \ -DNCNN_SHARED_LIB=ON \ -DANDROID_ABI="arm64-v8a" \ -DANDROID_PLATFORM=android-29 \ -DNCNN_DISABLE_RTTI=OFF \ -DNCNN_DISABLE_EXCEPTION=OFF \ -DNCNN_VULKAN=ON \ -DCMAKE_BUILD_TYPE=Debug \ ..

how to reproduce | 复现步骤 | 再現方法

  1. https://github.com/EdVince/Stable-Diffusion-NCNN
  2. net.load_model(std::string(sd_ncnn_unet);
  3. app dies at arbitrary places somewhere between layers 300-700

more | 其他 | その他

Tested on different phones

erikrause commented 4 months ago

Have you fix it?