Instructions to use leapshared/Redox_200epi_subtask_pi052 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LeRobot
How to use leapshared/Redox_200epi_subtask_pi052 with LeRobot:
- Notebooks
- Google Colab
- Kaggle
Download pi052_embed_prefix.patch from leapshared/Redox_200epi_subtask_pi052: direct link, hf CLI and curl.
- Browser
- Download file 977 Bytes
-
https://huggingface.co/leapshared/Redox_200epi_subtask_pi052/resolve/main/pi052_embed_prefix.patch
- Command line
-
hf download hf://leapshared/Redox_200epi_subtask_pi052/pi052_embed_prefix.patch
-
curl -L -o pi052_embed_prefix.patch https://huggingface.co/leapshared/Redox_200epi_subtask_pi052/resolve/main/pi052_embed_prefix.patch
977 Bytes
| diff --git a/src/lerobot/policies/pi052/modeling_pi052.py b/src/lerobot/policies/pi052/modeling_pi052.py | |
| index 1a57dc4..b0ec5c5 100644 | |
| --- a/src/lerobot/policies/pi052/modeling_pi052.py | |
| +++ b/src/lerobot/policies/pi052/modeling_pi052.py | |
| class PI05Pytorch(PI05PytorchBase): # see openpi `PI0Pytorch` | |
| finally: | |
| self._lang_causal_marks = None | |
| - def embed_prefix(self, images, img_masks, tokens, masks): | |
| - prefix_embs, prefix_pad, prefix_att = super().embed_prefix(images, img_masks, tokens, masks) | |
| + def embed_prefix(self, images, img_masks, tokens, masks, states=None, state_masks=None): | |
| + prefix_embs, prefix_pad, prefix_att = super().embed_prefix( | |
| + images, img_masks, tokens, masks, states, state_masks | |
| + ) | |
| marks = getattr(self, "_lang_causal_marks", None) | |
| if marks is not None: | |
| prefix_att = _apply_causal_language_marks(prefix_att, marks.to(prefix_att.device)) | |