Training image size - Evaluating different sizes and models

Hi, first of all thanks for an awesome tool and community!

I have just trained a custom model on ~20k images with a resolution of 1280 × 960 pixels with a configuration based on yolov5l6.yaml

python3 yolov5/train.py --img 1280 --batch 8 --epochs 100 --cfg models/yolov5l6.yaml --data data/data.yaml --hyp hyp/hyp.scratch-med-custom.yaml  --cache

It gives me a great model which performs very well but a bit slow, and I would now like to explore smaller/simpler models.

Either by going to a medium/small/nano version of the P6 model, or by using a P5 model.

My question is: do I need to manually resize my images to 640x640 to efficiently train a P5model (e.g. based on yolov5m.yaml), or can I simply pass the desired image size as a parameter to train.py?

Thanks and best wishes,
Jakob