opsource AI music is finally here so this tool is called Y and this allows you to generate full songs for free locally on your computer now if you've been generating AI music before you've probably been using sunno or udio but there might be implications of your Generations in terms of like ownership rights and Commercial usage but this new open source project yeah is under the Apache 2 license which means you can pretty much do whatever you want with it including using it for commercial purposes now it's really simple to use the interface currently looks like this and so you just need to enter in a genre and then some lyrics and then press generate and in the latter half of this video I'm going to show you how to install this and get it running on your computer now before we go into the installation tutorial I just want to show you some examples so you can get a sense of what it can generate and what the quality is so I'm just going to play like some impressive sections from their demo page here are some pop examples here the genre is inspiring female uplifting pop Airy vocal electronic bright vocal vocal that's a really strange prompt here but anyways they've generated three versions of this let me play each of these for you so you can hear what it sounds like disy thoughts of you keep sing can't deny I know you don't to make M but I'm here to the heart I didn't break every word you would take about there was the behind every dream you're a Chase I reach you by the life you can't F this for now I won't back down you know you can't deny it now I W back down then I say I'm foring after you but I don't feel I love you way you do be for you can't just see I won't let you slip away from me I we back down you think be one step behind every CH you chase I reaching for the light it PR this for now I won't back down you know you can't deny it well I won't so a few things there note that it did Skip like some text in the lyrics so it doesn't follow your lyrics exactly sometimes this is a known flaw of this but another thing I really like about it is it keeps the chuses consistent so notice how The Melody of the first first chorus aligns with the melody of the second chorus so you can create a consistent song from this anyways let's hear the second [Music] example Sky you keep swirling can't deny I know I let you down I made mistakes but I'm here to man a heart I didn't break every hold you take I'll be one left behind every day with Tre make for you can't F this feeling now I back down can't Den down power back down I'm foring after you but they don't feel this love awake with you my heart beats only for you and you see I'm going let you s away for me every you take I'll be want to be every you chain some for the line you can't this feeling I won't down I W back down no I won't so again note how The Melody of the first chorus aligns with the second chorus but again it seems to skip like these lines here and jump directly to the bottom two lines so I get the feeling that each section can only take in a limited number of words finally let's listen to the last [Music] example sens come be the sky that's how you keep sweating can't to L I know I let you down I made mistakes but I'm here to the high I didn't break every Ro you take I'm eyes everything you change I'm for the it's still enough I won't back down you know you can't just not [Music] love SP I [Music] back foolish tracing after [Music] you okay so I hope that gives you a good sense of you know its vocal qualities and what it can generate for pop here's an example of Soul so here the genre is female romantic keyboard Soul emotional bright vocal Airy vocal Blues classic rock guitar based drums that's a lot of keywords there but let's see what this sounds [Music] like [Music] not I know it's not not so come on and take my hand please take my hand now don't start threaten trying to understand the stars are shining let's not miss this I know it's night where I'm at so come on and so that is soul for you notice how the vocals are pretty realistic and good quality the harmonies in the background also sound pretty cool and not only can It sing English lyrics but it can also sing other languages so here is an example of Chinese gangster [Music] rap for [Music] and it goes on and on so pretty cool how it's able to like you know rap whatever lyrics you give it while keeping the same beat and background music Here's another example so let's say you input these lyrics here the genre is bright vocal R&B love Airy vocal K-pop dance etc etc and then here the lyrics are a mixture of Japanese English and Korean let's see what this sounds [Music] like you're the only one I know the only [Music] one love with you you be you want me and I want to be your number one come a littleit [Music] closer [Music] call be my [Music] so first of all this is actually pretty good quality for a free open-source tool notice how it adds these like supporting vocals over here and then it also does sound very K-pop and it even makes some of the vocals autotune and synth likee this is a really cool effect and then here's an example of jazz here the prompt is female Blues ay vocals sad romantic guitar [Music] jazz R up the ne echo through the hall let the silent I hear a gentle voice guarding me back Homeward making my heart Rejoice don't let this moment they hold me close to with you here beside me a things can't theam never don't to let you go stay with me [Music] forever and it can also do metal and screaming and other insane stuff so here's an example of that step back CU all night won quit the a fight no can't get walk with the F fight so P your hands up light you might step back cuz I night Hold Back Down fight keep going going the so it can handle heavy metal and screaming just fine next I also want to show you some emergent properties so note how during this generation the lyrics and the song Length aren't really the same it kind of finished singing already but there was still some time at the end of the song so it just started improving and scatting let me jump to the end and play you what that sounds [Music] like everything's all right imagine for you don't want to let you go stay with me forever let let just roll [Music] really interesting phenomenon here's another example where in a rap song it just started improving and freestyling so let me jump to that section and play it for you for the skies lessons that I learned make me who I am standing T out I don't give a damn echoes in the alley music need to how me watch is she beef so me like me let get all to ca first birpal of certain that balls feeling the from the world cing the CH do and the wit and on this fool man on my wing and from my dream pretty strange but cool how it just ignored the lyrics and started freestyle rapping on its own now from these examples I mean it's already a huge step for open source AI music generation that being said notice that the quality isn't really that good yet I mean this doesn't really have stereo width this is definitely not publishable quality and honestly the top commercial models out there like sunno or udio still sound a lot better better that being said like I mentioned your Generations from these platforms might have legal implications so that's the benefit of generating with this open source tool instead anyways those are some examples next let's go over how we can install this and run it locally on your computer at the top of this page is their GitHub repo now note that for the original GitHub repo first of all there is no visual interface you kind of have to run all of this using Code but that's fine I'm going to show you how to use a visual interface in a second plus also in the original repo it does seem to be pretty compute intensive so here it's suggesting for gpus with 24 GB of memory or less you can only run up to two sessions concurrently which I'll Define in a second now of course not everyone that's watching my YouTube video has a GPU of 24 GB of vram so we are actually not going to use this original repo but we are going to use this one which is actually optimized for lower vram so let's click on this this repo is called U GP also known as GPU Port so this is actually optimized for people with gpus of less than 10 GB of vram another thing to note is you do need a Cuda gpus so AMD gpus currently do not work plus this does have a nice visual gradio interface so you don't have to just work with code you can work with this interface so you can enter the genre enter the prompt and then press generate so assuming you have all these Hardware requirements let's go ahead and install this by the way the instructions are all on this page let's go over this step by step so first of all before you even run this code you need to have get installed if you don't have get installed here's how to install it if you already have get installed feel free to skip to the next section so all we got to do is download the latest release for whatever operating system you're using so I'm using Windows so I'm just going to click on download for Windows I'm running 64-bit so I'm going to click on this to download and it's now downloading this exe file so once that's completed all we got to do is open that exe file and then follow the steps so I'm going to click on next I'm just going to go with the default install location which is program files SLG so I'll click next for that and then I'm just going to leave this at the default and then I'm going to click next again and click next here we're just going to use the default settings for all of these there's a lot of settings that you need to go through so I'm just going to click next for all of these all right and then it should go ahead and install all the files so this might take a few minutes perfect so now we have get installed all right so assuming you have G installed the next step is we're going to clone the repo into a folder somewhere so for me it doesn't matter where but let's say I want to just clone a folder on my desktop then I would first open up my desktop and then at the top bar here type in CMD to open up command prompt on my desktop and then the next step is to use git to install lfs this is also known as large file storage and this is needed for installing larger files and then the next step is it's going to use git to clone this repository basically it's going to clone all the files that you see here into a folder on our desktop so let's copy these two lines and then paste it in here and then let's press enter one more time so now it has cloned the repo you should see a new folder called U GP let me just drag it to the middle here and if we open this up and compare it with this GitHub repo note that all the files and folders are the same all right so the next step is to change the directory into this inference folder and then we are also going to use git to clone this which if you open up the link and click on files inv versions it basically copies all these files into this inference folder so let's go ahead and copy these two lines and then back in our command prompt let's paste it in here let's press enter and wait a few minutes for it to finish cloning everything all right if all goes well again if you open up this inference folder you should see this x codec mini infer and if you open that it contains all the files and folders that you see here now note that this folder the total size is like 1. 7 GB so it might take a while for you to download anyways going back to this GitHub repo the next step is to create a virtual environment using cond and then install torch 2. 51 with Cuda 12.
4 again note that you do need to have a Cuda GPU for this to work so let's exit out of this command prompt and then let's start from scratch again so going back to our desktop let's open up this UF folder and then at the top here let's type in CMD to open up command prompt within this UF folder and then next I'm going to use cond to create a virtual environment this does require that you have cond installed on your computer if you don't here's how to install it if you already have cond installed feel free to skip to the next section now I'm just on anaconda. com and actually what I'm going to do is install miniconda this is a minimalist version of Anaconda if you install the full Anaconda it installs a lot of packages and dependencies that you might not need this just takes up more room on your computer and of course the installation time is a bit longer but with miniconda it's just a barebones package and you can always install additional packages and dependencies afterwards so I'm going to click on latest miniconda installer links by python version and I'm using Windows so I'm going to install one of these now for free and open source AI tools usually they do not support python 3. 12 so it's better to install the python 3.
1 version so I'm going to click on this which should download an exe file to your computer once it's finished downloading simply double click on this and then follow the steps to complete the installation so I'm going to click next and then agree and then let's set this to all users I'm going to go with the default destination folder and then I'm going to check this as well clear the package cache upon completion this just gives you back some more dis space without affecting functionality all right once that's completed let's click next and then we are finished now we aren't done yet so if you open up the command prompt and you type in k-- version you're still going to see that cond is not recognized this is because we haven't added Anaconda to our path yet so let's exit out of this and then to add it to our path we simply search for this function edit the system environment variables we're going to click on this and then click on environment variables and then click on the one that says path and then click edit and here's where you add in the path of anaconda so it depends where you installed Anaconda for me I installed it in program data so it's going to be in program data/ miniconda and then if I doubleclick on scripts you can see that cond is here so this is the folder we want to paste in so I'm going to right click on this and then copy as path and then back in the environment variables window I'm going to click new and then paste in the path here and then click okay and then okay okay and then okay again now if you open up command prompt again and type in k-- version you should see that we are running 24. 5 point0 so this shows that we have successfully installed Anaconda all right so assuming you have cond installed the next step is to use cond to create a new virtual environment with the name y or whatever you want to name it and then you would set the python version to 3. 11 or10 or2 it doesn't matter as as long as the python version is 3.
10 or higher as it says here so I'm just going to go with 3. 11 and then press enter and then let's press yes to install the following new packages now a virtual environment if you're not familiar with this term think of it as like a separate hard drive on your computer that houses this current project by creating a virtual environment this ensures that you install all the packages and dependencies for this U tool but it won't affect existing AI tools that you have on your computer all right so now that we've created our virtual environment we actually need to activate it first so let me copy this line cond activate U and then paste it in here and if you see your cond environment in parentheses at the start of the line that means you have now activated and are within your virtual environment all right so the next step is to copy this line to basically install torch and torch vision and torch audio so going back to our Command Prompt let's just paste that line in here and press enter note that this is like several gbt in size so it's going to take a while depending on the speed of your internet all right so if all goes well you should see this line again with no errors now the next step is to pip install all the requirements that are listed in this file so let me copy this line first and then paste it in here and press enter and what this is basically doing is it's looking at this requirements. text file and then installing all these pack packages that are listed here if you don't have them already note that again this is going to take a while depending on the speed of your internet connection all right and if all goes well you should see this line with no error messages finally one last and optional step is to install Flash attention so it says here for saving GPU memory flash attention 2 is recommended without it it will lead to out of memory errors especially on gpus with limited memory so let's actually go ahead and and install Flash attention now you could just copy this line and then paste it in here but actually this method takes a long time especially if you're using Windows this could actually take hours to install so actually a better method is to go to this flash attention releases page which I'll link to in the description below and then down here look for the appropriate flash attention version so we're going to go with the latest version and then here we are using Cuda 12.
4 and by the way in order to check what Cuda version you have you can simply open up command prompt and then type in nvcc D- version so you can see I'm using Cuda 12. 4 so I'm going to select this Cuda 12. 4 one and we are using torch 2.
5. 1 because if you go back to the GitHub page notice here we've installed torch 2. 5.
1 and then I'm using python 3. 11 in my virtual environment so I'm going to download this one if you're using python 3.