(self, x: float["b n d"], cond: float["b n d"], cond_noisy: float["b n d"], text_embed: float["b n d"], drop_audio_cond=False, drop_noisy_audio_cond=False)
| 88 | self.conv_pos_embed = ConvPositionEmbedding(dim=out_dim) |
| 89 | |
| 90 | def forward(self, x: float["b n d"], cond: float["b n d"], cond_noisy: float["b n d"], text_embed: float["b n d"], drop_audio_cond=False, drop_noisy_audio_cond=False): # noqa: F722 |
| 91 | if drop_audio_cond: # cfg for cond audio |
| 92 | cond = torch.zeros_like(cond) |
| 93 | if drop_noisy_audio_cond: # cfg for cond noisy audio |
| 94 | cond_noisy = torch.zeros_like(cond_noisy) |
| 95 | |
| 96 | x = self.proj(torch.cat((x, cond, cond_noisy, text_embed), dim=-1)) |
| 97 | x = self.conv_pos_embed(x) + x |
| 98 | return x |
| 99 | |
| 100 | |
| 101 | # Transformer backbone using DiT blocks |
nothing calls this directly
no outgoing calls
no test coverage detected