kohya-ss / kohya-ss/sd-scripts

Lora train_network.py doesn’t exchange parameter in DDP multi-node

Open
#376 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
7.2k
Forks
1.2k
Avg merge
11m
Merged PRs (30d)
2

Description

When I launching the LORA train_network.py in accelerate mode , and i using iftop monitor the network package .

I find the model parameters don’t exchange each node when training ,only exchange the frozen model of 3G at the beginning.

and i use derrian-distro/LoRA_Easy_Training_Scripts to launch

When training is completed, the training effect of training 5 photos on a single machine is the same as training 10 photos on two machines. However, the effect of training 10 photos on a single machine is clearly better than both.

Thank you for any help provided!

This is my Accelerate config

Node 1

```
compute_environment: LOCAL_MACHINE
deepspeed_config: {}
distributed_type: MULTI_GPU
downcast_bf16: 'no'
dynamo_backend: 'NO'
fsdp_config: {}
gpu_ids: all
machine_rank: 0
main_process_ip: 192.168.1.3
main_process_port: 29500
main_training_function: main
megatron_lm_config: {}
mixed_precision: 'no'
num_machines: 2
num_processes: 2
rdzv_backend: static
same_network: true
tpu_env: []
tpu_use_cluster: false
tpu_use_sudo: false
use_cpu: false
```
Node 2

```
compute_environment: LOCAL_MACHINE
deepspeed_config: {}
distributed_type: MULTI_GPU
downcast_bf16: 'no'
dynamo_backend: 'NO'
fsdp_config: {}
gpu_ids: all
machine_rank: 0
main_process_ip: 192.168.1.3
main_process_port: 29500
main_training_function: main
megatron_lm_config: {}
mixed_precision: 'no'
num_machines: 2
num_processes: 2
rdzv_backend: static
same_network: true
tpu_env: []
tpu_use_cluster: false
tpu_use_sudo: false
use_cpu: false
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with train_network.py and the supplied Accelerate multi-node configuration, checking how distributed training is initialized and how parameter exchange is expected to occur. Reproduce the two-node run while monitoring network traffic and compare its training result with single-node runs; done means the synchronization behavior and any required configuration or code change are identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.