Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions stable_audio_tools/inference/generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,5 +270,6 @@ def build_mask(sample_size, mask_args):
# marination finishes the inpainting early in the denoising schedule, and lets audio get changed in the final rounds
if marination > 0:
mask = mask * (1-marination)
mask = 1 - mask
#print(mask)
return mask
2 changes: 1 addition & 1 deletion stable_audio_tools/inference/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def sample(model, x, steps, eta, **extra_args):
def get_bmask(i, steps, mask):
strength = (i+1)/(steps)
# convert to binary mask
bmask = torch.where(mask<=strength,1,0)
bmask = torch.where(mask<strength,0,1)
return bmask

def make_cond_model_fn(model, cond_fn):
Expand Down