Skip to content

[Train] Support DP in training#1193

Open
Musisoul wants to merge 4 commits into
mainfrom
train_dp
Open

[Train] Support DP in training#1193
Musisoul wants to merge 4 commits into
mainfrom
train_dp

Conversation

@Musisoul

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for Data Parallel (DDP) training, including a new configuration and script for Qwen Image LoRA training, a custom LightX2VDistributedDataParallel wrapper, and integration into the base and DMD trainers. The code review identified several critical and high-severity issues in the DDP wrapper implementation: overriding class breaks isinstance checks in is_ddp_module (disabling proper gradient synchronization), and accessing non-standard attributes like find_unused_parameters on the DDP instance will cause runtime crashes. Additionally, the review suggests improving the robustness of attribute access and delegation in the wrapper by avoiding fragile super().getattr('module') calls and generalizing setattr beyond the hardcoded block_mask attribute.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread lightx2v_train/lightx2v_train/runtime/ddp.py
Comment thread lightx2v_train/lightx2v_train/runtime/ddp.py
Comment thread lightx2v_train/lightx2v_train/runtime/ddp.py
Comment thread lightx2v_train/lightx2v_train/runtime/ddp.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant