NPU inference error

#2
by zwanderer - opened

unable to run the code on RK3588, Orangepi 32GB RAM.

t@t-desktop:~/Desktop/stability/Stable-Diffusion-1.5-LCM-ONNX-RKNN2$ python ./run_rknn-lcm.py -i ./model -o ./images --num-inference-steps 4 -s 512x512 --prompt "Majestic mountain landscape with snow-capped peaks, autumn foliage in vibrant reds and oranges, a turquoise river winding through a valley, crisp and serene atmosphere, ultra-realistic style."
I:main:Setting random seed to 93
user_specified_scheduler LCMScheduler {
"_class_name": "LCMScheduler",
"_diffusers_version": "0.31.0",
"beta_end": 0.012,
"beta_schedule": "scaled_linear",
"beta_start": 0.00085,
"clip_sample": false,
"clip_sample_range": 1.0,
"dynamic_thresholding_ratio": 0.995,
"num_train_timesteps": 1000,
"original_inference_steps": 50,
"prediction_type": "epsilon",
"rescale_betas_zero_snr": false,
"sample_max_value": 1.0,
"set_alpha_to_one": true,
"steps_offset": 1,
"thresholding": false,
"timestep_scaling": 10.0,
"timestep_spacing": "leading",
"trained_betas": null
}

I:main:Loading ./model/text_encoder
W rknn-toolkit-lite2 version: 2.3.0
I RKNN: [19:05:02.401] RKNN Runtime Information: librknnrt version: 1.5.2 (c6b7b351a@2023-08-23T15:28:22)
I RKNN: [19:05:02.401] RKNN Driver Information: version: 0.9.6
I RKNN: [19:05:02.402] RKNN Model Information: version: 6, toolkit version: 2.3.0(compiler version: 2.3.0 (c949ad889d@2024-11-07T11:39:30)), target: RKNPU v2, target platform: rk3588, framework name: ONNX, framework layout: NCHW, model inference type: static_shape
W RKNN: [19:05:02.402] RKNN Model version: 2.3.0 not match with rknn runtime version: 1.5.2
W RKNN: [19:05:02.625] query RKNN_QUERY_INPUT_DYNAMIC_RANGE error, rknn model is static shape type, please export rknn with dynamic_shapes
W Query dynamic range failed. Ret code: RKNN_ERR_MODEL_INVALID. (If it is a static shape RKNN model, please ignore the above warning message.)
I:main:Done. Took 0.6 seconds.
I:main:Loading ./model/unet
W rknn-toolkit-lite2 version: 2.3.0
I RKNN: [19:05:03.690] RKNN Runtime Information: librknnrt version: 1.5.2 (c6b7b351a@2023-08-23T15:28:22)
I RKNN: [19:05:03.690] RKNN Driver Information: version: 0.9.6
I RKNN: [19:05:03.691] RKNN Model Information: version: 6, toolkit version: 2.3.0(compiler version: 2.3.0 (c949ad889d@2024-11-07T11:39:30)), target: RKNPU v2, target platform: rk3588, framework name: ONNX, framework layout: NCHW, model inference type: static_shape
W RKNN: [19:05:03.692] RKNN Model version: 2.3.0 not match with rknn runtime version: 1.5.2
W RKNN: [19:05:05.645] query RKNN_QUERY_INPUT_DYNAMIC_RANGE error, rknn model is static shape type, please export rknn with dynamic_shapes
W Query dynamic range failed. Ret code: RKNN_ERR_MODEL_INVALID. (If it is a static shape RKNN model, please ignore the above warning message.)
I:main:Done. Took 3.0 seconds.
I:main:Loading ./model/vae_decoder
W rknn-toolkit-lite2 version: 2.3.0
I RKNN: [19:05:05.878] RKNN Runtime Information: librknnrt version: 1.5.2 (c6b7b351a@2023-08-23T15:28:22)
I RKNN: [19:05:05.878] RKNN Driver Information: version: 0.9.6
I RKNN: [19:05:05.878] RKNN Model Information: version: 6, toolkit version: 2.3.0(compiler version: 2.3.0 (c949ad889d@2024-11-07T11:39:30)), target: RKNPU v2, target platform: rk3588, framework name: ONNX, framework layout: NCHW, model inference type: static_shape
W RKNN: [19:05:05.878] RKNN Model version: 2.3.0 not match with rknn runtime version: 1.5.2
W RKNN: [19:05:07.070] query RKNN_QUERY_INPUT_DYNAMIC_RANGE error, rknn model is static shape type, please export rknn with dynamic_shapes
W Query dynamic range failed. Ret code: RKNN_ERR_MODEL_INVALID. (If it is a static shape RKNN model, please ignore the above warning message.)
I:main:Done. Took 1.4 seconds.
I:main:Beginning image generation.
input 0 shape: (1, 77)
E RKNN: [19:05:08.181] Meet unsupported input dtype for ArgMax
Aborted

Update your NPU runtime library (librknnrt.so)

happyme531 changed discussion status to closed

Sign up or log in to comment