Skip to content

Commit c32991c

Browse files
committed
expanded context window to 16384
1 parent 303d446 commit c32991c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

modules/diffusion_transformer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def __init__(
106106
self.style_as_token = args.DiT.style_as_token if hasattr(args.DiT, 'style_as_token') else False
107107
self.uvit_skip_connection = args.DiT.uvit_skip_connection if hasattr(args.DiT, 'uvit_skip_connection') else False
108108
model_args = ModelArgs(
109-
block_size=8192,#args.DiT.block_size,
109+
block_size=16384,#args.DiT.block_size,
110110
n_layer=args.DiT.depth,
111111
n_head=args.DiT.num_heads,
112112
dim=args.DiT.hidden_dim,
@@ -139,7 +139,7 @@ def __init__(
139139
# self.style_embedder1 = weight_norm(nn.Linear(1024, args.DiT.hidden_dim, bias=True))
140140
# self.style_embedder2 = weight_norm(nn.Linear(1024, args.style_encoder.dim, bias=True))
141141

142-
input_pos = torch.arange(8192)
142+
input_pos = torch.arange(16384)
143143
self.register_buffer("input_pos", input_pos)
144144

145145
self.conv1 = nn.Linear(args.DiT.hidden_dim, args.wavenet.hidden_dim)

modules/flow_matching.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
from modules.diffusion_transformer import DiT
77
from modules.commons import sequence_mask
88

9+
from tqdm import tqdm
10+
911
class BASECFM(torch.nn.Module, ABC):
1012
def __init__(
1113
self,
@@ -76,7 +78,7 @@ def solve_euler(self, x, x_lens, prompt, mu, style, f0, t_span, inference_cfg_ra
7678
x[..., :prompt_len] = 0
7779
if self.zero_prompt_speech_token:
7880
mu[..., :prompt_len] = 0
79-
for step in range(1, len(t_span)):
81+
for step in tqdm(range(1, len(t_span))):
8082
dphi_dt = self.estimator(x, prompt_x, x_lens, t.unsqueeze(0), style, mu, f0)
8183
# Classifier-Free Guidance inference introduced in VoiceBox
8284
if inference_cfg_rate > 0:

0 commit comments

Comments
 (0)