Flux9665 commited on
Commit
513a2ce
·
verified ·
1 Parent(s): c7de069

Update Modules/GeneralLayers/LengthRegulator.py

Browse files
Modules/GeneralLayers/LengthRegulator.py CHANGED
@@ -58,4 +58,5 @@ class LengthRegulator(torch.nn.Module, ABC):
58
  """
59
  Repeat each frame according to duration
60
  """
 
61
  return torch.repeat_interleave(x, d, dim=0)
 
58
  """
59
  Repeat each frame according to duration
60
  """
61
+ d=torch.clamp(d, min=0)
62
  return torch.repeat_interleave(x, d, dim=0)