1. VVAS GStreamer Commands Failing — Verify Board and Environment Setup
If VVAS GStreamer commands fail to run, verify the following:
a) Overlay images might not have been loaded correctly.
b) The LD_LIBRARY_PATH environment variable might not be set. Run the following to verify:
echo $LD_LIBRARY_PATHThe output should contain the following paths:
/usr/lib/python3.12/site-packages/onnxruntime/capi/:/usr/lib/python3.12/site-packages/flexmlrt/lib/:/usr/lib/python3.12/site-packages/voe/lib/
c) The /run/media/mmcblk0p1/ directory is empty or does not exist.
If any or all of these issues appear, re-check imaging and boot using OSPI and SD card board setup together with Quick Start (board and first inference) in the Versal AI Edge Gen2 Vitis AI documentation.
2. Installation or gst command execution errors
Try installation with privilege elevation using “sudo” or use “sudo su -“.
3. Error with xinfer command execution
Verify that parameters of config-file json are as expected and the file name/path are valid. Refer to vvas_xinfer for more details on config parameters and the sample json.
4. xinfer onnxruntime switching to cpu mode when json is configured to use vitisai
Verify that json parameters are accurate and correct as per compiled model. For example, verify values in cache-dir, cache-key.
If model is partially offloaded by VAIML compiler then rest of the ops are offloaded to CPU.
Check if any issue with model compilation.
The following warnings are emitted when cache-dir or cache-key issues are detected at pipeline startup:
a) cache-dir does not exist:
WARNING vvas_xinfer gstvvas_xinfer_helper.cpp:read_onnxrt_config:<vvas_xinfer0>
cache-dir <cache-dir> does not exist, inference may run on CPU instead of hardware accelerator
Possible fix — cache-dir in vitisai-ep-config must be a directory that exists on disk. Create it or correct the path:
"vitisai-ep-config": {
"cache-dir": "/etc/vai/models"
}
b) cache-key: no compiled model found at expected path:
WARNING vvas_xinfer gstvvas_xinfer_helper.cpp:read_onnxrt_config:<vvas_xinfer0>
cache-key <cache-key> may be incorrect: expected compiled model not found at <cache-dir>/<cache-key>/<cache-key>.rai,
verify cache-key in vitisai-ep-config, inference may run on CPU instead of hardware accelerator
Possible fix — cache-key must match the filename (without extension) of the compiled model. The plugin checks for <cache-dir>/<cache-key>/<cache-key>.rai:
"vitisai-ep-config": {
"cache-dir": "/etc/vai/models",
"cache-key": "ResNet50_INT8"
}
5. Couldn’t create VVAS context / failed to do initialization
ERROR vvas_xinfer gstvvas_xinfer.cpp:vvas_xinfer_ppe_init:<vvas_xinfer0>
Couldn't create VVAS context: xclbin <xclbin-location> not found
ERROR vvas_xinfer gstvvas_xinfer.cpp:gst_vvas_xinfer_change_state:<vvas_xinfer0>
failed to do initialization
Failed to set pipeline to PAUSED.
Possible causes and fix:
xclbin-location in preprocess-config points to a file that does not exist. Update it to the correct path:
"preprocess-config": {
"xclbin-location": "/run/media/mmcblk0p1/x_plus_ml.xclbin"
}
6. kernel start failed / failed to process frame in PPE
ERROR vvas_xinfer gstvvas_xinfer.cpp:vvas_image_process_create_frame_rect:<vvas_xinfer0>
failed to add frame for processing
ERROR vvas_xinfer gstvvas_xinfer.cpp:vvas_xinfer_ppe_loop:<vvas_xinfer0>
kernel start failed
ERROR: from element .../GstVvas_XInfer:vvas_xinfer0: failed to process frame in PPE.
ERROR: pipeline doesn't want to preroll.
Possible causes and fix:
out-mem-bank in preprocess-config does not match the memory bank expected by the inference backend. For zero-copy VART, out-mem-bank must be set to the same value in both the preprocessing block and the inference block. The same applies to in-mem-bank.
7. Model compilation is not supported in a deployment only installation
F vaiml_compile.cpp:623]
Model compilation is not supported in a deployment only installation.
Please compile the model with a full installation.
[FATAL:onnxruntime, vaiml_compile.cpp:623]
Model compilation is not supported in a deployment only installation.
Please compile the model with a full installation.
Possible causes and fix:
An incorrect cache-key in vitisai-ep-config causes the Vitis AI execution provider to attempt model recompilation, which is not supported on a deployment-only installation. cache-key must match the filename (without extension) of the .rai or .onnx model file:
"vitisai-ep-config": {
"cache-dir": "/etc/vai/models",
"cache-key": "ResNet50_INT8",
"config-file-path": "/etc/vai/models/ResNet50_INT8/vitisai_config.json"
}
8. vvas_postprocess_create failed
a) Postprocess library file not found:
ERROR vvas_xinfer gstvvas_xinfer.cpp:vvas_xinfer_postproc_init:<vvas_xinfer0>
vvas_postprocess_create failed: <library-path> file not found
ERROR vvas_xinfer gstvvas_xinfer.cpp:gst_vvas_xinfer_change_state:<vvas_xinfer0>
failed to do initialization
Failed to set pipeline to PAUSED.
Possible fix — library-path in postprocess-config points to a file that does not exist. Set it to the correct path, for example:
"postprocess-config": {
"library-path": "/usr/lib/libvvascore_postprocess_resnet50-1.0.so"
}
b) Label file does not exist:
Failed to read labels from: <label-file-path>
ERROR vvas_xinfer gstvvas_xinfer.cpp:vvas_xinfer_postproc_init:<vvas_xinfer0>
vvas_postprocess_create failed
ERROR vvas_xinfer gstvvas_xinfer.cpp:gst_vvas_xinfer_change_state:<vvas_xinfer0>
failed to do initialization
Failed to set pipeline to PAUSED.
Possible fix — label-file-path in postprocess-config points to a non-existent file. Update it to the correct location:
"postprocess-config": {
"library-config": {
"label-file-path": "/etc/vvas/configs/infer/imagenet-classes-1000.txt"
}
}
9. infer config file parse error
ERROR: from element .../GstVvas_XInfer:vvas_xinfer0: infer config file parse error
Failed to set pipeline to PAUSED.
This error is preceded by a specific validation message indicating the root cause:
a) Invalid value for inference-backend-runtime:
ERROR vvas_xinfer gstvvas_xinfer_helper.cpp:read_infer_config:<vvas_xinfer0>
Invalid value [invalid_runtime] provided for inference-backend-runtime
should be one of [onnxrt, vart]
Possible fix — inference-backend-runtime only accepts onnxrt or vart:
"infer-config": {
"inference-backend-runtime": "onnxrt"
}
b) Unknown model-format:
ERROR vvas_xinfer gstvvas_xinfer_helper.cpp:read_infer_config:<vvas_xinfer0>
Unknown model-format <value> : supported values are [RGB, BGR]
c) ONNXRT configuration not found or invalid:
ERROR vvas_xinfer gstvvas_xinfer_helper.cpp:read_infer_config:<vvas_xinfer0>
ONNXRT configuration not found or invalid
Possible fix — when inference-backend-runtime is onnxrt, the onnxrt-config block is mandatory. The following shows a minimal example — adjust paths and parameters to match your model:
"infer-config": {
"inference-backend-runtime": "onnxrt",
"onnxrt-config": {
"onnx-model-path": "/etc/vai/models/ResNet50_INT8/ResNet50_INT8.onnx",
"input-tensor-layout": "NCHW",
"onnxrt-ep": "vitisai",
"vitisai-ep-config": {
"config-file-path": "/etc/vai/models/ResNet50_INT8/vitisai_config.json",
"cache-dir": "/etc/vai/models",
"cache-key": "ResNet50_INT8"
}
}
}
10. Model resources missing — Neither partition directory nor RAI file found
[VAIML-RUNNER] ERROR vaiml_runner.cpp:validate_model_path:291
Model resources missing! Neither partition directory nor RAI file found.
[VAIML-RUNNER] ERROR vaiml_runner.cpp:create_model:529
Model validation failed: Model resources missing:
partition directory and .rai file not found.
ERROR vvas_xinfer gstvvas_xinfer.cpp:vvas_xinfer_infer_init:<vvas_xinfer0>
Create runner ERROR :: Model validation failed: Reason:
Model resources missing: partition directory and .rai file not found.
Failed to set pipeline to PAUSED.
Possible causes and fix:
vart-model-path points to a .rai file that does not exist. Set it to the correct path, for example:
"vart-config": {
"vart-model-path": "/etc/vai/models/ResNet50_INT8/ResNet50_INT8.rai"
}
11. preprocess-config errors
a) Failed to query Image Process Library caps:
ERROR vvas_xinfer gstvvas_xinfer.cpp:vvas_xinfer_ppe_init:<vvas_xinfer0>
Failed to query Image Process Library caps for library: <library-name>. Check library-name in preprocess-config
ERROR vvas_xinfer gstvvas_xinfer.cpp:gst_vvas_xinfer_change_state:<vvas_xinfer0>
failed to do initialization
Failed to set pipeline to PAUSED.
Possible fix — library-name in preprocess-config refers to a shared library that is not installed or is named incorrectly. Set it to the correct library name:
"preprocess-config": {
"library-name": "libvvas_image_process_hw_lib.so"
}
b) Couldn’t create Image Process instance — invalid or missing library-config:
ERROR vvas_xinfer gstvvas_xinfer.cpp:vvas_xinfer_ppe_init:<vvas_xinfer0>
Couldn't create Image Process instance for library: <library-name>. Possible invalid or missing library-config in preprocess-config
ERROR vvas_xinfer gstvvas_xinfer.cpp:gst_vvas_xinfer_change_state:<vvas_xinfer0>
failed to do initialization
Failed to set pipeline to PAUSED.
Possible fix — library-config in preprocess-config is invalid or missing. Ensure it contains all parameters required by the preprocessing library:
"preprocess-config": {
"library-name": "libvvas_image_process_hw_lib.so",
"library-config": "{\"kernel-name\":\"image_processing:{image_processing_1}\"}",
...
}
c) mean-r is not set / scale-r is not set — pre-process file parse error:
ERROR vvas_xinfer gstvvas_xinfer_helper.cpp:read_ppe_config:<vvas_xinfer0>
mean-r is not set (or: scale-r is not set.)
WARN vvas_xinfer gstvvas_xinfer_helper.cpp:read_ppe_config:<vvas_xinfer0>
error: pre-process file parse error
ERROR: from element .../GstVvas_XInfer:vvas_xinfer0: pre-process file parse error
Failed to set pipeline to PAUSED.
Possible fix — all six normalization fields are mandatory in preprocess-config. Omitting any one causes a parse error at startup. Add all six fields with values matching the model’s training normalization:
"preprocess-config": {
"mean-r": 123.675,
"mean-g": 116.28,
"mean-b": 103.53,
"scale-r": 0.017124,
"scale-g": 0.017507,
"scale-b": 0.017429
}
These values are model-specific. For ResNet50 trained on ImageNet, the preceding JSON block can be used.
12. Pipeline runs but classification results are incorrect
The pipeline completes without errors but the predicted class labels are wrong or nonsensical.
Possible causes and fix:
The label-file-path in the postprocess-config block of the vvas_xinfer
config JSON might point to a label file that does not match the model being used.
Verify that the label file is correct and relevant for the model — using a
mismatched label file produces incorrect class names even when inference is
working correctly.
13. Processing a specific number of frames
There are two ways to limit pipeline execution to a specific number of frames:
Option 1 — ``num-buffers`` on ``filesrc``
Set num-buffers directly on the filesrc element. For filesrc pipelines, num-buffers is accurate. For multifilesrc pipelines with raw video format inputs, Option 2 (eos-after) is the preferred way to control frame count accurately.
filesrc location=input.bgr num-buffers=<N> ! rawvideoparse ...
Option 2 — ``identity eos-after``
Insert an identity element with eos-after=<N+1> into the pipeline. To process N frames, set eos-after=N+1 — the final buffer triggers EOS and is not written to the sink. For example, to process 10 frames, use eos-after=11.
This works for both filesrc and multifilesrc pipelines, preferably placed just before the final sink element — fpsdisplaysink if present, otherwise filesink:
... ! vvas_xoverlay ! queue ! identity eos-after=<N+1> ! filesink location=output.bgr
# or
... ! vvas_xoverlay ! queue ! identity eos-after=<N+1> ! fpsdisplaysink sync=false video-sink="filesink location=output.bgr"
14. Missing metadata/overlay on some frames with vvas_xmetaaffixer (tee back-pressure)
In a tee + vvas_xmetaaffixer pipeline, some frames on the slave/overlay
branch are output without metadata (for example, missing classification labels or
bounding boxes) — typically the first few frames, until the affixer timeout
elapses. The textual/master output might look correct while the overlay branch does not.
Root cause
The tee splits a common source into a master (inference) branch and one or
more slave branches. If a slave-branch queue fills and back-pressures the
tee, the tee blocks all of its branches — including the master branch
that feeds vvas_xinfer. With no buffer arriving on the master pad, the affixer
has no metadata to attach; its timeout watchdog then fires and force-pushes the
slave buffers downstream without metadata.
This is most common with raw (uncompressed) video, where a single buffer can be
large (for example a full-resolution RGB/RGBx or NV12 frame). The default queue
byte limit (max-size-bytes, ~10 MB) can be smaller than one such buffer, so the
queue fills after a single frame and immediately back-pressures the tee.
Confirm with debug logs
Enable the vvas_xmetaaffixer logs at level 7 (cumulative — captures both
following messages):
GST_DEBUG=vvas_xmetaaffixer:7 gst-launch-1.0 ...
Two messages indicate the problem:
Timeout occured—GST_INFO(level4); thetimeoutwatchdog fired because buffers did not arrive on all sink pads within thetimeoutduration.buffer is not availale at master pad—GST_LOG(level7); the master (inference) branch has no buffer; that is, it is being starved.
Example log when the slave-branch queue back-pressures the tee:
0:00:02.003456789 1234 0xaaaabbbb INFO vvas_xmetaaffixer gstvvas_xmetaaffixer.c:timeout_func:<ma> Timeout occured
0:00:02.003457012 1234 0xaaaabbbb LOG vvas_xmetaaffixer gstvvas_xmetaaffixer.c:vvas_xmetaaffixer_process:<ma> buffer is not availale at master pad
Seeing Timeout occured together with repeated buffer is not availale at
master pad messages — and output frames missing metadata until the timeout
elapses — confirms the slave-branch queue is back-pressuring the tee.
Fix
Size the slave-branch queue so it does not back-pressure the tee. For raw
video, remove the byte cap (and, if needed, the time cap):
... ! queue max-size-bytes=0 max-size-time=0 ! ma.sink_slave_0 ...
A large finite cap such as max-size-bytes=67108864 (64 MB) works equally well.
These settings keep slave buffers queued long enough for the affixer to match them
to the master metadata within the timeout window, so all output frames are
correctly annotated.