Instructions to use hchen657Naza/PWM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use hchen657Naza/PWM with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("hchen657Naza/PWM", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
|
Download PWM_code/RISE_aux/docs/installation.md from hchen657Naza/PWM: direct link, hf CLI and curl.
- Browser
- Download file 1.91 kB
-
https://huggingface.co/hchen657Naza/PWM/resolve/main/PWM_code/RISE_aux/docs/installation.md
- Command line
-
hf download hf://hchen657Naza/PWM/PWM_code/RISE_aux/docs/installation.md
-
curl -L -o installation.md https://huggingface.co/hchen657Naza/PWM/resolve/main/PWM_code/RISE_aux/docs/installation.md
1.91 kB
| # Installation | |
| ## Environment Setup | |
| <!-- Use a dedicated Conda environment for training: --> | |
| ```bash | |
| conda create -n rise_training python=3.11.14 -y | |
| conda activate rise_training | |
| cd /path/to/RISE | |
| bash install.sh | |
| ``` | |
| For deployment setup, please refer to the [deployment README](deploy.md). | |
| ## Data Preparation | |
| The training code expects LeRobot-style data. | |
| The data is first collect on Piper in hdf5 format and then converted to the lerobot format. | |
| ### Raw Data Collection | |
| Please refer to the [data collection README](deploy.md) for details. | |
| ### Lerobot Conversion | |
| Convert raw HDF5 logs collected on Piper into LeRobot-format data with: | |
| ```bash | |
| cd /path/to/RISE/policy_and_value/policy_offline_and_value | |
| python examples/aloha_real/convert_to_lerobot.py \ | |
| --data-dir /path/to/raw_dataset \ | |
| --repo-ids aloha_mobile_dummy \ | |
| --prompt "TASK_PROMPT" \ # e.g., "Pick up the block" | |
| --save-dir /path/to/lerobot_output_root \ | |
| --save_repoid output_dataset_name \ | |
| ``` | |
| Arguments: | |
| - `--data-dir`: Root directory of one raw dataset collection. The script expects HDF5 files under `<data-dir>/<repo-id>/` and videos under `<data-dir>/<repo-id>/video/`. | |
| - `--repo-ids`: One or more raw subdirectories to convert. For most RISE data, this is `aloha_mobile_dummy`. | |
| - `--prompt`: Task description stored in the converted LeRobot dataset. | |
| - `--save-dir`: Parent directory for converted output. | |
| - `--save_repoid`: Name of the output dataset folder created under `--save-dir`. | |
| - `--overwrite`: Optional. Remove an existing output folder and regenerate it. | |
| The generated output follows the standard LeRobot layout shown below. | |
| ### Expected Lerobot Data Layout | |
| ```text | |
| <dataset_name>/ | |
| βββ data/chunk-000/episode_*.parquet | |
| βββ meta/ | |
| β βββ info.json | |
| β βββ episodes.jsonl | |
| β βββ episodes_stats.jsonl | |
| β βββ tasks.jsonl | |
| βββ videos/chunk-000/*.mp4 | |
| ``` | |