Fix scheduler bugs (#177)

* fix scheduler bugs.

* fix
This commit is contained in:
Sayak Paul
2025-01-03 18:52:40 +05:30
committed by GitHub
parent b8352abf70
commit 071c140879
2 changed files with 11 additions and 5 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ def prepare_loss_weights(
flow_weighting_scheme: str = "none",
) -> torch.Tensor:
if isinstance(scheduler, FlowMatchEulerDiscreteScheduler):
return compute_loss_weighting_for_sd3(sigmas, weighting_scheme=flow_weighting_scheme)
return compute_loss_weighting_for_sd3(sigmas=sigmas, weighting_scheme=flow_weighting_scheme)
elif isinstance(scheduler, CogVideoXDDIMScheduler):
# SNR is computed as (alphas / (1 - alphas)), but for some reason CogVideoX uses 1 / (1 - alphas).
# TODO(aryan): Experiment if using alphas / (1 - alphas) gives better results.