Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nemo/collections/diffusion/models/flux/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def flux_data_step(dataloader_iter):
else:
_batch = batch

_batch['loss_mask'] = torch.Tensor([1.0]).cuda(non_blocking=True)
_batch['loss_mask'] = torch.ones(1, device="cuda")
return _batch


Expand Down Expand Up @@ -746,7 +746,7 @@ def _prepare_latent_image_ids(
batch_size, latent_image_id_height * latent_image_id_width, latent_image_id_channels
)

return latent_image_ids.to(device=device, dtype=dtype)
return latent_image_ids.to(device=device, dtype=dtype, non_blocking=True)

def _pack_latents(self, latents, batch_size, num_channels_latents, height, width):
# pylint: disable=C0116
Expand Down
Loading