lshzhm commited on
Commit
53593c1
·
1 Parent(s): 84388f3
src/e2_tts_pytorch/e2_tts_crossatt3.py CHANGED
@@ -1540,9 +1540,11 @@ class E2TTS(Module):
1540
  x = self.video2roll_net(x)
1541
  x = nn.Sigmoid()(x)
1542
  #print("x output", x.shape) # [251, 51]
1543
- ####x = x.reshape(b, t, 1, NOTES).repeat(1,1,3,1).reshape(b, t*3, NOTES)
1544
- t5 = (t*5//2)*2
1545
- x = x.reshape(b, t, 1, NOTES).repeat(1,1,5,1).reshape(b, t*5, NOTES)[:,:t5,:].reshape(b, t5//2, 2, NOTES).mean(2)
 
 
1546
  b, d, _ = x.shape
1547
 
1548
  #print("encode_frames", x.shape, l)
@@ -1926,8 +1928,8 @@ class E2TTS(Module):
1926
  if max_sample is None:
1927
  max_sample = int(duration * 24000)
1928
 
1929
- ####video_multi = 3.0
1930
- video_multi = 2.5
1931
 
1932
  interpolated_frames_raw = []
1933
  frame_size_video = int(video_multi*320)
 
1540
  x = self.video2roll_net(x)
1541
  x = nn.Sigmoid()(x)
1542
  #print("x output", x.shape) # [251, 51]
1543
+
1544
+ ####video_multi
1545
+ x = x.reshape(b, t, 1, NOTES).repeat(1,1,3,1).reshape(b, t*3, NOTES)
1546
+ ####t5 = (t*5//2)*2
1547
+ ####x = x.reshape(b, t, 1, NOTES).repeat(1,1,5,1).reshape(b, t*5, NOTES)[:,:t5,:].reshape(b, t5//2, 2, NOTES).mean(2)
1548
  b, d, _ = x.shape
1549
 
1550
  #print("encode_frames", x.shape, l)
 
1928
  if max_sample is None:
1929
  max_sample = int(duration * 24000)
1930
 
1931
+ video_multi = 3.0
1932
+ ####video_multi = 2.5
1933
 
1934
  interpolated_frames_raw = []
1935
  frame_size_video = int(video_multi*320)
src/e2_tts_pytorch/e2_tts_crossatt3_2.py CHANGED
@@ -1540,6 +1540,8 @@ class E2TTS(Module):
1540
  x = self.video2roll_net(x)
1541
  x = nn.Sigmoid()(x)
1542
  #print("x output", x.shape) # [251, 51]
 
 
1543
  ####x = x.reshape(b, t, 1, NOTES).repeat(1,1,3,1).reshape(b, t*3, NOTES)
1544
  t5 = (t*5//2)*2
1545
  x = x.reshape(b, t, 1, NOTES).repeat(1,1,5,1).reshape(b, t*5, NOTES)[:,:t5,:].reshape(b, t5//2, 2, NOTES).mean(2)
 
1540
  x = self.video2roll_net(x)
1541
  x = nn.Sigmoid()(x)
1542
  #print("x output", x.shape) # [251, 51]
1543
+
1544
+ ####video_multi
1545
  ####x = x.reshape(b, t, 1, NOTES).repeat(1,1,3,1).reshape(b, t*3, NOTES)
1546
  t5 = (t*5//2)*2
1547
  x = x.reshape(b, t, 1, NOTES).repeat(1,1,5,1).reshape(b, t*5, NOTES)[:,:t5,:].reshape(b, t5//2, 2, NOTES).mean(2)