Skip to content

Conversation

@youliangtan
Copy link

Summary

Make it possible to run OpenPi0 as a server for external client inference.

Run

Install: pip install uvicorn fastapi json-numpy

Similar to the try_checkpoint_in_simpler.py , user can deploy the server via:

python scripts/open_pi0_server.py \
   --checkpoint_path bridge_beta_step19296_2024-12-26_22-30_42.pt --use_bf16 --use_torch_compile
import requests
import json_numpy
json_numpy.patch()
import numpy as np

action = requests.post(
    "http://0.0.0.0:8000/act",
    json={"image": np.zeros((256, 256, 3), dtype=np.uint8), "proprio"=np.zeros(7,), "instruction": "do something"}
).json()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant