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/offline_learning.md from hchen657Naza/PWM: direct link, hf CLI and curl.
- Browser
- Download file 1.27 kB
-
https://huggingface.co/hchen657Naza/PWM/resolve/main/PWM_code/RISE_aux/docs/offline_learning.md
- Command line
-
hf download hf://hchen657Naza/PWM/PWM_code/RISE_aux/docs/offline_learning.md
-
curl -L -o offline_learning.md https://huggingface.co/hchen657Naza/PWM/resolve/main/PWM_code/RISE_aux/docs/offline_learning.md
1.27 kB
Offline Policy Training and Value Model
Run all below commands from policy_and_value/policy_offline_and_value.
Available Release Configs
The release registers these config names in src/openpi_value/training/config.py:
Policy_offline_releasevalue_releaseCompute_norm
Compute Normalization Stats
python scripts/compute_norm_stats_fast.py --config-name Compute_norm
Train Policy or Value Models
# usage: bash train.sh <CONFIG_NAME> <NUM_GPUS> [extra args]
bash train.sh Policy_offline_release 8
bash train.sh value_release 8
Resume example:
bash train.sh Policy_offline_release 8 --resume
Label Per-frame Value Predictions with the Value Model
Labeling value and advantage for lerobot datasets using learned value model.
This step is required for both offline and online policy improvement with advantage conditioning.
# usage: bash label_value.sh <CONFIG_NAME> <CKPT_DIR>
bash label_value.sh vis_value_release_joint_T /path/to/checkpoints/value_release_joint/<exp>/<step>
Visualize Value Predictions
# usage: bash vis_value.sh <CONFIG_NAME> <CKPT_DIR>
bash vis_value.sh vis_value_release_joint_T /path/to/checkpoints/value_release_joint/<exp>/<step>