File size: 1,211 Bytes
70651b8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# folding-final-handler

Custom HuggingFace Inference Endpoint handler that serves the
[`lerobot-data-collection/folding_final`](https://huggingface.co/lerobot-data-collection/folding_final)
π₀.₅ policy for bimanual OpenArm cloth-folding.

Weights are *not* duplicated into this repo — `handler.py` pulls them
from the upstream repo at container cold-start via
`huggingface_hub.snapshot_download`.

## Wire format

POST JSON to the endpoint URL with header `Authorization: Bearer hf_…`:

```json
{
  "inputs": {
    "images": {
      "left_wrist":  "<base64 JPEG>",
      "right_wrist": "<base64 JPEG>",
      "base":        "<base64 JPEG>"
    },
    "state": [16 floats],
    "prompt": "fold the towel"
  }
}
```

Response:

```json
{
  "actions": [[16 floats] × 30],
  "chunk_len": 30,
  "action_dim": 16,
  "action_feature_names": ["right_joint_1.pos", ..., "left_gripper.pos"]
}
```

State + action layout matches
`folding_final.config.action_feature_names`: right joints 1–7, right
gripper, left joints 1–7, left gripper.

## Why this repo exists

To keep the deployed endpoint code under our control without duplicating
~8 GB of safetensors. handler.py is the only thing that ever changes.