Skip to content

Commit

Permalink
deepspeed: resolve error for multinode (fix for FA3)
Browse files Browse the repository at this point in the history
  • Loading branch information
bghira committed Oct 10, 2024
1 parent cfa6c6e commit 390d43a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions helpers/training/diffusion_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ def load_diffusion_model(args, weight_dtype):
import torch

if torch.cuda.is_available():
rank = (
torch.distributed.get_rank()
if torch.distributed.is_initialized()
else 0
)
primary_device = torch.cuda.get_device_properties(0)
if primary_device.major >= 9:
try:
Expand Down

0 comments on commit 390d43a

Please sign in to comment.