{"id":13594361,"url":"https://github.com/1aienthusiast/audiocraft-infinity-webui","last_synced_at":"2025-04-09T07:31:49.427Z","repository":{"id":174708514,"uuid":"652657193","full_name":"1aienthusiast/audiocraft-infinity-webui","owner":"1aienthusiast","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-14T02:55:04.000Z","size":103,"stargazers_count":154,"open_issues_count":9,"forks_count":20,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-02T16:51:55.429Z","etag":null,"topics":["agplv3","artificial-intelligence","audiocraft","generation","machine-learning","ml","music","music-generation","musicgen","open-source","python","web-ui","webui"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1aienthusiast.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-06-12T14:22:55.000Z","updated_at":"2024-07-23T03:03:03.000Z","dependencies_parsed_at":"2023-11-03T00:15:11.926Z","dependency_job_id":null,"html_url":"https://github.com/1aienthusiast/audiocraft-infinity-webui","commit_stats":null,"previous_names":["1aienthusiast/audiocraft-infinity-webui"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1aienthusiast%2Faudiocraft-infinity-webui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1aienthusiast%2Faudiocraft-infinity-webui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1aienthusiast%2Faudiocraft-infinity-webui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1aienthusiast%2Faudiocraft-infinity-webui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1aienthusiast","download_url":"https://codeload.github.com/1aienthusiast/audiocraft-infinity-webui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223375310,"owners_count":17135347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agplv3","artificial-intelligence","audiocraft","generation","machine-learning","ml","music","music-generation","musicgen","open-source","python","web-ui","webui"],"created_at":"2024-08-01T16:01:32.344Z","updated_at":"2024-11-06T16:31:13.645Z","avatar_url":"https://github.com/1aienthusiast.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Audiocraft Infinity WebUI\n\nAdds generation of songs with a length of over 30 seconds.\n\nAdds the ability to continue songs.\n\nAdds a seed option.\n\nAdds ability to load locally downloaded models.\n\n### Adds training (Thanks to chavinlo's repo https://github.com/chavinlo/musicgen_trainer)\n\nAdds MacOS support. \n\nAdds queue (on the main-queue branch: https://github.com/1aienthusiast/audiocraft-infinity-webui/tree/main-queue)\n\nBatching (**run webuibatch.py instead of webui.py**)\n\nDisables (hopefully) the gradio analytics.\n\n## Note! Project is currently not actively maintained but accepts PRs.\n\n## Installation\nPython 3.9 is recommended.\n\n1. Clone the repo:\n`git clone https://github.com/1aienthusiast/audiocraft-infinity-webui.git`\n2. Install pytorch:\n`pip install 'torch\u003e=2.0'`\n3. Install the requirements:\n`pip install -r requirements.txt`\n4. Clone my fork of the Meta audiocraft repo and chavinlo's MusicGen trainer inside the `repositories` folder:\n```\ncd repositories\ngit clone https://github.com/1aienthusiast/audiocraft\ngit clone https://github.com/chavinlo/musicgen_trainer\ncd ..\n```\n## Note!\nIf you already cloned the Meta audiocraft repo you have to remove it then clone the provided fork for the seed option to work.\n```\ncd repositories\nrm -rf audiocraft/\ngit clone https://github.com/1aienthusiast/audiocraft\ngit clone https://github.com/chavinlo/musicgen_trainer\ncd ..\n```\n\n## Usage\n```python webui.py```\n```python webuibatch.py``` - with batching support\n\n## Updating\nRun `git pull` inside the root folder to update the webui, and the same command inside `repositories/audiocraft` to update audiocraft.\n\n## Models\n\nMeta provides 4 pre-trained models. The pre trained models are:\n- `small`: 300M model, text to music only - [🤗 Hub](https://huggingface.co/facebook/musicgen-small)\n- `medium`: 1.5B model, text to music only - [🤗 Hub](https://huggingface.co/facebook/musicgen-medium)\n- `melody`: 1.5B model, text to music and text+melody to music - [🤗 Hub](https://huggingface.co/facebook/musicgen-melody)\n- `large`: 3.3B model, text to music only - [🤗 Hub](https://huggingface.co/facebook/musicgen-large)\n\n**Needs a GPU!**\n\nI recommend 12GB of VRAM for the large model.\n\n## Training\n\n### Dataset Creation\n\nCreate a folder, in it, place your audio and caption files. **They must be WAV and TXT format respectively.**\n\n![](https://i.imgur.com/AlDlqBI.png)\n\n**Place the folder in `training/datasets/`.**\n\n### Important: Split your audios in 35 second chunks. Only the first 30 seconds will be processed. Audio cannot be less than 30 seconds.\n\nIn this example, segment_000.txt contains the caption \"jazz music, jobim\" for wav file segment_000.wav\n\n### Options\n\n- `dataset_path` - path to your dataset with WAV and TXT pairs.\n- `model_id` - MusicGen model to use. Can be `small`/`medium`/`large`. Default: `small` - model it will be finetuned on\n- `lr`: Float, learning rate. Default: `0.0001`/`1e-4`\n- `epochs`: Integer, epoch count. Default: `5`\n- `use_wandb`: Integer, `1` to enable wandb, `0` to disable it. Default: `0` = Disabled\n- `save_step`: Integer, amount of steps to save a checkpoint. Default: None\n\n### Models\n\nOnce training finishes, the model (and checkpoints) will be available under the `models/` directory.\n\n![](https://i.imgur.com/Mu19EPb.png)\n\n### Loading the finetuned models\nModel gets saved to models/ as `lm_final.pt`\n\n1) Place it in models/DIRECTORY_NAME/\n2) In the Inference tab choose `custom` as the model and enter DIRECTORY_NAME into the input field. \n3) In the Inference tab choose the model it was finetuned on\n\n## Colab\n\nFor google colab you need to use the `--share` flag.\n\n## License\n* The code in this repository is released under the AGPLv3 license as found in the [LICENSE file](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1aienthusiast%2Faudiocraft-infinity-webui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1aienthusiast%2Faudiocraft-infinity-webui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1aienthusiast%2Faudiocraft-infinity-webui/lists"}