Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ def compute_loss(self, preds: dict, targets: dict, **kwargs) -> LossValues:
for _, _, loss_fct_name in self.loss_fcts
}

pred_tokens_all = [pl["latent_state"].z_pre_norm for pl in preds.latent if pl]
pred_tokens_all = [pl["latent_state"].z_pre_norm for pl in preds.latent if ("latent_state" in pl)]
target_tokens_all = [latent["diffusion_latent"] for latent in targets.latent if latent]
assert len(pred_tokens_all) == len(target_tokens_all), "Mismatch between predicted and target token lengths"

eta = torch.tensor(
[targets.aux_outputs["noise_level_rn"]], device=self.device, dtype=torch.float32
Expand Down
Loading