Skip to content

Async Inference Runtime Error when running pi0.5 policy server on GPU device and robot_client on CPU device#2137

Description

@Llkhhb

I tried to run policy server on GPU device, and robot client on CPU device, I got error below:

INFO 2025-10-08 08:47:20 a_opencv.py:179 OpenCVCamera(1) connected.
INFO 2025-10-08 08:47:22 a_opencv.py:179 OpenCVCamera(2) connected.
INFO 2025-10-08 08:47:22 follower.py:104 follower_arm SO101Follower connected.
WARNING 2025-10-08 08:47:22 ils\utils.py:47 No accelerated backend detected. Using default cpu, this will be slow.
WARNING 2025-10-08 08:47:22 \policies.py:81 Device 'cuda' is not available. Switching to 'cpu'.
WARNING 2025-10-08 08:47:22 ils\utils.py:47 No accelerated backend detected. Using default cpu, this will be slow.
WARNING 2025-10-08 08:47:22 \policies.py:81 Device 'cuda' is not available. Switching to 'cpu'.
INFO 2025-10-08 08:47:22 t_client.py:123 Initializing client to connect to server at
INFO 2025-10-08 08:47:22 t_client.py:142 Robot connected and ready
INFO 2025-10-08 08:47:23 t_client.py:165 Sending policy instructions to policy server
INFO 2025-10-08 08:47:52 t_client.py:488 Starting action receiver thread...
INFO 2025-10-08 08:47:52 t_client.py:456 Control loop thread starting
INFO 2025-10-08 08:47:52 t_client.py:282 Action receiving thread starting
Exception in thread Thread-1 (receive_actions):
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2800.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 1075, in _bootstrap_inner
self.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2800.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 1012, in run
self._target(*self._args, **self._kwargs)
File "C:\Projects\lerobot_pi05\lerobot\src\lerobot\async_inference\robot_client.py", line 295, in receive_actions
timed_actions = pickle.loads(actions_chunk.data) # nosec
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Projects\lerobot_pi05\lerobot_env05\Lib\site-packages\torch\storage.py", line 530, in _load_from_bytes
return torch.load(io.BytesIO(b), weights_only=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Projects\lerobot_pi05\lerobot_env05\Lib\site-packages\torch\serialization.py", line 1549, in load
return _legacy_load(
^^^^^^^^^^^^^
File "C:\Projects\lerobot_pi05\lerobot_env05\Lib\site-packages\torch\serialization.py", line 1807, in _legacy_load
result = unpickler.load()
^^^^^^^^^^^^^^^^
File "C:\Projects\lerobot_pi05\lerobot_env05\Lib\site-packages\torch\serialization.py", line 1742, in persistent_load
obj = restore_location(obj, location)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Projects\lerobot_pi05\lerobot_env05\Lib\site-packages\torch\serialization.py", line 698, in default_restore_location
result = fn(storage, location)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Projects\lerobot_pi05\lerobot_env05\Lib\site-packages\torch\serialization.py", line 636, in _deserialize
device = _validate_device(location, backend_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Projects\lerobot_pi05\lerobot_env05\Lib\site-packages\torch\serialization.py", line 605, in _validate_device
raise RuntimeError(
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn鈥檛 working correctlypythonPull requests that update python coderobotsIssues concerning robots HW interfaces

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions