adefossez commited on
Commit
32b0714
1 Parent(s): 23fe483

update colab

Browse files
Files changed (2) hide show
  1. README.md +3 -2
  2. audiocraft/models/musicgen.py +1 -1
README.md CHANGED
@@ -13,7 +13,7 @@ all 4 codebooks in one pass. By introducing a small delay between the codebooks,
13
  them in parallel, thus having only 50 auto-regressive steps per second of audio.
14
  Check out our [sample page][musicgen_samples] or test the available demo!
15
 
16
- <a target="_blank" href="https://colab.research.google.com/drive/1fxGqfg96RBUvGxZ1XXN07s3DthrKUl4-?usp=sharing">
17
  <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
18
  </a>
19
  <a target="_blank" href="https://huggingface.co/spaces/facebook/MusicGen">
@@ -41,7 +41,8 @@ We offer a number of way to interact with MusicGen:
41
  1. You can play with MusicGen by running the jupyter notebook at [`demo.ipynb`](./demo.ipynb) locally, or use the provided [colab notebook](https://colab.research.google.com/drive/1fxGqfg96RBUvGxZ1XXN07s3DthrKUl4-?usp=sharing).
42
  2. You can use the gradio demo locally by running `python app.py`.
43
  3. A demo is also available on the [`facebook/MusicGen` HuggingFace Space](https://huggingface.co/spaces/facebook/MusicGen) (huge thanks to all the HF team for their support).
44
- 4. Finally, @camenduru did a great notebook that combines [the MusicGen Gradio demo with Google Colab](https://github.com/camenduru/MusicGen-colab)
 
45
 
46
  ## API
47
 
 
13
  them in parallel, thus having only 50 auto-regressive steps per second of audio.
14
  Check out our [sample page][musicgen_samples] or test the available demo!
15
 
16
+ <a target="_blank" href="https://colab.research.google.com/drive/1-Xe9NCdIs2sCUbiSmwHXozK6AAhMm7_i?usp=sharing">
17
  <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
18
  </a>
19
  <a target="_blank" href="https://huggingface.co/spaces/facebook/MusicGen">
 
41
  1. You can play with MusicGen by running the jupyter notebook at [`demo.ipynb`](./demo.ipynb) locally, or use the provided [colab notebook](https://colab.research.google.com/drive/1fxGqfg96RBUvGxZ1XXN07s3DthrKUl4-?usp=sharing).
42
  2. You can use the gradio demo locally by running `python app.py`.
43
  3. A demo is also available on the [`facebook/MusicGen` HuggingFace Space](https://huggingface.co/spaces/facebook/MusicGen) (huge thanks to all the HF team for their support).
44
+ 4. Finally, you can run the [Gradio demo with a Colab GPU](https://colab.research.google.com/drive/1-Xe9NCdIs2sCUbiSmwHXozK6AAhMm7_i?usp=sharing),
45
+ as adapted from [@camenduru Colab](https://github.com/camenduru/MusicGen-colab).
46
 
47
  ## API
48
 
audiocraft/models/musicgen.py CHANGED
@@ -88,7 +88,7 @@ class MusicGen:
88
  cache_dir = os.environ.get('MUSICGEN_ROOT', None)
89
  compression_model = load_compression_model(name, device=device, cache_dir=cache_dir)
90
  lm = load_lm_model(name, device=device, cache_dir=cache_dir)
91
- if name == 'melody' and True:
92
  lm.condition_provider.conditioners['self_wav'].match_len_on_eval = True
93
 
94
  return MusicGen(name, compression_model, lm)
 
88
  cache_dir = os.environ.get('MUSICGEN_ROOT', None)
89
  compression_model = load_compression_model(name, device=device, cache_dir=cache_dir)
90
  lm = load_lm_model(name, device=device, cache_dir=cache_dir)
91
+ if name == 'melody':
92
  lm.condition_provider.conditioners['self_wav'].match_len_on_eval = True
93
 
94
  return MusicGen(name, compression_model, lm)