Commit 3001a36b authored by Leon Wu's avatar Leon Wu
Browse files

Revert "try encodec branch"

This reverts commit 77e3df95.
parent a5dbd73d
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -96,12 +96,11 @@ encodec = EncodecWrapper()

#############

raise AssertionError("don't forget to use_mert when the encodec_support PR is merged")
raise AssertionError("note to self, try larger batch size and grad update https://github.com/lucidrains/audiolm-pytorch/discussions/107#discussioncomment-5373414")
wav2vec = HubertWithKmeans(
    # use_mert = True,
    checkpoint_path = f"{prefix}/{hubert_ckpt}",
    # checkpoint_path = None,
    use_mert = True,
    # checkpoint_path = f"{prefix}/{hubert_ckpt}",
    checkpoint_path = None,
    kmeans_path = f"{prefix}/{hubert_quantizer}"
)

+6 −7
Original line number Diff line number Diff line
@@ -6,28 +6,27 @@ import zipfile
import subprocess
import shutil

raise AssertionError("don't forget to revert the encodec supoprt commit when the encodec_support PR is merged")
zip_file_path = "audiolm-pytorch-encodec-support.zip"
input("type anything to confirm that you have pushed the latest version of the encodec_support branch to Github as well!!")
zip_file_path = "audiolm-pytorch-personal-hacks.zip"
input("type anything to confirm that you have pushed the latest version of the personal_hacks branch to Github as well!!")

if os.path.isfile(zip_file_path):
    replace = input("personal hacks zip already exists. replacing (as well as audiolm_pytorch library...)")
    os.remove(zip_file_path)
    shutil.rmtree("audiolm_pytorch")
urllib.request.urlretrieve("https://github.com/LWProgramming/audiolm-pytorch/archive/refs/heads/encodec_support.zip", zip_file_path)
urllib.request.urlretrieve("https://github.com/LWProgramming/audiolm-pytorch/archive/refs/heads/personal_hacks.zip", zip_file_path)

with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
    zip_ref.extractall("audiolm-pytorch")


# install requirements from the patched audiolm-pytorch directory
subprocess.run(['pip', 'install', 'audiolm-pytorch/audiolm-pytorch-encodec_support'])
subprocess.run(['pip', 'install', 'audiolm-pytorch/audiolm-pytorch-personal_hacks'])

# move library itself to current directory
subprocess.run(['mv', 'audiolm-pytorch/audiolm-pytorch-encodec_support/audiolm_pytorch', '.'])
subprocess.run(['mv', 'audiolm-pytorch/audiolm-pytorch-personal_hacks/audiolm_pytorch', '.'])

# # move setup.py to current directory for requirements
# subprocess.run(['mv', 'audiolm-pytorch/audiolm-pytorch-encodec_support/setup.py', '.'])
# subprocess.run(['mv', 'audiolm-pytorch/audiolm-pytorch-personal_hacks/setup.py', '.'])

# remove the rest of the audiolm-pytorch directory
subprocess.run(['rm', '-rf', 'audiolm-pytorch'])