Skip to content

Commit

Permalink
Merge pull request IAHispano#702 from AznamirWoW/strides_fix
Browse files Browse the repository at this point in the history
added a check to wrap models in DDP only where there's an actual need…
  • Loading branch information
blaisewf authored Sep 13, 2024
2 parents a7b3115 + c9af78f commit 98d8e2e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rvc/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,13 +474,13 @@ def run(
eps=config.train.eps,
)

# Wrap models with DDP
if device.type == "cuda":
# Wrap models with DDP for multi-gpu processing
if n_gpus > 1 and device.type == "cuda":
net_g = DDP(net_g, device_ids=[rank])
net_d = DDP(net_d, device_ids=[rank])
else:
net_g = DDP(net_g)
net_d = DDP(net_d)
#else:
# net_g = DDP(net_g)
# net_d = DDP(net_d)
# Load checkpoint if available
try:
print("Starting training...")
Expand Down

0 comments on commit 98d8e2e

Please sign in to comment.