fix: bypass gloo DDP for Windows single-GPU training#2744
Open
fanfan-love-meatmeat wants to merge 2 commits intoRVC-Boss:mainfrom
Open
fix: bypass gloo DDP for Windows single-GPU training#2744fanfan-love-meatmeat wants to merge 2 commits intoRVC-Boss:mainfrom
fanfan-love-meatmeat wants to merge 2 commits intoRVC-Boss:mainfrom
Conversation
On Windows with a single GPU, dist.init_process_group() using the gloo backend frequently fails with 'unsupported gloo device', caused by virtual network adapters (VPN, VMware, Hyper-V, etc.). Changes: - s2_train.py: skip dist.init_process_group() on Windows single-GPU; add DummyDDP wrapper to maintain .module interface compatibility - s1_train.py: set USE_LIBUV=0 to avoid socket conflicts; use strategy='auto' for single-GPU (bypasses gloo entirely), DDPStrategy only activated for multi-GPU setups - utils.py, bucket_sampler.py: related compatibility adjustments Tested on: Windows 11, single NVIDIA GPU, Python 3.10, PyTorch 2.5
…train_v3_lora Extend the fix to v3 and LoRA training scripts: - s2_train_v3.py: skip dist.init_process_group() + DummyDDP for Windows single-GPU - s2_train_v3_lora.py: same fix applied to LoRA fine-tuning script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Windows with a single GPU,
dist.init_process_group()using thegloobackend fails with:RuntimeError: unsupported gloo device
This is caused by virtual network adapters (VPN, VMware, Hyper-V, etc.) interfering with gloo's network interface detection.
Solution
Skip DDP initialization entirely for Windows single-GPU setups, rather than patching gloo environment variables.
Changes
dist.init_process_group()on Windows single-GPU; addDummyDDPwrapper to maintain.moduleinterface compatibilityUSE_LIBUV=0to avoid socket conflicts; usestrategy='auto'for single-GPU (bypasses gloo entirely)Tested on