Giter Club home page Giter Club logo

text-to-audio-generation-with-diffusion-models's Introduction

Text-to-Audio-Generation-with-Diffusion-Models Welcome to the project repository! This is the final project for Skoltech Deep Learning course.

Description The project aims to solve text to audio generation task using latent diffusion. We operate with with mel spectrograms of audios. At the second step we generate text embeddings using pretrained CLAP model At the first step we train VAE to generate audio embeddings At the third and final step we train u-net based latent duffusion model with cross attention blocks using audio and text embeddings.

clap_text.py contains example of usage of CLAP model to get text embeddings.

generate.ipynb notebook provides an example of usage of a fully trained model (unet + vae).

Weights of trained model are located in model/ folder (uploaded to GDrive: https://drive.google.com/drive/folders/1qw-OSGRCsU3gTdBb3K_E3jarJpyGvYjy?usp=sharing).

lightning_logs/ folder contains logs of vae training process.

VAE training

python3 scripts/train_vae.py \
--dataset_name /path/to/dev/data \
--save_images_batches 100 \
--max_epochs 10 \
--batch_size 2 \
--gradient_accumulation_steps 12 \

Latent diffusion training

accelerate launch --config_file config/accelerate_local.yaml \
scripts/train_unet.py \
--hop_length 1024 \
--output_dir models/ddpm-ema-audio-64 \
--train_batch_size 1 \
--num_epochs 10 \
--gradient_accumulation_steps 1 \
--learning_rate 1e-4 \
--lr_warmup_steps 500 \
--mixed_precision no \
--vae models/autoencoder-kl \
--save_images_epochs 4

Acknowledgments

  1. https://github.com/teticio/audio-diffusion/tree/main
  2. https://github.com/LAION-AI
  3. https://huggingface.co/docs/transformers/model_doc/clap#transformers.ClapTextModel
  4. https://huggingface.co/laion/clap-htsat-unfuse

text-to-audio-generation-with-diffusion-models's People

Contributors

genzorr avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.