conda create -n adapt2act python=3.9
conda activate adapt2act
pip install pip==21.0 wheel==0.38.0 setuptools==65.5.0 # specified gym version requires these tools to be old
pip install -r requirements.txtgit clone https://github.com/facebookresearch/eai-vc.git
cd eai-vc
pip install -e ./vc_modelsPlease follow the same instruction in TADPoLe to customize configurations for Dog and Humanoid environments.
Please put checkpoints/ under the adapt2act/ folder, and the directory should have the following structure:
adapt2act/
└── checkpoints/
├── animatediff_finetuned/
│ ├── {domain}_finetuned.ckpt
│ └── ...
├── in_domain/
│ ├── {domain}/
│ ├── {domain}_suboptimal/
│ └── ...
├── dreambooth/
│ ├── {domain}_lora/
│ └── ...
└── inv_dyn.ckpt
We currently support three domains: Metaworld mw, Humanoid humanoid and Dog dog. The model checkpoints can be downloaded here.
Tip
To enable wandb logging, enter your wandb entity in cfgs/default.yaml and add use_wandb=True to the commands below
Vanilla AnimateDiff
python src/vidtadpole_train.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
avdc_prompt="door close" \
seed=0 \
use_dreambooth=False \
use_finetuned=FalseDirect Finetuning
python src/vidtadpole_train.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
avdc_prompt="door close" \
seed=0 \
use_dreambooth=False \
use_finetuned=TrueSubject Customization
python src/vidtadpole_train.py task="metaworld-door-close" \
text_prompt="a [D] robot arm closing a door" \
avdc_prompt="door close" \
seed=0 \
use_dreambooth=True \
use_finetuned=FalseProbabilistic Adaptation
python src/vidtadpole_train_probadap.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
avdc_prompt="door close" \
seed=0 \
prior_strength=0.1 \
inverted_probadap=FalseInverse Probabilistic Adaptation
python src/vidtadpole_train_probadap.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
avdc_prompt="door close" \
seed=0 \
prior_strength=0.1 \
inverted_probadap=TrueVanilla AnimateLCM
python src/vidtadpole_train_lcm.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
avdc_prompt="door close" \
seed=0 \
use_dreambooth=False \
use_finetuned=FalseProbabilistic Adaptation
python src/vidtadpole_train_lcm_probadap.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
avdc_prompt="door close" \
seed=0 \
prior_strength=0.1 \
inverted_probadap=FalseInverse Probabilistic Adaptation
python src/vidtadpole_train_lcm_probadap.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
avdc_prompt="door close" \
seed=0 \
prior_strength=0.2 \
inverted_probadap=Truepython src/vidtadpole_train_probadap.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
avdc_prompt="door close" \
seed=0 \
prior_strength=0 \
inverted_probadap=FalseVanilla AnimateDiff
python src/visual_planning.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
seed=0 \
guidance_scale=7.5 \
plan_with_probadap=False \
plan_with_dreambooth=False \
plan_with_finetuned=FalseDirect Finetuning
python src/visual_planning.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
seed=0 \
guidance_scale=8 \
plan_with_probadap=False \
plan_with_dreambooth=False \
plan_with_finetuned=TrueSubject Customization
python src/visual_planning.py task="metaworld-door-close" \
text_prompt="a [D] robot arm closing a door" \
seed=0 \
guidance_scale=7.5 \
plan_with_probadap=False \
plan_with_dreambooth=True \
plan_with_finetuned=FalseProbabilistic Adaptation
python src/visual_planning.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
seed=0 \
guidance_scale=2.5 \
plan_with_probadap=True \
plan_with_dreambooth=False \
plan_with_finetuned=False \
prior_strength=0.1 \
inverted_probadap=FalseInverse Probabilistic Adaptation
python src/visual_planning.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
seed=0 \
guidance_scale=2.5 \
plan_with_probadap=True \
plan_with_dreambooth=False \
plan_with_finetuned=False \
prior_strength=0.5 \
inverted_probadap=TrueVanilla AnimateLCM
python src/visual_planning_lcm.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
seed=0 \
guidance_scale=2.5 \
plan_with_probadap=False \
plan_with_dreambooth=False \
plan_with_finetuned=FalseProbabilistic Adaptation
python src/visual_planning_lcm.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
seed=0 \
guidance_scale=2.5 \
plan_with_probadap=True \
plan_with_dreambooth=False \
plan_with_finetuned=False \
prior_strength=0.1 \
inverted_probadap=FalseInverse Probabilistic Adaptation
python src/visual_planning_lcm.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
seed=0 \
guidance_scale=2.5 \
plan_with_probadap=True \
plan_with_dreambooth=False \
plan_with_finetuned=False \
prior_strength=0.2 \
inverted_probadap=Truepython src/visual_planning.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
seed=0 \
guidance_scale=2.5 \
plan_with_probadap=True \
plan_with_dreambooth=False \
plan_with_finetuned=False \
prior_strength=0 \
inverted_probadap=FalseIn-Domain-Only
python src/visual_planning.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
seed=0 \
guidance_scale=2.5 \
plan_with_probadap=True \
plan_with_dreambooth=False \
plan_with_finetuned=False \
prior_strength=0 \
inverted_probadap=False \
use_suboptimal=TrueProbabilistic Adaptation
python src/visual_planning.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
seed=0 \
guidance_scale=2.5 \
plan_with_probadap=True \
plan_with_dreambooth=False \
plan_with_finetuned=False \
prior_strength=0.1 \
inverted_probadap=False \
use_suboptimal=TrueInverse Probabilistic Adaptation
python src/visual_planning.py task="metaworld-door-close" \
text_prompt="a robot arm closing a door" \
seed=0 \
guidance_scale=2.5 \
plan_with_probadap=True \
plan_with_dreambooth=False \
plan_with_finetuned=False \
prior_strength=0.5 \
inverted_probadap=True \
use_suboptimal=TrueIf you find this repository helpful, please consider citing our work:
@inproceedings{luo2024solving,
title={Solving New Tasks by Adapting Internet Video Knowledge},
author={Luo, Calvin and Zeng, Zilai and Du, Yilun and Sun, Chen},
booktitle={The Thirteenth International Conference on Learning Representations},
year={2025}
}This repo contains code adapted from flowdiffusion, TDMPC and TADPoLe. We thank the authors and contributors for open-sourcing their code.