# Training from scratch
## 1. Train generative models (CFM, Diffuser) with:

Maze2d (Conditional Flow Matching):

```
python scripts/train.py --config config.maze2d --dataset maze2d-large-v1 --method cfm
```

Maze2d (Diffuser):

```
python scripts/train.py --config config.maze2d --dataset maze2d-large-v1 --method base
```

Locomotion:

```
python scripts/train.py --dataset walker2d-medium-expert-v2
```

```
python scripts/train_values.py --dataset walker2d-medium-expert-v2
```



## 2. Planing:

Maze2d (Conditional Flow Matching):

```
python scripts/plan_maze2d.py --config config.maze2d --dataset maze2d-large-v1 --logbase logs --method cfm
```

Maze2d (Diffuser):

```
python scripts/plan_maze2d.py --config config.maze2d --dataset maze2d-large-v1 --logbase logs --method base
```

Locomotion:

```
python scripts/plan_guided.py --dataset walker2d-medium-expert-v2 --logbase logs
```



# Acknowledgements
This codes are based on Michael Janner's diffuser repo: https://github.com/jannerm/diffuser
and
Xiao's SafeDiffuser repo: https://github.com/Weixy21/SafeDiffuser
