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/policy_wm_eval/run_eval.sh from hchen657Naza/PWM: direct link, hf CLI and curl.
- Browser
- Download file 1.23 kB
-
https://huggingface.co/hchen657Naza/PWM/resolve/main/PWM_code/policy_wm_eval/run_eval.sh
- Command line
-
hf download hf://hchen657Naza/PWM/PWM_code/policy_wm_eval/run_eval.sh
-
curl -L -o run_eval.sh https://huggingface.co/hchen657Naza/PWM/resolve/main/PWM_code/policy_wm_eval/run_eval.sh
1.23 kB
| # Run the base-policy-in-WM eval for ONE (task, WM). | |
| # The OSCAR WM server must already be running on $OSCAR_PORT (see run_server.sh). | |
| # | |
| # Usage: | |
| # TASK=open_drawer OSCAR_PORT=8819 WM_TAG=lora25_step16000 GPU=3 \ | |
| # bash run_eval.sh [extra eval_base_in_wm.py args...] | |
| set -euo pipefail | |
| HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| PY=/root/miniconda3/envs/pwm/bin/python | |
| PWM_ROOT=/root/pwm_local/PWM | |
| WM_REPO=/root/pwm_local/PWM_code/policy_rl/rl_sim/act_wm_residual_oscar | |
| EGOVLA=$PWM_ROOT/EgoVLA_Release | |
| : "${TASK:?set TASK (open_drawer|open_laptop|pour_balls|push_box|stack_can|unload_cans)}" | |
| : "${OSCAR_PORT:?set OSCAR_PORT (port of the running OSCAR WM server)}" | |
| : "${WM_TAG:?set WM_TAG (e.g. lora25_step16000 | base)}" | |
| GPU="${GPU:-3}" | |
| NUM_EPISODES="${NUM_EPISODES:-30}" | |
| OUT_DIR="${OUT_DIR:-$HERE/eval_out}" | |
| env -u VIRTUAL_ENV \ | |
| PATH=/root/miniconda3/envs/pwm/bin:$PATH \ | |
| PWM_ROOT=$PWM_ROOT \ | |
| PYTHONPATH=$HERE:$WM_REPO:$EGOVLA:${PYTHONPATH:-} \ | |
| CUDA_VISIBLE_DEVICES=$GPU \ | |
| OMNI_KIT_ACCEPT_EULA=YES HF_HUB_OFFLINE=1 \ | |
| $PY -u "$HERE/eval_base_in_wm.py" \ | |
| --task "$TASK" --oscar_port "$OSCAR_PORT" --wm_tag "$WM_TAG" \ | |
| --num_episodes "$NUM_EPISODES" --out_dir "$OUT_DIR" "$@" | |