DiffSynth-Studio icon indicating copy to clipboard operation
DiffSynth-Studio copied to clipboard

Regarding multi-machine multi-GPU training for FLUX kontext

Open wangjiyuan9 opened this issue 3 months ago • 1 comments

Hello, I have carefully reviewed the previous issues and found that you don't seem to plan to support single-card multi-batch training for various models. But, may I ask, can I simply replace:

accelerate launch \ examples/flux/model_training/train.py \

with

accelerate launch \ --multi_gpu \ --num_processes 3 \ --gpu_ids 5,6,7 \ --mixed_precision bf16 \ examples/flux/model_training/train.py \

to achieve multi-GPU training, and will subsequent multi-machine training also be done by directly modifying this, while ensuring the training logic is completely correct?

wangjiyuan9 avatar Oct 31 '25 02:10 wangjiyuan9

@wangjiyuan9 Yes. It is correct. If you need more fine-grained multi-GPU training features, you can use accelerate config in your terminal. If you need a larger batch size, please use --gradient_accumulation_steps xxx.

Artiprocher avatar Nov 04 '25 09:11 Artiprocher