Docs/Add conversion code to the musicgen docs (#27665)
* Update musicgen.md please make it less hidden * Add cleaner formatting
This commit is contained in:
@@ -46,6 +46,16 @@ This model was contributed by [sanchit-gandhi](https://huggingface.co/sanchit-ga
|
|||||||
[here](https://github.com/facebookresearch/audiocraft). The pre-trained checkpoints can be found on the
|
[here](https://github.com/facebookresearch/audiocraft). The pre-trained checkpoints can be found on the
|
||||||
[Hugging Face Hub](https://huggingface.co/models?sort=downloads&search=facebook%2Fmusicgen-).
|
[Hugging Face Hub](https://huggingface.co/models?sort=downloads&search=facebook%2Fmusicgen-).
|
||||||
|
|
||||||
|
## Usage tips
|
||||||
|
|
||||||
|
- After downloading the original checkpoints from [here](https://github.com/facebookresearch/audiocraft/blob/main/docs/MUSICGEN.md#importing--exporting-models) , you can convert them using the **conversion script** available at
|
||||||
|
`src/transformers/models/musicgen/convert_musicgen_transformers.py` with the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python src/transformers/models/musicgen/convert_musicgen_transformers.py \
|
||||||
|
--checkpoint small --pytorch_dump_folder /output/path --safe_serialization
|
||||||
|
```
|
||||||
|
|
||||||
## Generation
|
## Generation
|
||||||
|
|
||||||
MusicGen is compatible with two generation modes: greedy and sampling. In practice, sampling leads to significantly
|
MusicGen is compatible with two generation modes: greedy and sampling. In practice, sampling leads to significantly
|
||||||
|
|||||||
Reference in New Issue
Block a user