Skip to main content
Question

Model with dual input images

  • February 20, 2026
  • 3 replies
  • 93 views

Dear Team,
I am currently trying to deploy a model that takes two input images as input. I get around that I have made changes to my model(OpticalFlow based Model) and it now takes (1,6,H,W). I have written a custom DataAdapter which makes sure that the input is concatenation of two images. 
I am getting following error when deploying
 

ERROR   :axelera.runtime: Expecting 2/1 input/output arguments, but got 1/1 instead.
ERROR :axelera.app.pipe.torch: Pipeline error occurred: AXR_ERROR_INVALID_ARGUMENT: Expecting 2/1 input/output arguments, but got 1/1 instead.
ERROR :axelera.app.pipe.torch: Traceback (most recent call last):
ERROR :axelera.app.pipe.torch: File "/root/voyager-sdk/axelera/app/pipe/torch.py", line 52, in _loop
ERROR :axelera.app.pipe.torch: image, result, meta = model_pipe.inference.exec_torch(
ERROR :axelera.app.pipe.torch: File "/root/voyager-sdk/axelera/app/operators/inference.py", line 1017, in exec_torch
ERROR :axelera.app.pipe.torch: self._axr_modeli.run(inputs, outputs)
ERROR :axelera.app.pipe.torch: File "/root/.cache/axelera/venvs/295e682e/lib/python3.10/site-packages/axelera/runtime/objects.py", line 559, in run
ERROR :axelera.app.pipe.torch: _raise_error(self.context, res.value)
ERROR :axelera.app.pipe.torch: File "/root/.cache/axelera/venvs/295e682e/lib/python3.10/site-packages/axelera/runtime/objects.py", line 83, in _raise_error
ERROR :axelera.app.pipe.torch: raise exc(f"{err}: {msg}")
ERROR :axelera.app.pipe.torch: axelera.runtime.objects.InvalidArgument: AXR_ERROR_INVALID_ARGUMENT: Expecting 2/1 input/output arguments, but got 1/1 instead.
DEBUG :axelera.app.stream: Pipeline my-custom-model implicit _PIPELINE_REMOVED
DEBUG :axelera.app.stream: Emitting my-custom-model: PIPELINE_REMOVED
DEBUG :axelera.app.stream: Got my-custom-model: PIPELINE_REMOVED
Core Temp : 0.0°C
CPU % : 27.2%
End-to-end : 0.0fps
Latency : 0.0ms (min:inf max:-inf σ:0.0 x̄:0.0)ms
DEBUG :axelera.app.stream: Stream stop requested
ERROR :axelera.app.utils: Traceback (most recent call last):
ERROR :axelera.app.utils: File "/root/voyager-sdk/axelera/app/utils.py", line 692, in run
ERROR :axelera.app.utils: super().run()
ERROR :axelera.app.utils: File "/root/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 953, in run
ERROR :axelera.app.utils: self._target(*self._args, **self._kwargs)
ERROR :axelera.app.utils: File "/root/voyager-sdk/axelera/app/pipe/torch.py", line 52, in _loop
ERROR :axelera.app.utils: image, result, meta = model_pipe.inference.exec_torch(
ERROR :axelera.app.utils: File "/root/voyager-sdk/axelera/app/operators/inference.py", line 1017, in exec_torch
ERROR :axelera.app.utils: self._axr_modeli.run(inputs, outputs)
ERROR :axelera.app.utils: File "/root/.cache/axelera/venvs/295e682e/lib/python3.10/site-packages/axelera/runtime/objects.py", line 559, in run
ERROR :axelera.app.utils: _raise_error(self.context, res.value)
ERROR :axelera.app.utils: File "/root/.cache/axelera/venvs/295e682e/lib/python3.10/site-packages/axelera/runtime/objects.py", line 83, in _raise_error
ERROR :axelera.app.utils: raise exc(f"{err}: {msg}")
ERROR :axelera.app.utils: axelera.runtime.objects.InvalidArgument: AXR_ERROR_INVALID_ARGUMENT: Expecting 2/1 input/output arguments, but got 1/1 instead.


the yaml i am using

axelera-model-format: 1.0.0
name: my-custom-model
description: Custom Model

pipeline:
- inference:
model_name: model2
input:
type: image

models:
model2:
class: CustomAxPytorchModelWithPreprocess
class_path: /root/voyager-sdk/ax_models/custom/simplest_torch.py
weight_path: /root/voyager-sdk/ax_models/custom/mymodel.pth
task_category: DepthEstimation
input_tensor_layout: NCHW
input_tensor_shape: [1, 6, 128, 128]
input_color_format: RGB
dataset: Custom-Sintel-Pairs
# Use extra_kwargs to pass compiler configuration
extra_kwargs:
compilation_config:
enable_icr: false
enable_swicr: false
save_error_artifact: true
trace_tvm_passes: true

datasets:
Custom-Sintel-Pairs:
class: ConsecutiveImagePairAdapter
class_path: /root/voyager-sdk/ax_models/custom/dataadpter.py
data_dir_name: /root/voyager-sdk/data/
cal_data: sintel_resized
val_data: sintel_resized

 

3 replies

Spanner
Axelera Team
Forum|alt.badge.img+3
  • Axelera Team
  • February 23, 2026

Hey ​@dev.manek, nice approach for a dual-input! 

Looks like the error is telling you the compiled model still thinks it has 2 inputs, even though your YAML says otherwise?

Can you inspect it and verify the ONNX graph actually has a single input node of shape (1, 6, H, W)? Neutron might help with that. If that checks out, we can dig deeper. 👍


  • Author
  • Cadet
  • February 24, 2026

Hi ​@Spanner , I made it go away by changing my actual model and adding a Conv

This is the new error i am getting

 

./inference.py t1-edgeflownet-pytorch 856480-sd_640_338_25fps.mp4 --pipe torch-aipu  --
no-display -v
2026-02-24 08:41:09.315591972 [W:onnxruntime:Default, device_discovery.cc:164 DiscoverDevicesForPlatform] GPU device discovery failed: device_discovery.cc:89 ReadFileContents Failed to open file: "/sys/class/drm/card1/device/vendor"
WARNING :axelera.app.utils: Failed to get OpenCL platforms : clGetPlatformIDs failed: PLATFORM_NOT_FOUND_KHR
WARNING :axelera.app.utils: Please check the documentation for installation instructions
DEBUG :axelera.app.device_manager: Using device metis-1:3:0
DEBUG :axelera.app.network: Create network from ax_models/custom/t1-edgeflownet-pytorch.yaml
INFO :axelera.app.network: Restricting model2 to 1 core(s) because running pipe torch-aipu.
DEBUG :axelera.app.network: ~<any-user>/.cache/axelera/ not found in path /root/voyager-sdk/ax_models/custom/edgeflownet.pth
DEBUG :axelera.app.device_manager: Reconfiguring devices with device_firmware=1, mvm_utilisation_core_0=100%, clock_profile_core_0=800MHz
DEBUG :axelera.app.pipe.manager:
DEBUG :axelera.app.pipe.manager: --- EXECUTION VIEW ---
DEBUG :axelera.app.pipe.manager: Input
DEBUG :axelera.app.pipe.manager: └─inference
DEBUG :axelera.app.pipe.manager:
DEBUG :axelera.app.pipe.manager: --- RESULT VIEW ---
DEBUG :axelera.app.pipe.manager: Input
DEBUG :axelera.app.pipe.manager: └─inference
DEBUG :axelera.app.pipe.manager: Network type: NetworkType.SINGLE_MODEL
DEBUG :axelera.app.network: Import model of type CustomAxPytorchModelWithPreprocess from /root/voyager-sdk/ax_models/custom/simplest_torch.py
DEBUG :axelera.app.network: Instantiate model: model2
DEBUG :axelera.app.network: Imported DataAdapter ConsecutiveImagePairAdapter from /root/voyager-sdk/ax_models/custom/dataadpter.py

[DEBUG] Init successful. Output: debug_flow.avi
DEBUG :axelera.app.network: No pipeline specified in YAML file. Default to user-provided 'preprocess' method instead
DEBUG :axelera.app.pipe.io: New source 0: 856480-sd_640_338_25fps.mp4 (VIDEO_FILE)
DEBUG :axelera.app.pipe.io: FPS of 856480-sd_640_338_25fps.mp4: 25
INFO :axelera.app.torch_utils: Using CPU based torch
DEBUG :axelera.app.pipe.io: Create image generator from VideoCapture
DEBUG :axelera.app.operators.inference: Loaded model : /root/voyager-sdk/build/t1-edgeflownet-pytorch/model2/1/model.json
DEBUG :axelera.app.display: System memory: 837.05 MB axelera: 397.66 MB, vms = 2119.00 MB display queue size: 0
DEBUG :axelera.app.display: System memory: 831.52 MB axelera: 406.70 MB, vms = 2119.00 MB display queue size: 0
DEBUG :axelera.app.display: System memory: 811.73 MB axelera: 407.02 MB, vms = 2119.00 MB display queue size: 0

After detection

DEBUG   :axelera.app.network: No pipeline specified in YAML file. Default to user-provided 'preprocess' method instead
DEBUG :axelera.app.pipe.io: New source 0: 856480-sd_640_338_25fps.mp4 (VIDEO_FILE)
DEBUG :axelera.app.pipe.io: FPS of 856480-sd_640_338_25fps.mp4: 25
INFO :axelera.app.torch_utils: Using CPU based torch
DEBUG :axelera.app.pipe.io: Create image generator from VideoCapture
DEBUG :axelera.app.operators.inference: Loaded model : /root/voyager-sdk/build/t1-edgeflownet-pytorch/model2/1/model.json
DEBUG :axelera.app.display: System memory: 837.05 MB axelera: 397.66 MB, vms = 2119.00 MB display queue size: 0
DEBUG :axelera.app.display: System memory: 831.52 MB axelera: 406.70 MB, vms = 2119.00 MB display queue size: 0
DEBUG :axelera.app.display: System memory: 811.73 MB axelera: 407.02 MB, vms = 2119.00 MB display queue size: 0
DEBUG :axelera.app.display: System memory: 782.64 MB axelera: 408.47 MB, vms = 2119.00 MB display queue size: 0
DEBUG :axelera.app.display: System memory: 755.77 MB axelera: 408.47 MB, vms = 2119.00 MB display queue size: 0
DEBUG :axelera.app.display: System memory: 732.95 MB axelera: 408.58 MB, vms = 2119.00 MB display queue size: 0
DEBUG :axelera.app.display: System memory: 712.94 MB axelera: 408.58 MB, vms = 2119.00 MB display queue size: 0
DEBUG :axelera.app.stream: Pipeline t1-edgeflownet-pytorch implicit _PIPELINE_REMOVED
DEBUG :axelera.app.stream: Emitting t1-edgeflownet-pytorch: PIPELINE_REMOVED
DEBUG :axelera.app.stream: Got t1-edgeflownet-pytorch: PIPELINE_REMOVED
Core Temp : 33.0°C
Core d0.0 Temp : 33.0°C
Core d0.1 Temp : 31.0°C
Core d0.2 Temp : 31.0°C
Core d0.3 Temp : 32.0°C
Core d0.4 Temp : 32.0°C
CPU % : 13.5%
End-to-end : 0.0fps
Latency : 0.0ms (min:inf max:-inf σ:0.0 x̄:0.0)ms
DEBUG :axelera.app.stream: Stream stop requested


 


Spanner
Axelera Team
Forum|alt.badge.img+3
  • Axelera Team
  • February 25, 2026

Hi ​@dev.manek , nice work on adding the conv layer to sort that!

The new logs look like the pipeline is starting up but exiting silently with 0fps. No crash, just stops.

Is `debug_flow.avi` being written? If it's empty or missing, I guess that means no frames made it through at all?