Skip to content

Commit

Permalink
refactor: rm unused parameter and redundant return statement
Browse files Browse the repository at this point in the history
  • Loading branch information
0xlws committed Oct 13, 2023
1 parent 5d8752d commit 9af6690
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions audiocraft/models/multibanddiffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def get_mbd_musicgen(device=None):
return MultiBandDiffusion(DPs=DPs, codec_model=codec_model)

@staticmethod
def get_mbd_24khz(bw: float = 3.0, pretrained: bool = True,
def get_mbd_24khz(bw: float = 3.0,
device: tp.Optional[tp.Union[torch.device, str]] = None,
n_q: tp.Optional[int] = None):
"""Get the pretrained Models for MultibandDiffusion.
Expand Down Expand Up @@ -112,8 +112,6 @@ def get_mbd_24khz(bw: float = 3.0, pretrained: bool = True,
DPs.append(DiffusionProcess(model=models[i], noise_schedule=schedule))
return MultiBandDiffusion(DPs=DPs, codec_model=codec_model)

return MultiBandDiffusion(DPs, codec_model)

@torch.no_grad()
def get_condition(self, wav: torch.Tensor, sample_rate: int) -> torch.Tensor:
"""Get the conditioning (i.e. latent reprentatios of the compression model) from a waveform.
Expand Down

0 comments on commit 9af6690

Please sign in to comment.