Skip to content

Commit

Permalink
add pytorch lightning for training
Browse files Browse the repository at this point in the history
  • Loading branch information
maxin-cn committed Aug 18, 2024
1 parent 7738093 commit f6252b1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,16 @@ Latte models. For example, if you want to train the Latte model on the FaceForen
torchrun --nnodes=1 --nproc_per_node=N train_with_img.py --config ./configs/ffs/ffs_img_train.yaml
```

If you are familiar with `PyTorch Lightning`, you can also use the training script [`train_pl.py`](train_pl.py) provided by [@zhang.haojie](https://github.com/zhang-haojie),
If you are familiar with `PyTorch Lightning`, you can also use the training script [`train_pl.py`](train_pl.py) and [`train_with_img_pl.py`](train_with_img_pl.py) provided by [@zhang.haojie](https://github.com/zhang-haojie),

```bash
python train_pl.py --config ./configs/ffs/ffs_img_train.yaml
python train_pl.py --config ./configs/ffs/ffs_train.yaml
```

or

```bash
python train_with_img_pl.py --config ./configs/ffs/ffs_img_train.yaml
```

This script automatically detects available GPUs and uses distributed training.
Expand Down

0 comments on commit f6252b1

Please sign in to comment.