CreamyLong / stable-diffusion

Speechless at the original stable-diffusion
https://github.com/CompVis/stable-diffusion/tree/main
72 stars 12 forks source link

Multi-nodes training #7

Closed weixuansun closed 5 months ago

weixuansun commented 6 months ago

Hi, thanks for this amazing repo. I wonder could you share the command for training on multiple gpu nodes?

CreamyLong commented 6 months ago

I do not think it is necessary to train this model in multiple nodes.

If you mean training the model on several GPUs, this script help you.

python main.py --base configs/custom_vqgan.yaml -t True --gpus "0,1"

This helps you train in multiple GPUs on one node.

weixuansun commented 6 months ago

Thank you for the quick answer. I am trying to train on my own large dataset, so I want to use multi nodes. Any hint on how to achieve that?

CreamyLong commented 6 months ago

This link includes the arguments for training, you can give it a try.

https://lightning.ai/docs/pytorch/1.4.2/common/trainer.html?highlight=num_nodes#pytorch_lightning.trainer.Trainer.params.num_nodes

mwmw7 commented 6 months ago

I do not think it is necessary to train this model in multiple nodes.

If you mean training the model on several GPUs, this script help you.

python main.py --base configs/custom_vqgan.yaml -t True --gpus 0,1

This helps you train in multiple GPUs on one node.

I think you should use gpu id as string --gpus "0,1"